Setting up JIRA as user management for Confluence

This seems like it should be straight forward.

I've set up JIRA with an apache front end, so my <context path="JRA" ...=""/> in JIRA. It's accessible both at http://myserver.tld:8080/JRA and http://myvhost.tld/JRA. When setting up confluence, I want to use JIRA as my user repository (JIRA is using delegated LDAP w/internal directory).

I've tried all variations of JIRA URL's (virtual host, actual host, tomcat port, apache port ...) and I get the same error:

connection test failed: Response from Server:

com.atlassian.crowd.exception.InvalidAuthenticationException: Application failed to authenticate

I'm using the default admin credentials I set up when setting up JIRA for Application Name and Application Password, but no joy.

Any ideas?

4 answers

1 accepted

Hi there,

Sorry to hear you experiencing such issue on your instance. Judging from the provided information, it seems that the credential used by Confluence in order to access JIRA user management framework is incorrect.

As mentioned on this documentation, may I know if you have done the following steps

Go to your JIRA administration screen and define the Confluence application to JIRA:

  1. For JIRA 4.3.x, select 'Other Applications' from the 'Users, Groups & Roles' section of the 'Administration' menu.
  2. For JIRA 4.4 or later, select 'Users' > 'JIRA User Server' in Administration mode.
  3. Click 'Add Application'.
  4. Enter the application name and password that Confluence will use when accessing JIRA.
  5. Enter the IP address or addresses of your Confluence server. Valid values are:
    • A full IP address, e.g. 192.168.10.12.
    • A wildcard IP range, using CIDR notation, e.g. 192.168.10.1/16. For more information, see the introduction to CIDR notation on Wikipedia and RFC 4632.

6. Save the new application.

Could you please let us know if you have used the application named and password configure on step number three on Confluence side?

Again as mentioned earlier,

connection test failed: Response from Server:
com.atlassian.crowd.exception.InvalidAuthenticationException: Application failed to authenticate

The above error message means Confluence was able to access or ping JIRA server using the configured URL, however the application name and credential by the configured directory is not the same as the one configured on step 3 above.

Please ensure that the JIRA directory configured on Confluence side use the correct application name and credential to access JIRA user management framework.

Hope it helps.

Cheers,

Septa Cahyadiputra

2 years on, and it helped me! Thanks.

On a side note: I found an issue with the my servers hosts file resolving the FQDN to localhost/127.0.0.1 which created all sorts of app-linking problems for me (don't know where to put this for others). I was behind a reverse proxy, so needed the IP address of the proxy for the linking to work (host/nslookup tool worked to diagnose this for me).

I have a similar issue, now the only thing is, the documentation is no longer up-to-date for JIRA v 6.2 and Confluence 5.5. I cannot seem to find the "Add Application" link with the new User Management screen.

Can anyone from Atlassian answer this? Where can I add Confluence as an application in JIRA so that it can be used for user management? I have Application Links working and I am still getting the same error.

I posted a question here as well: https://confluence.atlassian.com/display/DOC/Connecting+to+Crowd+or+JIRA+for+User+Management#ConnectingtoCrowdorJIRAforUserManagement-ConnectingConfluencetoJIRAforUserManagement- and so far the documentation has not been updated.

Documentation still not updated for JIRA 7.1.

Currently, my problem is that the Save & Test button is greyed out.

Worked it out - you first need to set up the JIRA server that will be handling the user accounts

The documentation has it the wrong way round.

Hi Richard, I have Save&Test disabled as well. Seems like I have all set up on JIRA side. Could you please point out what you did to solve it?

Hi John, Thank you, this is really helpful info.

I have added the necessary group memberships in JIRA, but still no success.

Meanwhile I also figured out that the application name and password entry form may cause the issue as it can only be saved after a test cycle, however when the form reloads it changes the set password ...

I just looked up the entries in the DB (found it stored plain text ...), and updated manually here:

cwd_directory_attribute table, where attribute_name is application.password.

And finally it is working! Thanks again!

The version of Chrome I am using is doing the same thing - it switched the password field back to another value after every successful test, and it took me well over an _hour_ to figure this out. I had torn everything apart trying to figure out why it passed when I would click Test, but outside the settings box synchronizations would fail every time. Sigh. -Kelly G. Schoenhofen

Just went through the same thing with the latest chrome... Spent half a day trying to figure it out, resulting in a very unhappy customer. Time to switch back to mozilla I think!

HI Kelly\Daniel, I am having the same issue, can you please help how to resolve this. The test settings works, but post save and test, the synchronization fails as well as test.

My issue was my browser kept automatically putting wrong values in the Username & Password fields after every page refresh (such as after a successful test). Assuming that is your issue; set everything correctly, click Test, and if it worked, _set them again_ and click Save without testing, again. My browser kept screwing up the settings _after_ a successful test, and I wasn't noticing. (especially the password part - ****** looks the same as ******. Crazy, but true!)

Thanks Kelly, You are right, the browser changed it. I have manually edited the DB like suggested by Balazs. Now i am able to login. Thanks for your help.

I have a very similar issue with setting up both Stash and Confluence to use JIRA as the user database. I am running all services on different ports (under different Java VMs), and all are behind an apache reverse proxy forcing https with a valid certificate.

I have added the certificates to the JRE keystores.

I was able to set up the application links both in JIRA and in Stash and Confluence, tested the links from Stash and Confluence, both were working. So I changed the order of auth services in Confluence, logged out and tried log back in, but now I'm closed out.

With Stash I also cannot authenticate through the JIRA user base, I've got the following error: com.atlassian.crowd.exception.InvalidAuthenticationException: Application failed to authenticate

So now I'm stuck, and even cannot log in to Confluence.

Any help is really appreciated!

Hi Balazs Szekely, It will probably be pulling the users order correctly but the user won't be of the correct group. Try adding in jira groups a confluence-admin and adding an admin. You'll then need to restart the java VM for confluence to force a user database sync with jira. This happened to me too. Also note the if you have the same names local confluence user existing in jira, you can also delete the jira user, sync and then access confluence from the local confluence user. Note confluence syncs hourly unless forced to on restart or command. (Which you need to be logged in for). Good hunting. (Sent from iPhone please excuse errors) John

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

467 views 19 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you