Is Windows Authentication supported on Confluence 4?

Is connecting to Sql Server using windows integrated authentication supported on Confluence 4.0.3?

Looks to me like it's not, but I wanted to verify. I'm trying to avoid storing passwords on disk

2 answers

1 accepted

It depends on the database driver you use. I believe the bundled jTDS drivers do support windows integrated auth, but if not you could replace them with eg the DataDirect drivers if you have a licence for them, which definitely support that.

Just googled and found

I have a dim recollection that if the server is on unix then you may need something other than jTDS, but I don't even think that's true now.

Unix boxes happily use jTDS to hook up to MS-SQL databases. In my experience, jTDS drivers are a lot more stable and faster than Microsoft's own drivers. Even on Window servers, which was a bit of a surprise.

Oh sure, I wasn't clear at all. I meant "on unix you might have to use something other than jTDS to do windows integrated auth", and perhaps only when the unix machine is not hooked up to the AD domain.

Ah, I misunderstood. They work fine with AD in my experience (assuming you're on a reliable AD server, which became a problem where I first ran into it). I'm not sure how they handle outside AD beyond a basic username/password setup

I should have been more clear myself, I run Windows and Active Directory.

The thing is, it doesn't seem like Confluence itself supports it. It doesn't let me get past the configuration screen without a username and password. I know JIRA had this problem as well, in 4.2.3, I was able to use jTDS drivers with integrated security no problem. In JIRA 4.4, it broke, complaining that a username / password was required. And the error message wasn't produced by the driver, it was produced by Atlassian code, which suggest to me that Atlassian stopped supporting integrated security even though the underlying driver does. So I'm suspecting that's the case here with Confluence as well- unless I want to modify their code, I probably need to use Sql accounts.

OK, I get you. For in the initial setup use a username/password. All this does is write a file <jira-home>/dbconfig.xml. You can then shut jira down and modify this file yourself, and restart it. If you make a mistake jira won't start then just shut it down and have another go. It goes without saying to take a backup.

You're talking about confluence so substitue confluence-home for jira-home, also the file might be called something different, like confluence.cfg, but you will recognise it.

You're correct, it was confluence.cfg.xml in Confluence home. I did test updating the config file with JIRA 4.4.1, and it still didn't work (got an error from Atlassian code saying username was required). However, integrated security appears to be working with Confluence. I haven't been able to fully test yet because I have to go to the DBA team to create a temporary sql user to do the initial setup ... sigh ...

Thanks everyone for the help!

With jira at any rate you can write the file first, then you don't get prompted with the initial database stuff. Might be the same for confluence.

Seeing as you have generously given me some points, could you now go the whole hog and mark my question as correct? ;-)

I wasn't going to leave you hanging. Just waiting until I could do a full test - it worked! For anyone else reading this, the solution was to:

  • use a sql account to set up the database connection
  • edit <confluence-home>/confluence.cfg.xml, completely remove the username and password elements
  • put ntlmauth.dll from the jTDS distrubtion into the <confluence install>/Confluence/bin directory.
  • Set Confluence to run as an account that has access to the database
  • Restart Confluence

But FYI, I still don't think JIRA works, like I said, it used to work back in 4.2.3, and it doesn't appear to work anymore in 4.4 (I think it breaks before it even gets down to the jTDS level). I opened an issue with atlassian at for that issue.

Thanks to everyone again. I'd give out more points if I could :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

792 views 33 5
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