简体   繁体   English

无法 SSO 登录 Jenkins SAML 2.0 ADFS 集成

[英]Unable to SSO login Jenkins SAML 2.0 ADFS integration

We are able to login to Jenkins using SSO from the past one year without any issues.我们能够使用过去一年的 SSO 登录 Jenkins,没有任何问题。

Today, however the SSO failed for the entire team and no one can login anymore.然而今天,整个团队的 SSO 都失败了,再也没有人可以登录了。

After providing the SSO AD credentials we are thrown to the SAMLLougout page.提供 SSO AD 凭据后,我们将被带到 SAMLLougout 页面。

在此处输入图像描述

Upon investigation the ADFS team informed that one of the certificates from Jenkins has expired.经调查,ADFS 团队告知 Jenkins 的其中一个证书已过期。 The sanpshot of the expired certificate as shared by the ADFS team for our Jenkins is below: ADFS 团队为我们的 Jenkins 共享的过期证书的快照如下:

在此处输入图像描述

在此处输入图像描述

We have never created this certificate nor do we have any idea about it.我们从来没有创建过这个证书,我们也不知道它。 Is this something that comes default with the SAML plugin or the Jenkins product?这是 SAML 插件或 Jenkins 产品的默认设置吗? Please let me know.请告诉我。

Now, that we are not able to login to Jenkins how do we go about fixing the issue and updating the certificate?现在,我们无法登录到 Jenkins 我们如何解决问题和更新证书?

I'm using the latest version of the standalone Jenkins war.我正在使用最新版本的独立 Jenkins 战争。

Any help guidance would be appreciated.任何帮助指导将不胜感激。

You need to remove certificates from JENKINS_HOME and restart jenkins service.您需要从 JENKINS_HOME 中删除证书并重新启动 jenkins 服务。 Jenkins will generate new certificates: Jenkins 将生成新证书:

  • Delete the following file from JENKINS_HOME: saml-jenkins-keystore.jks saml-jenkins-keystore.xml jenkins.cer.从 JENKINS_HOME 中删除以下文件:saml-jenkins-keystore.jks saml-jenkins-keystore.xml jenkins.cer。
  • Restart Jenkins.重启 Jenkins。
  • Access JENKINS via web inteface.通过 web 接口访问 JENKINS。 This will generate new saml-jenkins-keystore.jks saml-jenkins-keystore.xml这将生成新的 saml-jenkins-keystore.jks saml-jenkins-keystore.xml
  • Generate jenkins.cer using the new jks keytool -export -alias saml-generated-keypair -keystore saml-jenkins-keystore.jks -rfc -file jenkins.cer使用新的 jks keytool -export -alias saml-generated-keypair -keystore saml-jenkins-keystore.jks -rfc -file jenkins.cer
  • Give this new jenkins.cer to ADFS Team which they will import and this will resolve the issue.将此新的 jenkins.cer 提供给 ADFS 团队,他们将导入它,这将解决问题。

You can move these files to /home/ folder to restore them if everything will go wrong.如果一切都会出错,您可以将这些文件移动到 /home/ 文件夹以恢复它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM