Authentication broken for Crowd or JIRA users
Symptoms
You have delegated Bamboo user management to either Crowd or JIRA and after performing upgrade or migration of JIRA/Crowd, no user is able to login.
The atlassian-bamboo.log
shows the following:
Caused by: com.atlassian.crowd.exception.InvalidAuthenticationException: Application failed to authenticate
at com.atlassian.crowd.integration.rest.service.RestExecutor.throwError(RestExecutor.java:457)
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:307)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchGroupNames(RestCrowdClient.java:545)
at com.atlassian.crowd.integration.atlassianuser.UserGroupFetcher.fetch(UserGroupFetcher.java:38)
at com.atlassian.crowd.integration.atlassianuser.UserGroupCache.fetchAndSetSnapshot(UserGroupCache.java:87)
... 7 more
2013-01-25 19:26:26,275 INFO [QuartzScheduler_Worker-4] [AuthChallengeProcessor] basic authentication scheme selected
2013-01-25 19:26:26,276 INFO [QuartzScheduler_Worker-4] [HttpMethodDirector] Failure authenticating with BASIC 'Crowd REST Service'@xxxx:8080
2013-01-25 19:26:26,276 WARN [QuartzScheduler_Worker-4] [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
2013-01-25 19:26:26,276 WARN [QuartzScheduler_Worker-4] [CrowdClientControl] Failed to refresh the user and group cache
com.atlassian.user.EntityException: com.atlassian.crowd.exception.InvalidAuthenticationException: Application failed to authenticate
at com.atlassian.crowd.integration.atlassianuser.UserGroupCache.fetchAndSetSnapshot(UserGroupCache.java:107)
at com.atlassian.crowd.integration.atlassianuser.UserGroupCache.refreshCache(UserGroupCache.java:429)
at com.atlassian.crowd.integration.atlassianuser.UserGroupCache.refreshCacheIfNecessary(UserGroupCache.java:450)
at com.atlassian.crowd.integration.atlassianuser.CrowdClientControl.refreshCacheIfNecessary(CrowdClientControl.java:103)
at com.atlassian.bamboo.user.BambooUserRefreshJobScheduler$BambooUserRefreshJob.execute(BambooUserRefreshJobScheduler.java:73)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: com.atlassian.crowd.exception.InvalidAuthenticationException: Application failed to authenticate
at com.atlassian.crowd.integration.rest.service.RestExecutor.throwError(RestExecutor.java:457)
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:307)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchGroupNames(RestCrowdClient.java:545)
at com.atlassian.crowd.integration.atlassianuser.UserGroupFetcher.fetch(UserGroupFetcher.java:38)
at com.atlassian.crowd.integration.atlassianuser.UserGroupCache.fetchAndSetSnapshot(UserGroupCache.java:87)
Cause
This issue can happen if there are any changes in the Bamboo application created in JIRA/Crowd. For example, the Bamboo application created in JIRA or Crowd may have a wrong name, password or URL.
Resolution
Please follow these steps:
Go to JIRA user server page or step 2 of the Crowd integration page and change the password and or URL if there is any change
Navigate to Bamboo
$BAMBOOHOME/xml-data/configuration/crowd.properties
file and effect the changes you have made in step 1Restart Bamboo and you should be able to login with your JIRA or Crowd password.
There are some things you might also want to try if integrating with JIRA:
- Bamboo side:
- Make sure that the base URL is in host format. Localhost and/or ip address might not work.
- Create an additional user with admin rights, e.g.,
bamboo-user
.
- JIRA side:
- Create a group named as
bamboo-admin
. The syntax must be the same as in Bamboo. - Create the
bamboo-user
as a member ofbamboo-admin
andjira-users
. - Create the application link for Bamboo.
- Create a group named as
- Log in back in Bamboo as
bamboo-user
. - Link the user repository.
- If any user from JIRA needs to have admin rights they must be members in
bamboo-admin
group.
If you are still having problems, please contact support on https://support.atlassian.com attaching a zip of the BAMBOO_HOME/xml-data/configuration
folder, the server logs and the URL used in accessing Crowd/JIRA.