Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Administration Guide

- Previous: Creating the solaris Realm
- Next: Editing the certificate Realm

## To create a custom realm

1. Follow the procedure outline in To create a realm, entering the name of the custom realm and the name of the `LoginModule` class.

   Any unique name can be used for the custom realm, for example `myCustomRealm`.

2. Add the properties for a custom realm shown in the following table.

   Property Name | Property Value
   --- | ---
   jaas-context | `LoginModule` class name, for example `simpleCustomRealm`
   auth-type | Description of the realm, for example “A simple example custom realm”.

3. Click OK.

4. Edit the domain's login configuration file, domain-dir`/config/login.conf`, and add the fully-qualified class name of the JAAS `LoginModule` at the end of the file, as follows:

       realmName {
           fully-qualified-LoginModule-classname required;
       };

   For example,

       myCustomRealm {
           com.foo.bar.security.customrealm.simpleCustomLoginModule required;
       };

5. Copy the `LoginModule` class and all dependent classes into the directory domain-dir`/lib/classes`.

6. Restart the Server if Restart Required displays in the console.

7. Make sure that the realm is properly loaded.

   Check domain-dir`/logs/server.log` to make sure the server loaded the realm. The server should invoke the realm’s `init()` method.

- Previous: Creating the solaris Realm
- Next: Editing the certificate Realm

- © 2010, Oracle Corporation and/or its affiliates