Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15784

Groovy-Scripts with CLI are not working with Crowd 2 Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hello,

      I'm using a groovy-script to look for public-projects, executing this with the jenkins-cli:
      java -jar jenkins-cli.jar -s http://<url>:8080/ groovy displayJobWithAnonymousAccess.groovy
      (using this script: http://scriptlerweb.appspot.com/script/show/74001)

      With LDAP-authentification everything is working fine (using a ssh-key in the personal configuration - me/configure).
      But changing the authentication-type to crowd2 it is not working anymore.

      Before:
      + java -jar jenkins-cli.jar -s http://<url>:8080/ groovy displayJobWithAnonymousAccess.groovy
      + [ -s ./result ]
      + cat ./result
      Anonymous-User has Access to BusyWaiting - Permission[class hudson.scm.SCM,Tag]:[anonymous]
      + exit 1
      Build step 'Execute shell' marked build as failure

      After:
      + java -jar jenkins-cli.jar -s http://<url>:8080/ groovy displayJobWithAnonymousAccess.groovy
      Exception in thread "main" java.io.EOFException
      at java.io.DataInputStream.readBoolean(Unknown Source)
      at hudson.cli.Connection.readBoolean(Connection.java:90)
      at hudson.cli.CLI.authenticate(CLI.java:560)
      at hudson.cli.CLI._main(CLI.java:400)
      at hudson.cli.CLI.main(CLI.java:330)
      Build step 'Execute shell' marked build as failure

      I don't know where to search for this failure. Any idea?

      Thomas

        Attachments

          Activity

          Hide
          thosor Thomas S. added a comment -

          The following error is shown in the server.log:

          Exception in thread "Thread-12827" org.springframework.dao.DataRetrievalFailureException: The user '<User> <Name> (<userid>)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'all-employees'
                  at de.theit.jenkins.crowd.CrowdUserDetailsService.loadUserByUsername(CrowdUserDetailsService.java:94)
                  at de.theit.jenkins.crowd.CrowdSecurityRealm.loadUserByUsername(CrowdSecurityRealm.java:281)
                  at hudson.model.User.impersonate(User.java:255)
                  at org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator.authenticate(SshCliAuthenticator.java:44)
                  at hudson.cli.CliManagerImpl$2.run(CliManagerImpl.java:109)
          
          Show
          thosor Thomas S. added a comment - The following error is shown in the server.log: Exception in thread " Thread -12827" org.springframework.dao.DataRetrievalFailureException: The user '<User> <Name> (<userid>)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'all-employees' at de.theit.jenkins.crowd.CrowdUserDetailsService.loadUserByUsername(CrowdUserDetailsService.java:94) at de.theit.jenkins.crowd.CrowdSecurityRealm.loadUserByUsername(CrowdSecurityRealm.java:281) at hudson.model.User.impersonate(User.java:255) at org.jenkinsci.main.modules.cli.auth.ssh.SshCliAuthenticator.authenticate(SshCliAuthenticator.java:44) at hudson.cli.CliManagerImpl$2.run(CliManagerImpl.java:109)
          Hide
          thosor Thomas S. added a comment -

          Cannot Reproduce Error in 1.509.2 LTS. So for me this error is gone.

          Show
          thosor Thomas S. added a comment - Cannot Reproduce Error in 1.509.2 LTS. So for me this error is gone.

            People

            Assignee:
            t_heit Thorsten Heit
            Reporter:
            thosor Thomas S.
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: