Jenkins unable to use Openshift Oauth
Issue
- Jenkins app could not integrate with Openshift Oauth.
- Jenkins unable to use Openshift authentication.
- Jenkins authentication using Openshift Oauth.
- Troubleshooting Jenkins authentication with Openshift Oauth.
- Jenkins pod logs looks like.
Mar 09, 2018 5:51:41 AM org.openshift.jenkins.plugins.openshiftlogin.OpenShiftSetOAuth setOauth
INFO: OpenShift OAuth: enable oauth set to true force false lastCheck Fri Mar 09 05:51:31 GMT 2018
Mar 09, 2018 5:51:41 AM org.openshift.jenkins.plugins.openshiftlogin.OpenShiftSetOAuth setOauth
INFO: OpenShift OAuth: configured security realm on startup: hudson.security.HudsonPrivateSecurityRealm@121jlu3 last check
- Jenkins pod log throws certificate error.
java.security.cert.CertificateParsingException: signed fields invalid
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1791)
at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:195)
at sun.security.provider.X509Factory.parseX509orPKCS7Cert(X509Factory.java:471)
at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:356)
at java.security.cert.CertificateFactory.generateCertificates(CertificateFactory.java:462)
...
Caused: java.lang.IllegalArgumentException: Failed to instantiate class org.openshift.jenkins.plugins.openshiftlogin.OpenShiftOAuth2SecurityRealm from {"value":"1","stapler-class":"org.openshift.jenkins.plugins.openshiftlogin.OpenShiftOAuth2SecurityRealm",
"$class":"org.openshift.jenkins.plugins.openshiftlogin.OpenShiftOAuth2SecurityRealm","serviceAccountDirectory":"/var/run/secrets/kubernetes.io/serviceaccount","serviceAccountName":"jenkins","serverPrefix":"https://console.example.com:8443","redirectURL":"","clientId":"","clientSecret":""}
Environment
- OpenShift Container Platform 3.5, 3.6, 3.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.