users@glassfish.java.net

Re: User Management API

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Mon, 15 May 2006 07:40:16 -0700

Thakara,

User Management for GlassFish as of now is limited to the authentication
realm you choose. By default, the realm for the GlassFish users (i.e.
the users of the applications deployed to GlassFish server and
the administrative users who would manage GlassFish server itself) is
the so-called File Realm. The users, groups and the *one way secure
hash passwords* is stored in a file. Out of the box these files are
called
domain-dir/config/keyfile
domain-dir/config/admin-keyfile.

The user management support is available only when you choose to have
your users in this realm. If you choose to have a realm like Solaris
Realm or LDAP realm where your credential database is managed by
some other entity, GlassFish can not manage the users.

As long as you are OK with the file realm, you could use:
- asadmin, the commands being create-file-user, delete-file-user,
   update-file-user etc.
- AMX to do the same stuff programmatically -- see:
https://glassfish.dev.java.net/source/browse/*checkout*/glassfish/www/javaee5/amx/javadoc/com/sun/appserv/management/config/AuthRealmConfig.html

   this is available from:
   https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/index.html

Hope this helps.

Regards,
Kedar

Tharaka Abeywickrama wrote:
> Hi,
>
> As you may guess from this post, I'm kind of new to the Java EE (and
> J2EE) paradigm.
>
> Can someone point me to the API for creating and managing users/roles
> programatically? In other words the user management API.
>
>
> Thanks in advance
> Tharaka