Used Apache HTTP's authenticated user

Confluence is part of a larger system. Users already login to the Apache Http WEB server to authenticate and see specific static pages. Is there a way I can propagate that identity to Confluence, so users don't need to login again?

4 answers

1 accepted

Start with

IIRC that sample code gets the user from a header request. It's a very minor change to get it to read the authenticated user name from the request.

We do it exactly the way you describe in your bullets, works fine. We only use mod_jk for the login page, but that's up to you.

Hi Wissel,

Mybe this plugin can help you to achieve what you need:

Could you please check it and let me know if it helps?


Looks promising. I'll check it out

Hello Stephan!

You can access Confluence using the variables os_username and os_password directly in the URL to login into Confluence.

When admin is the username and 12345 the password.

So you may use the username and password typed by the user - using Apache Authenticator - and with .htaccess file you can redirect the user to the proper URL.

Hope it helps! :)

Almost :-)

I do not have access to the authentication mechanism (that's a blackbox plug-in and it doesn't use a password), so the only thing I get is a user name. What would be my options?

Hi Stephan,

I think that Apache authentication can not be inherited by Confluence, as apache works only as a Proxy for Confluence and does not do any kind of operation in it.


Hi Celso,

I think differently. Here is theory how it could work:

  • Apache HTTP can require authentication for ANY URL
  • If nothing is done, the the user would get prompted twice: once for Apache http, once for confluence
  • Tomcat already can accept Apache authentication via mod_jk (AJP protocol)
  • Confluence has a Java API for authentication, that could be used to retrieve the actual Tomcat user

So it boils down to someone writing a sample (or does one exist already?) how to use the Tomcat user in Confluence. Doesn't sound like a bad usecase.

Then all variations of authentication (2 factor, OpenID and whathaveyou) can be delegated to either Tomcat or Apache.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

484 views 3 18
Read article

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