Access to the security area in the glass planet from the application

I am using Glassfish 4.1 application server for a web application. Authentication / authorization of web applications is performed using the ldap area for glass fish. Therefore, I do not need to implement and configure the ldap connection in my application, but in a glass fish container. It's good!

Now I need to implement the login method with username / password in my application (WebService). Parameters are passed in a SOAP request. I want to access another configured ldap kingdom from glass fish and give it a username / password. As a result, I want to find out if the user is allowed.

How can I access the security area of ​​the application server from the application and complete the login request?

+4
source share
1 answer

AFAIK it is not possible to access the area directly, but Glassfish has (non-portable) software authentication through com.sun.appserv.security.ProgrammaticLogin( https://docs.oracle.com/cd/E18930_01/html/821-2418/beacm.html ). For Glassfish 4 cm. Also programmatically log on to Glassfish 4 .

+2
source

Source: https://habr.com/ru/post/1615415/


All Articles