![]() |
|||
| Contents | / Index | / Glossary | / AdminTool Help |
Realms are security abstractions that control access to the resources served by the Java Web Server. Java Web Server ships with the following realms: certificateRealm, defaultRealm, servletMgrRealm, and UNIXRealm or NTRealm. This document is meant for developers who wish to create their own realm.
This document only deals with the authentication systems that are passphrase based. Developing realms that are not passphrase based is very similar.
Developing custom realms for the Java Web Server involves the following:
Once you restart the Java Web Server, all the realms stored within the
realms/ directory will be recognized. You can then use
Administration Tool
to administer your custom realm just as you do the default realms.
That includes defining resources protected by the realm and setting
permissions in the access control list for the realm.
The steps for creating a custom realm are discussed in greater detail in the remainder of this document.
Core APIs that are needed to develop custom realms are included within the Java Web Server. These APIs are independent of how and where Users, Groups and ACLs are stored. So, you can implement a custom realm that stores the Users and Groups within a database and ACLs within files. Or, you can store ACLs within a database, and store Users and Groups within flat files.
Subclass the class com.sun.server.realm.Realm and override the following methods:
server_root/lib/jws.jar in your classpath,
then compile these classes.The User class stores some profile data and supports an authentication scheme.
The configuration file tells the Java Web Server how to find the realm.
server-root/realms
create a file with the name of your custom realm. There must be
two entries within this file. (For an example, please see a file
called defaultRealm within the server-root/realms
directory) The entries are:
server-root/realms/data/.
Top
java-server-feedback@java.sun.com
|
Copyright © 1999
Sun Microsystems, Inc. All Rights Reserved. |