Security Realm

The security realm is an abstract notion that defines a set of users and provides a way to authenticate them. It is defined by the following interface.

package com.sssw.jbroker.api.security; 
  
import java.util.Properties; 
  
import org.omg.CORBA.ORB; 
  
public interface Realm
{ 
    /** 
     * Authenticate the given principal using the provided pass phrase. If 
     * authentication succeeds, return true. Otherwise, return false. 
     */ 
    boolean authenticateBasic(String principal, byte[] passPhrase); 
  
    /** 
     * Authenticate the given principal using the provided digest and 
     * nonce. The digest is an MD5 hash of {MD5 hash of the realm name, 
     * principal, and the pass phrase}, and the nonce. If authentication 
     * succeeds, return true. Otherwise, return false. 
     */ 
    boolean authenticateDigest(String principal, byte[] digest, byte[] nonce); 
  
    /** 
     * The realm implementation is specified as a properties file, where the 
     * name of the realm is the name of the properties file. The properties 
     * file can provide other properties to initialize the realm. 
     * 
     * When a realm is loaded by the ORB, it calls a null constructor on it 
     * and then calls the initialize method. The contents of the properties 
     * file is realm implementation specific. 
     */ 
    void initialize(Properties props, ORB orb); 
}

A realms can be provided by an application and registered with the ORB (see Writing a custom Security Realm.) It can directly manage a list of users and provide authentication support, or delegate the functionality to some other service like the LDAP server, NIS/NIS+, database, etc.



Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.