jenkins command line use with google Login Oauth2....

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jenkins command line use with google Login Oauth2....

Shrinivas Devarkonda
Hi All,

We are using jenkins with "configure global security" and Access Control --> security Realm --> Login with google with client_id, client_secret and google apps domain "ourdomain.com".

Everything is working fine , Email who are @ourdomain.com are able to access jenkins.

We want to achieve following by using command line.   

** We are changing deploy ips in config.xml from command line which is effected in jenkins console ,so the solution is either reload or restart or reload configuration from disk.

/etc/init.d/jenkins reload  ( this actually restarts jenkins , so we can not use this ) , 

So only one way is "jenkins reload configuration from disk" either from jenkins UI or command line.   From jenkins UI it works fine.

We need to do the same from command line.    I tried by using below line and it fails as Google Login Auth is required.

/etc/alternatives/java -jar jenkins-cli.jar -s http://10.10.1.7:8080 reload-configuration
error : hudson.security.AccessDeniedException2: anonymous is missing the Overall/Read permission


Please help us how to do this.

Thanks,
Shrinivas Devarkonda
Manager - DevOps.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/282f897f-1ba1-402d-8619-ec7c4471ce56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins command line use with google Login Oauth2....

adria.lucena
Hi,

Same problem here. I'm trying to install plugin via jenkins-cli (with ansible or from localhost) and can't authenticate because of Google Login Plugin.
Any advance on this issue?
Is there any way to bypass google authentication or using an own's database jenkins user?

El martes, 24 de octubre de 2017, 14:33:54 (UTC+2), Shrinivas Devarkonda escribió:
Hi All,

We are using jenkins with "configure global security" and Access Control --> security Realm --> Login with google with client_id, client_secret and google apps domain "<a href="http://ourdomain.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fourdomain.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOESwrZ1AfZMnJSs4n5yw6vt8wLw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fourdomain.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOESwrZ1AfZMnJSs4n5yw6vt8wLw&#39;;return true;">ourdomain.com".

Everything is working fine , Email who are @<a href="http://ourdomain.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fourdomain.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOESwrZ1AfZMnJSs4n5yw6vt8wLw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fourdomain.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGOESwrZ1AfZMnJSs4n5yw6vt8wLw&#39;;return true;">ourdomain.com are able to access jenkins.

We want to achieve following by using command line.   

** We are changing deploy ips in config.xml from command line which is effected in jenkins console ,so the solution is either reload or restart or reload configuration from disk.

/etc/init.d/jenkins reload  ( this actually restarts jenkins , so we can not use this ) , 

So only one way is "jenkins reload configuration from disk" either from jenkins UI or command line.   From jenkins UI it works fine.

We need to do the same from command line.    I tried by using below line and it fails as Google Login Auth is required.

/etc/alternatives/java -jar jenkins-cli.jar -s <a href="http://10.10.1.7:8080/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F10.10.1.7%3A8080%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQkicUP6aqLSx0mxvcQLxD4kF0CA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F10.10.1.7%3A8080%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQkicUP6aqLSx0mxvcQLxD4kF0CA&#39;;return true;">http://10.10.1.7:8080 reload-configuration
error : hudson.security.AccessDeniedException2: anonymous is missing the Overall/Read permission


Please help us how to do this.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d37abe09-c305-479e-aaeb-671e700031ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.