Used Apache HTTP's authenticated user

St__Wissel October 7, 2012

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
Answer accepted
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2013

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.

tomgross February 8, 2019

The link is dead.

1 vote
CelsoA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2013

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,

St__Wissel September 4, 2013

Looks promising. I'll check it out

0 votes
CelsoA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2013

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,

St__Wissel September 1, 2013

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.

0 votes
Bruna Griebeler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2012

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! :)

St__Wissel October 7, 2012

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events