org.springframework.dao.DataRetrievalFailureException: The user 'Name Surname (name.surname)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'Jenkins-build-user'

Jenkins JIRA | Michele Sacchetti | 4 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    we recently moved from LDAP to Crowd authentication via Crowd2 plugin. we are experiencing an issue with a internal custom plugin which check users permissions before executing. we retrieve build user via {code} Cause.UserIdCause mycause = (Cause.UserIdCause)build.getCause(Cause.UserIdCause.class); variables.put("BUILD_USERID", mycause.getUserId()); variables.put("BUILD_USERNAME", mycause.getUserName()); {code} Both variables seems to return the same value, which is {code}Name Surname (name.surname){code} while we expect at least one of the two to be simply {code}name.surname{code} so that it could be passed to {code}UserDetails ud = Jenkins.getInstance().getSecurityRealm().loadUserByUsername(build_user); {code} With current values, the method is failing since the id is not correctly recognized and Crowd group membership not correctly resolved causing the error: ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com org.springframework.dao.DataRetrievalFailureException: The user 'Name Surname (name.surname)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'Jenkins-build-user' at de.theit.jenkins.crowd.CrowdUserDetailsService.loadUserByUsername(CrowdUserDetailsService.java:94) at de.theit.jenkins.crowd.CrowdSecurityRealm.loadUserByUsername(CrowdSecurityRealm.java:281) at com.buongiorno.jenkinsci.plugins.delivery.ScriptBuildWrapper.setUp(ScriptBuildWrapper.java:95) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:600) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584) at hudson.model.Run.execute(Run.java:1575) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237)

    Jenkins JIRA | 4 years ago | Michele Sacchetti
    org.springframework.dao.DataRetrievalFailureException: The user 'Name Surname (name.surname)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'Jenkins-build-user'
  2. 0

    we recently moved from LDAP to Crowd authentication via Crowd2 plugin. we are experiencing an issue with a internal custom plugin which check users permissions before executing. we retrieve build user via {code} Cause.UserIdCause mycause = (Cause.UserIdCause)build.getCause(Cause.UserIdCause.class); variables.put("BUILD_USERID", mycause.getUserId()); variables.put("BUILD_USERNAME", mycause.getUserName()); {code} Both variables seems to return the same value, which is {code}Name Surname (name.surname){code} while we expect at least one of the two to be simply {code}name.surname{code} so that it could be passed to {code}UserDetails ud = Jenkins.getInstance().getSecurityRealm().loadUserByUsername(build_user); {code} With current values, the method is failing since the id is not correctly recognized and Crowd group membership not correctly resolved causing the error: ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com org.springframework.dao.DataRetrievalFailureException: The user 'Name Surname (name.surname)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'Jenkins-build-user' at de.theit.jenkins.crowd.CrowdUserDetailsService.loadUserByUsername(CrowdUserDetailsService.java:94) at de.theit.jenkins.crowd.CrowdSecurityRealm.loadUserByUsername(CrowdSecurityRealm.java:281) at com.buongiorno.jenkinsci.plugins.delivery.ScriptBuildWrapper.setUp(ScriptBuildWrapper.java:95) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:600) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584) at hudson.model.Run.execute(Run.java:1575) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237)

    Jenkins JIRA | 4 years ago | Michele Sacchetti
    org.springframework.dao.DataRetrievalFailureException: The user 'Name Surname (name.surname)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'Jenkins-build-user'

    Root Cause Analysis

    1. org.springframework.dao.DataRetrievalFailureException

      The user 'Name Surname (name.surname)' does not have the permission to login and/or is not a member of the following user group(s) in your Crowd server: 'Jenkins-build-user'

      at de.theit.jenkins.crowd.CrowdUserDetailsService.loadUserByUsername()
    2. de.theit.jenkins
      CrowdSecurityRealm.loadUserByUsername
      1. de.theit.jenkins.crowd.CrowdUserDetailsService.loadUserByUsername(CrowdUserDetailsService.java:94)
      2. de.theit.jenkins.crowd.CrowdSecurityRealm.loadUserByUsername(CrowdSecurityRealm.java:281)
      2 frames
    3. com.buongiorno.jenkinsci
      ScriptBuildWrapper.setUp
      1. com.buongiorno.jenkinsci.plugins.delivery.ScriptBuildWrapper.setUp(ScriptBuildWrapper.java:95)
      1 frame
    4. Hudson Maven Embedder
      MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun
      1. hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:600)
      1 frame
    5. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584)
      2. hudson.model.Run.execute(Run.java:1575)
      2 frames
    6. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:237)
      2 frames