-
Bug
-
Resolution: Not A Defect
-
Major
-
Jenkins v2.73.1
JIRA 7.1.7
Crowd2 plugin 1.8
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