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

crowd2 Jenkins plugin crashes if user not found

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am trying to configure groups support in Crowd2 plugin for Jenkins.

      Let's say we have two groups in our JIRA: systems and developers. As stated in documentation, I put both in 'Restrict Groups' section, separated by commas: systems,developers . It works if user sys (a member of systems group) is trying to login and does not work if user dev (a member of developers group). If I change the order and put developers,systems, then dev can login and sys cannot_._ The problem is that JIRA Crowd2 API returns 404 when the plugin asks if user dev is a member of systems (and he is not):

      and the exceptions is thrown:

      Checking group membership for user 'dev' and group 'systems'...
      Nov 06, 2017 11:15:58 AM SEVERE de.theit.jenkins.crowd.CrowdConfigurationService isGroupMember
      The connection check failed.
      com.atlassian.crowd.exception.InvalidCrowdServiceException: The following URL does not specify a valid Crowd User Management REST service: https://myjira.net/rest/usermanagement/1/group/user/direct?groupname=systems&username=dev    at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.executeCrowdServiceMethod(RestExecutor.java:455)
          at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.doesExist(RestExecutor.java:374)
          at com.atlassian.crowd.integration.rest.service.RestCrowdClient.isUserDirectGroupMember(RestCrowdClient.java:384)
          at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:187)
          at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:138)
          at de.theit.jenkins.crowd.CrowdAuthenticationManager.authenticate(CrowdAuthenticationManager.java:116)
      

      The exception is not handled correctly, so the plugin even does not try to check if dev is a member of developers group after.

      Since, the exception is thrown by Client Integration Client of v2.7.1 I tried to rebuild the plugin against v2.8.3, however it did not help.

      Posted in StackOverflow as well: https://stackoverflow.com/questions/47136248/crowd2-jenkins-plugin-crashes-if-user-not-found

        Attachments

          Activity

          cyril Cyril Burd created issue -
          cyril Cyril Burd made changes -
          Field Original Value New Value
          Description I am trying to configure groups support in Crowd2 plugin for Jenkins.

          Let's say we have two groups in our JIRA: _systems_ and _developers_. As stated in documentation, I put both in 'Restrict Groups' section, separated by commas: _systems,developers_ . It works if user _sys_ (a member of _systems_ group) is trying to login and does not work if user _dev_ (a member of _developers_ group). If I change the order and put _developers,systems_, then _dev_ can login and _sys_cannot. The problem is that JIRA Crowd2 API returns 404 when the plugin asks if user _dev_ is a member of _systems_ (and he is not):

          and the exceptions is thrown:
          {code:java}
          Checking group membership for user 'dev' and group 'systems'...
          Nov 06, 2017 11:15:58 AM SEVERE de.theit.jenkins.crowd.CrowdConfigurationService isGroupMember
          The connection check failed.
          com.atlassian.crowd.exception.InvalidCrowdServiceException: The following URL does not specify a valid Crowd User Management REST service: https://myjira.net/rest/usermanagement/1/group/user/direct?groupname=systems&username=dev at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.executeCrowdServiceMethod(RestExecutor.java:455)
              at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.doesExist(RestExecutor.java:374)
              at com.atlassian.crowd.integration.rest.service.RestCrowdClient.isUserDirectGroupMember(RestCrowdClient.java:384)
              at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:187)
              at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:138)
              at de.theit.jenkins.crowd.CrowdAuthenticationManager.authenticate(CrowdAuthenticationManager.java:116)
          {code}
          The exception is not handled correctly, so the plugin even does not try to check if _dev_ is a member of _developers_ group after.

          Since, the exception is thrown by *[Client Integration Client|https://mvnrepository.com/artifact/com.atlassian.crowd/crowd-integration-client-rest]* of v2.7.1 I tried to rebuild the plugin against v2.8.3, however it did not help.

          Posted in StackOverflow as well: https://stackoverflow.com/questions/47136248/crowd2-jenkins-plugin-crashes-if-user-not-found
          I am trying to configure groups support in Crowd2 plugin for Jenkins.

          Let's say we have two groups in our JIRA: _systems_ and _developers_. As stated in documentation, I put both in 'Restrict Groups' section, separated by commas: _systems,developers_ . It works if user _sys_ (a member of _systems_ group) is trying to login and does not work if user _dev_ (a member of _developers_ group). If I change the order and put _developers,systems_, then _dev_ can login and _sys_ cannot_._ The problem is that JIRA Crowd2 API returns 404 when the plugin asks if user _dev_ is a member of _systems_ (and he is not):

          and the exceptions is thrown:
          {code:java}
          Checking group membership for user 'dev' and group 'systems'...
          Nov 06, 2017 11:15:58 AM SEVERE de.theit.jenkins.crowd.CrowdConfigurationService isGroupMember
          The connection check failed.
          com.atlassian.crowd.exception.InvalidCrowdServiceException: The following URL does not specify a valid Crowd User Management REST service: https://myjira.net/rest/usermanagement/1/group/user/direct?groupname=systems&username=dev at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.executeCrowdServiceMethod(RestExecutor.java:455)
              at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.doesExist(RestExecutor.java:374)
              at com.atlassian.crowd.integration.rest.service.RestCrowdClient.isUserDirectGroupMember(RestCrowdClient.java:384)
              at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:187)
              at de.theit.jenkins.crowd.CrowdConfigurationService.isGroupMember(CrowdConfigurationService.java:138)
              at de.theit.jenkins.crowd.CrowdAuthenticationManager.authenticate(CrowdAuthenticationManager.java:116)
          {code}
          The exception is not handled correctly, so the plugin even does not try to check if _dev_ is a member of _developers_ group after.

          Since, the exception is thrown by *[Client Integration Client|https://mvnrepository.com/artifact/com.atlassian.crowd/crowd-integration-client-rest]* of v2.7.1 I tried to rebuild the plugin against v2.8.3, however it did not help.

          Posted in StackOverflow as well: [https://stackoverflow.com/questions/47136248/crowd2-jenkins-plugin-crashes-if-user-not-found]
          oleg_nenashev Oleg Nenashev made changes -
          Assignee Kanstantsin Shautsou [ integer ]
          gmshake Zhenlei Huang made changes -
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Resolved [ 5 ]
          pingunaut Martin Spielmann made changes -
          Assignee Martin Spielmann [ pingunaut ]
          pingunaut Martin Spielmann made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            Assignee:
            pingunaut Martin Spielmann
            Reporter:
            cyril Cyril Burd
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: