Glassfish authentication : can the realm be an external database -
I'm completely new to login and authentication concepts. I am working on a glassfish web application which should present general content to any visitor, and the registered user will be logged in with some additional content username and password.
I'm reading Java EE tutorial about security, and I thought form-based or HTTP authentication would satisfy my needs (for the credentials of the visitor while trying to browse a protected content Is called).
However, my first estimate was that the registered user should be stored in security of an application server in the glassfish in an external database with its hashed and salty password, manually defining users and groups To determine and determine them for roles in the application).
Did I misunderstand security at the glassfish? What is the intention? Or can there be an external database outside of the Apple server? Any link for documentation on this topic will be useful to me
Thank you in advance
Tick
This is actually possible in the glassfish, go to the configuration / security / places, create a new area, and classname to com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm set on. Point to the JDBC resource attached to the database, and tell the table and the column where the username / password is stored. The database will also include a table for those groups for which the user should be given access. Notify them also.
In the app, set web.xml and sun-web.xml as usual with realm names.
Comments
Post a Comment