Apache Lounge


About Forum Index Downloads Search Register Log in  RSS Apache Lounge  

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.

Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Principal object null after authentication

Joined: 26 May 2016
Posts: 2
Location: Pune, India

PostPosted: Fri 21 Jun '19 9:00    Post subject: Principal object null after authentication Reply with quote

I am trying to set up IBM HTTP Server 8.5 as a front and a web application in Geronimo (geronimo-tomcat6-javaee5-2.1.4) as the backend. IHS handles user authentication and then forwards the request to Geronimo.

Here is my httpd.conf :


AuthType Basic
AuthBasicProvider ldap

AuthLDAPUrl ldap://xxxx:389/ou=bluepages,o=abc.com?mail,cn,dept
AuthzLDAPAuthoritative off
Require ldap-group cn=test_bit,ou=memberlist,ou=ibmgroups,o=abc.com

RequestHeader set DEPARTMENT %{AUTHENTICATE_dept}e
ProxyPass http://localhost:8080/principal/hello

There is no HTTPS, no SSL. The authentication works perfectly and my servlet in localhost:8080/principal/hello is called.

The problem I am facing is although i get all the header data that has been set using RequestHeader, I am not getting the Principal object.

request.getUserPrincipal() returns null.

Is SSL/HTTPS must to get the Principal object ? Any additional configuration needs to be done in httpd.conf to populate the Principal object ?

Thanks for your help in advance.
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6921
Location: Germany, Next to Hamburg

PostPosted: Tue 09 Feb '21 20:59    Post subject: Reply with quote

Creating and configuring custom JAAS login module solves problem. See Listing 4

Back to top

Reply to topic   Topic: Principal object null after authentication View previous topic :: View next topic
Post new topic   Forum Index -> Apache