Unable to create JIRA User Directory in Confluence due to ApplicationPermissionException - Forbidden (403)
Problem
When trying to integrate Confluence to JIRA for user management as described at Connecting to Crowd or Jira for User Management, it fails with the following error thrown in atlassian-confluence.log
:
2013-02-03 06:18:31,242 ERROR [http-8090-5] [crowd.embedded.admin.ConfigurationController] onSubmit Configuration test failed for user directory: [ JIRA Server], type: [ CROWD ]
-- referer: https://foobar/plugins/servlet/embedded-crowd/configure/jira/?xsrfTokenName=atl_token&xsrfTokenValue=e5b111a54134defb36bfd64d2569d5734ef7fb72 | url: /plugins/servlet/embedded-crowd/configure/jira/ | userName: confadmin
com.atlassian.crowd.exception.runtime.OperationFailedException: com.atlassian.crowd.exception.ApplicationPermissionException: <!DOCTYPE html>
<html>
<head>
<title>Forbidden (403)</title>
<---- Huge chunk of HTML source code here ---->
</body>
</html>
at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.testConnection(CrowdDirectoryServiceImpl.java:78)
.....
Caused by: com.atlassian.crowd.exception.ApplicationPermissionException: <!DOCTYPE html>
<html>
<head>
<title>Forbidden (403)</title>
<---- Huge chunk of HTML source code here ---->
</body>
</html>
at com.atlassian.crowd.integration.rest.service.RestExecutor.throwError(RestExecutor.java:458)
at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:312)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchUsers(RestCrowdClient.java:494)
at com.atlassian.crowd.integration.rest.service.RestCrowdClient.testConnection(RestCrowdClient.java:483)
at com.atlassian.crowd.directory.RemoteCrowdDirectory.testConnection(RemoteCrowdDirectory.java:696)
at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.testConnection(CrowdDirectoryServiceImpl.java:69)
... 185 more
Cause
Confluence server could not connect or access to JIRA server. This typically occurs when JIRA has not whitelisted the Confluence server or IP address, despite both of them located within the same server. There could also be a proxy or firewall that blocks such access from Confluence to JIRA.
Resolution
- Ensure that Confluence server URL (or IP address) has been added to JIRA User Server or whitelist settings
Configure any proxy or firewall that might block such access. You might want to follow this method Configuring Web Proxy Support for Confluence.