Skip navigation links

Oracle Containers for J2EE Security Java API Reference
10g Release 3 (10.1.3.1.0)

B32115-01


oracle.security.jazn
Class JAZNConfig

java.lang.Object
  extended byoracle.security.jazn.JAZNConfig


public class JAZNConfig
extends java.lang.Object

This class represents a <jazn> Configuration instance. <p/> Multiple JAZNConfig instances can be active in the same JVM process simultaneously, thus allowing for JAZN-XML and JAZN-LDAP to coexist in the same JVM. <p/> Note: Due to the design limitation of the Java2/JAAS security architecture, only 1 security provider can be active at any point in one JVM instance. Thus it would be impossible to have multiple active JAZNConfig instances when Java2/JAAS is enabled in the JVM.


Field Summary
static int JAAS_MODE_DOAS
           
static int JAAS_MODE_DOAS_PRIVILEGED
           
static int JAAS_MODE_NULL
           

 

Constructor Summary
JAZNConfig(org.w3c.dom.Node node)
          Creates a new JAZNConfig instance from the DOM node.
JAZNConfig(java.util.Properties props)
          Creates a new JAZNConfig instance from the given properties.
JAZNConfig(java.lang.String configFile)
          Creates a new JAZNConfig instance using the specified file.

 

Method Summary
 boolean expandProperties()
          Returns true if properties are expanded by default
 java.lang.ClassLoader getClassLoader()
          Returns the JAZN class loader
 java.lang.String getDefaultRealm()
          Returns the default realm
 JAZNConfig getDelegate()
          Returns the delegate JAZNConfig object.
 java.net.URL getDeploymentURL()
          Returns the deployment URL
static JAZNConfig getHomeInstanceXMLConfig()
          Returns the JAZNConfig that points to $OH/j2ee/home/config/system-jazn-data.xml
 int getJaasMode()
          Returns the JAAS mode value
static JAZNConfig getJAZNConfig()
           
 oracle.security.jazn.spi.JAZNProvider getJAZNProvider()
          Returns the JAZN provider associated with this object.
 java.lang.String getLocationPath()
          Returns the location path
 java.net.URL getLocationURL()
          Returns the location URL.
 LoginModuleManager getLoginModuleManager()
          Returns the LoginModuleManager object.
static JAZNConfig getOC4JInstanceConfig()
          Returns the OC4J instance-specific JAZNConfig instance This usually refers to $OH/j2ee/<instance>/config/jazn.xml
static JAZNConfig getOC4JInstanceXMLConfig()
          Returns the JAZNConfig that points to $OH/j2ee/<instance>/config/system-jazn-data.xml
 PermissionClassManager getPermissionClassManager()
          Returns the PermissionClassManager object.
 int getPersistenceMode()
          Returns the JAZN-level persistence mode.
 JAZNPolicy getPolicy()
          Returns the installed JAZNPolicy object.
 PolicyManager getPolicyManager()
          Returns the PolicyManager object.
 PrincipalClassManager getPrincipalClassManager()
          Returns the PrincipalClassManager object.
 java.util.Properties getProperties()
           
 java.util.Properties getPropertiesCopy()
           
 java.lang.String getProperty(java.lang.String key)
          Gets a JAZN property value <p/> This method first calls SecurityManager.checkPermission with JAZNPermission("getProperty."+key) to ensure the caller has permission to retrive the JAZN property value.
 java.lang.String getProperty(java.lang.String key, boolean delegate)
           
 java.lang.String getProviderType()
          Returns the provider type
 RealmManager getRealmManager()
          Returns the RealmManager object.
 java.lang.String getSecurityProviderClassName()
          Get the name of the callback class for the current instance of JAZNConfig
 JAZNConfig getSecurityProviderJAZNConfig()
           
static JAZNConfig getXMLConfig(java.lang.String jaznDataPath)
          Returns the JAZNConfig that points to the specified jazn-data.xml
static java.util.Properties parseJAZNConfig(org.w3c.dom.Node node)
          Given a DOM node representing the <jazn> element, return the parsed properties.
 void persist()
          Serializes the content of the JAZNConfig instance.
 void removeProperty(java.lang.String key)
           
static void setJAASLoginConfigProvider(boolean force)
          Set JAZN as JAAS login configuration provider
static void setJAASPolicyProvider(boolean force)
          Set JAZN as JAAS policy provider
static void setJAZNConfigSystemProperty(java.io.File configDir)
          Set JAZN system property based on the configuration directory to support OC4J "-config" command-line directive
 void setProperty(java.lang.String key, java.lang.String value)
           
static void setSecurityProperties()
           
static void setSecurityProperties(boolean force)
          Set security properties for JAZN
 void setSecurityProviderJAZNConfig(JAZNConfig jaznConfig)
           
 java.lang.String toString()
           
 void writeXML(int indentation, java.io.Writer writer)
          Serializes the content of this JAZNConfig instance to the specified writer.
 void writeXML(int indentation, java.io.Writer writer, boolean xmlns)
          Serializes the content of this JAZNConfig instance to the specified writer.
 void writeXML(java.io.Writer writer)
          Serializes the content of this JAZNConfig instance to the specified writer.
 void writeXML(java.io.Writer writer, boolean xmlns)
          Serializes the content of this JAZNConfig instance to the specified writer.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

JAAS_MODE_NULL

public static int JAAS_MODE_NULL

JAAS_MODE_DOAS

public static int JAAS_MODE_DOAS

JAAS_MODE_DOAS_PRIVILEGED

public static int JAAS_MODE_DOAS_PRIVILEGED

Constructor Detail

JAZNConfig

public JAZNConfig(java.lang.String configFile)
Creates a new JAZNConfig instance using the specified file.
Parameters:
configFile - the file from which the JAZNConfig instance is instantiated.

JAZNConfig

public JAZNConfig(java.util.Properties props)
Creates a new JAZNConfig instance from the given properties.
Parameters:
props - the properties from which to instantiate a new JAZNConfig instance.

JAZNConfig

public JAZNConfig(org.w3c.dom.Node node)
Creates a new JAZNConfig instance from the DOM node.
Parameters:
node - the DOM node from which the new JAZNConfig is to be instantiated

Method Detail

getProviderType

public java.lang.String getProviderType()
Returns the provider type
Returns:
the provider type

getJaasMode

public int getJaasMode()
Returns the JAAS mode value
Returns:
jaas mode

getDeploymentURL

public java.net.URL getDeploymentURL()
Returns the deployment URL
Returns:
the deployment URL

getLocationPath

public java.lang.String getLocationPath()
Returns the location path
Returns:
the location path

getLocationURL

public java.net.URL getLocationURL()
Returns the location URL.
Returns:
the location URL.

getDefaultRealm

public java.lang.String getDefaultRealm()
Returns the default realm
Returns:
the default realm

getPersistenceMode

public int getPersistenceMode()
Returns the JAZN-level persistence mode. <p/> Note that this may be overridden by component-level persistence mode settings.
Returns:
the JAZN-level persistence mode

getDelegate

public JAZNConfig getDelegate()
Returns the delegate JAZNConfig object.
Returns:
the delegate JAZNConfig object.

expandProperties

public final boolean expandProperties()
Returns true if properties are expanded by default
Returns:
true if properties are expanded by default

getProperties

public java.util.Properties getProperties()

getPropertiesCopy

public java.util.Properties getPropertiesCopy()

getSecurityProviderClassName

public java.lang.String getSecurityProviderClassName()
Get the name of the callback class for the current instance of JAZNConfig
Returns:
the full class name of the security provider class

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns the JAZN class loader
Returns:
the JAZN class loader

getJAZNProvider

public oracle.security.jazn.spi.JAZNProvider getJAZNProvider()
Returns the JAZN provider associated with this object.
Returns:
the JAZN provider associated with this object.

getLoginModuleManager

public LoginModuleManager getLoginModuleManager()
Returns the LoginModuleManager object. <p/> This method first calls SecurityManager.checkPermission with JAZNPermission("getLoginModuleManager") to ensure that the caller has permission to get the LoginModuleManager object.
Returns:
the LoginModuleManager object.
Throws:
java.lang.SecurityException - if the caller does not have permission to invoke this method

getRealmManager

public RealmManager getRealmManager()
Returns the RealmManager object. <p/> This method first calls SecurityManager.checkPermission with JAZNPermission("getRealmManager") to ensure that the caller has permission to get the RealmManager object.
Returns:
the RealmManager object.
Throws:
java.lang.SecurityException - if the caller does not have permission to invoke this method

getPolicyManager

public PolicyManager getPolicyManager()
Returns the PolicyManager object.

getPermissionClassManager

public PermissionClassManager getPermissionClassManager()
Returns the PermissionClassManager object.

getPrincipalClassManager

public PrincipalClassManager getPrincipalClassManager()
Returns the PrincipalClassManager object.

getPolicy

public JAZNPolicy getPolicy()
Returns the installed JAZNPolicy object. <p/> This method first calls SecurityManager.checkPermission with JAZNPermission("getPolicy") to ensure that the caller has permission to get the RealmManager object.
Returns:
the installed JAZNPolicy object.
Throws:
java.lang.SecurityException - if the caller does not have permission to invoke this method

getProperty

public java.lang.String getProperty(java.lang.String key)
Gets a JAZN property value <p/> This method first calls SecurityManager.checkPermission with JAZNPermission("getProperty."+key) to ensure the caller has permission to retrive the JAZN property value.
Parameters:
key - the key of the property being retrieved
Returns:
the value associated with the specified key
Throws:
java.lang.SecurityException - if the caller does not have permission to invoke this method

getProperty

public java.lang.String getProperty(java.lang.String key,
                                    boolean delegate)

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)

removeProperty

public void removeProperty(java.lang.String key)

parseJAZNConfig

public static java.util.Properties parseJAZNConfig(org.w3c.dom.Node node)
Given a DOM node representing the <jazn> element, return the parsed properties.
Parameters:
node - the DOM node representing the <jazn> element.
Returns:
the parsed properties

persist

public void persist()
             throws JAZNException
Serializes the content of the JAZNConfig instance.
Throws:
JAZNException

writeXML

public void writeXML(java.io.Writer writer)
              throws java.io.IOException
Serializes the content of this JAZNConfig instance to the specified writer. The XML namespace will not be written.
Parameters:
writer - the specified writer
Throws:
java.io.IOException

writeXML

public void writeXML(java.io.Writer writer,
                     boolean xmlns)
              throws java.io.IOException
Serializes the content of this JAZNConfig instance to the specified writer.
Parameters:
writer - the specified writer
xmlns - true if XML namespace is to be written, false otherwise
Throws:
java.io.IOException

writeXML

public void writeXML(int indentation,
                     java.io.Writer writer)
              throws java.io.IOException
Serializes the content of this JAZNConfig instance to the specified writer. The XML namespace will not be written.
Parameters:
indentation - the indentation level
writer - the specified writer
Throws:
java.io.IOException

writeXML

public void writeXML(int indentation,
                     java.io.Writer writer,
                     boolean xmlns)
              throws java.io.IOException
Serializes the content of this JAZNConfig instance to the specified writer. The XML namespace will not be written.
Parameters:
indentation - the indentation level
writer - the specified writer
xmlns - true if XML namespace is to be written, false otherwise
Throws:
java.io.IOException

toString

public java.lang.String toString()

getXMLConfig

public static JAZNConfig getXMLConfig(java.lang.String jaznDataPath)
Returns the JAZNConfig that points to the specified jazn-data.xml

getHomeInstanceXMLConfig

public static JAZNConfig getHomeInstanceXMLConfig()
Returns the JAZNConfig that points to $OH/j2ee/home/config/system-jazn-data.xml
Returns:
the JAZNConfig that points to $OH/j2ee/home/config/system-jazn-data.xml
Throws:
JAZNInitException - if an error occurs during initialization

getOC4JInstanceXMLConfig

public static JAZNConfig getOC4JInstanceXMLConfig()
Returns the JAZNConfig that points to $OH/j2ee/<instance>/config/system-jazn-data.xml
Returns:
the JAZNConfig that points to $OH/j2ee/<instance>/config/system-jazn-data.xml
Throws:
JAZNInitException - if an error occurs during initialization

getOC4JInstanceConfig

public static JAZNConfig getOC4JInstanceConfig()
Returns the OC4J instance-specific JAZNConfig instance This usually refers to $OH/j2ee/<instance>/config/jazn.xml

getJAZNConfig

public static final JAZNConfig getJAZNConfig()

setJAASLoginConfigProvider

public static void setJAASLoginConfigProvider(boolean force)
Set JAZN as JAAS login configuration provider

setJAASPolicyProvider

public static void setJAASPolicyProvider(boolean force)
Set JAZN as JAAS policy provider

setSecurityProperties

public static void setSecurityProperties(boolean force)
Set security properties for JAZN
Parameters:
force - if set to true, will set JAZN as both JAAS login configuration provider and policy provider (via security properties), regardless of whether the relevant security properties are already set

setSecurityProperties

public static void setSecurityProperties()

setJAZNConfigSystemProperty

public static void setJAZNConfigSystemProperty(java.io.File configDir)
Set JAZN system property based on the configuration directory to support OC4J "-config" command-line directive

getSecurityProviderJAZNConfig

public final JAZNConfig getSecurityProviderJAZNConfig()

setSecurityProviderJAZNConfig

public final void setSecurityProviderJAZNConfig(JAZNConfig jaznConfig)

Skip navigation links

Oracle Containers for J2EE Security Java API Reference
10g Release 3 (10.1.3.1.0)

B32115-01


Copyright © 2004, 2006, Oracle. All rights reserved.