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

2 votes

Start with https://bitbucket.org/jaysee00/example-confluence-sso-authenticator/.

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:

https://marketplace.atlassian.com/plugins/shibauth.confluence.authentication.shibboleth

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

Regards,

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.


Example:
http://localhost:8888/dashboard.action?os_username=admin&os_password=12345
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.

Regards,

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

346 views 20 10
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