[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OpenShift Jenkins OAuth2 Authentication using Spring Boot





On Fri, Feb 9, 2018 at 1:45 PM, Tien Hung Nguyen <tienhng nguyen gmail com> wrote:
Hello everyone,

I'm having a Spring Boot Rest Microservice and I'm trying to pull some information with a Rest call from my Jenkins Server, which is running in an OpenShift pod (based on the default openshift/jenkins image), to display the information from Jenkins in a unified dashboard.

However, I'm getting some problems with the authentication because OAuth2 is enabled on the Jenkins Pod. What is the correct way to authenticate my Spring Boot Rest Microservice with the Jenkins pod which redirects me at the moment to the OpenShift page because of OAuth2?

Currently, I have the required information and credentials in a properties file stored that I use for rest call, like username, password, server, domain etc., but actually that's mot working to authenticate with the jenkins pod.

Could you give me some sample code snippet that shows how to do that in a proper way?

Toggling the default behavior wrt auth for the openshift jenkins image is discussed at https://docs.openshift.org/latest/using_images/other_images/jenkins.html#jenkins-openshift-oauth-authentication

If you are using the openshift example template for provisioning Jenkins, if you instantiate the template with the parameter ENABLE_OAUTH set to false,
it will handle the necessary environment variables discussed above.

See https://github.com/openshift/origin/blob/master/examples/jenkins/jenkins-ephemeral-template.json#L260-L266 and https://github.com/openshift/origin/blob/master/examples/jenkins/jenkins-persistent-template.json#L277-L282



Regards
Tien

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]