Authenticating jenkins-cli using crowd2 Plugin

34 views
Skip to first unread message

Robert Szentmihalyi

unread,
Jan 7, 2016, 8:58:57 AM1/7/16
to Jenkins Users
Hi,

I ran into a problem trying to use jenkins-cli with Atlassian Crowd authentification (using the crowd2 plugin.
As soon as I set the security realm (using a Groovy script from a Chef recipe), Jenkins throws tons of like this:

----

Jan 07, 2016 1:50:46 PM hudson.TcpSlaveAgentListener$ConnectionHandler run
INFO: Accepted connection #2663 from /127.0.0.1:32924
Exception in thread "Thread-5332" org.acegisecurity.userdetails.UsernameNotFoundException: jenkinsdeploy
    at hudson.security.SecurityRealm$None$2.loadUserByUsername(SecurityRealm.java:494)
    at jenkins.security.ImpersonatingUserDetailsService.loadUserByUsername(ImpersonatingUserDetailsService.java:32)
    at hudson.model.User.impersonate(User.java:309)
    at org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator.authenticate(SshCliAuthenticator.java:44)
    at hudson.cli.CliManagerImpl$2.run(CliManagerImpl.java:109)
Jan 07, 2016 1:50:47 PM hudson.TcpSlaveAgentListener$ConnectionHandler run
INFO: Accepted connection #2664 from /127.0.0.1:32926
Exception in thread "Thread-5334" org.acegisecurity.userdetails.UsernameNotFoundException: jenkinsdeploy
    at hudson.security.SecurityRealm$None$2.loadUserByUsername(SecurityRealm.java:494)
    at jenkins.security.ImpersonatingUserDetailsService.loadUserByUsername(ImpersonatingUserDetailsService.java:32)
    at hudson.model.User.impersonate(User.java:309)
    at org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator.authenticate(SshCliAuthenticator.java:44)
    at hudson.cli.CliManagerImpl$2.run(CliManagerImpl.java:109)

...

----

I set the slave agent port to a fixed value, but that does not change this behaviour.
The user does exist in the Crowd directory and login worksfrom the Jenkins UI.


I am currently testing this with Jenkins 1.619, but I tried different versions with the same result.

Any idea what I might be missing?

TIA,
 Robert

Reply all
Reply to author
Forward
0 new messages