users@glassfish.java.net

Create dynamic users in sun-web.xml

From: <glassfish_at_javadesktop.org>
Date: Thu, 20 Nov 2008 06:23:29 PST

My application allows the admin users to create new guestuser at runtime by making entry in the database realm table. So I can dynamically add new users and delete users. But there is a problem.

Whenever I am creating a new user from my web application I have to make
entry in sun-web.xml
<security-role-mapping>
<role-name>guest</role-name>
<principal-name> newly_added_user_name </principal-name>
</security-role-mapping>
and then restart the glassfish or else the application throws an error : HTTP Status 403 - Access to the requested resource has been denied.
It doesn't identifies the user.

My application has the functionality to create dynamic users and I need to have it in Glassfish. Please help
[Message sent by forum member 'mrugerio' (mrugerio)]

http://forums.java.net/jive/thread.jspa?messageID=317859