com.waveset.object
Class LoginConfig

java.lang.Object
  extended bycom.waveset.object.PersistentObject
      extended bycom.waveset.object.LoginConfig
All Implemented Interfaces:
java.lang.Comparable, javax.naming.Referenceable, XmlObject

public class LoginConfig
extends PersistentObject

The LoginConfig class is the in memory representation of the LoginModule configuration information for each Waveset application A login configuration contains the following information. Note that this example only represents the default syntax for the Configuration. The Waveset LoginConfig class will implement the information using XML and store and retrieve it from the Waveset Repository. Application { Module Flag ModuleOptions; Module Flag ModuleOptions; Module Flag ModuleOptions; SubjectTimeout }; Application { Module Flag ModuleOptions; Module Flag ModuleOptions; SubjectTimeout }; other { Module Flag ModuleOptions; Module Flag ModuleOptions; SubjectTimeout }; Each entry in the Configuration is indexed via an application name, Application, and contains a list of LoginModules configured for that application. Authentication proceeds down the list in the exact order specified. If an application does not have specific entry, it defaults to the specific entry for "other". The Flag value controls the overall behavior as authentication proceeds down the stack. The following represents a description of the valid values for Flag and their respective semantics: 1) Required - The LoginModule is required to succeed. If it succeeds or fails, authentication still continues to proceed down the LoginModule list. 2) Requisite - The LoginModule is required to succeed. If it succeeds, authentication continues down the LoginModule list. If it fails, control immediately returns to the application (authentication does not proceed down the LoginModule list). 3) Sufficient - The LoginModule is not required to succeed. If it does succeed, control immediately returns to the application (authentication does not proceed down the LoginModule list). If it fails, authentication continues down the LoginModule list. 4) Optional - The LoginModule is not required to succeed. If it succeeds or fails, authentication still continues to proceed down the LoginModule list. The overall authentication succeeds only if all Required and Requisite LoginModules succeed. If a Sufficient LoginModule is configured and succeeds, then only the Required and Requisite LoginModules prior to that Sufficient LoginModule need to have succeeded for the overall authentication to succeed. If no Required or Requisite LoginModules are configured for an application, then at least one Sufficient or Optional LoginModule must succeed. ModuleOptions is a space separated list of LoginModule-specific values which are passed directly to the underlying LoginModules. Options are defined by the LoginModule itself, and control the behavior within it. For example, a LoginModule may define options to support debugging/testing capabilities. The correct way to specify options in the Configuration is by using the following key-value pairing: debug=true. The key and value should be separated by an 'equals' symbol. Note that there is no limit to the number of options a LoginModule may define.


Nested Class Summary
static class LoginConfig.App
           
static class LoginConfig.LoginConfigEntry
           
 
Nested classes inherited from class com.waveset.object.PersistentObject
PersistentObject.Comparator, PersistentObject.InitialInstance
 
Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.object.PersistentObject
_trace, trace
 
Constructor Summary
LoginConfig()
          Create an empty loginconfig object.
LoginConfig(org.w3c.dom.Element e)
           
 
Method Summary
 void addApp(LoginConfig.App app)
           
 boolean AppAuthenticationResourcesContains(java.lang.String resName, java.lang.String appName)
           
 boolean containsAppLoginModule(java.lang.String loginModuleName, java.lang.String appName)
           
 boolean containsAppLoginModule(java.lang.String loginModuleName, java.lang.String appName, ObjectRef lmgRef)
           
 LoginConfig.App.LoginConfigEntryRef[] convertBackLceRefs(LoginModGroup.LoginConfigEntryRef[] lcerefs)
          It will convert LoginModGroup entryrefs to LoginConfig entryrefs.
 LoginModGroup.LoginConfigEntryRef[] convertLceRefs(LoginConfig.App.LoginConfigEntryRef[] lcerefs)
          It will convert LoginConfig entryrefs to LoginModGroup entryrefs.
 LoginConfig.App getApp(java.lang.String appName)
          Deprecated. As of 5.0 use getLoginApp(String appName).
 java.util.Map getAppAuthenticationResources(java.lang.String appName)
          Obtain the authentication resource names and control for the specified application
 LoginConfig.App.LoginConfigEntryRef.AuthnPropertyRef getAppAuthnPropertyRef(java.lang.String propName, java.lang.String appName)
           
 LoginModGroup.LoginConfigEntryRef.AuthnPropertyRef getAppAuthnPropertyRef(java.lang.String propName, java.lang.String appName, ObjectRef lmgRef)
           
 LoginConfig.LoginConfigEntry.AuthnProperty getAppLoginConfigEntryAuthnProperty(LoginConfig.LoginConfigEntry[] lces, java.lang.String propName)
           
 LoginConfig.App.LoginConfigEntryRef getAppLoginConfigEntryRef(int lceIndex, java.lang.String appName)
           
 LoginModGroup.LoginConfigEntryRef getAppLoginConfigEntryRef(int lceIndex, java.lang.String appName, ObjectRef lmgObjRef)
           
 LoginConfig.App.LoginConfigEntryRef[] getAppLoginConfigEntryRefs(java.lang.String appName)
           
 LoginModGroup.LoginConfigEntryRef[] getAppLoginConfigEntryRefs(java.lang.String appName, ObjectRef lmgObjRef)
          Return LoginConfigEntryRefs from Login Module Group object If LoginModGroup object is null, then this is before update.xml is run and try getting lceref from LoginConfig object (old method)
 LoginConfig.App[] getApps()
           
 long getAppSubjectTimeout(java.lang.String appName)
           
static LoginModGroup.LoginConfigEntryRef[] getDefaultAppLoginConfigEntryRefs(java.lang.String appName)
          Returns the default set of login config entry refs for the specified appName.
 LoginConfig.LoginConfigEntry getLighthouseLoginConfigEntryByName(java.lang.String name)
           
 LoginApp getLoginApp(java.lang.String appName)
           
 LoginApp[] getLoginApps()
           
 LoginConfig.LoginConfigEntry[] getLoginConfigEntries()
           
 ObjectRef getLoginModGrp(java.lang.String appName, GenericObject state)
          Find the correct LoginModGroup for use in Login
 Type getType()
          Return the type of this object.
 boolean obfuscateLoginErrors(java.lang.String appName)
           
protected  void parseXml(org.w3c.dom.Element e)
          A concrete subclass can implement the required constructor that takes a single XML Element (fully qualified class name here) by invoking this method and implementing the abstract method to parse any subclass-specific fields.
 void removeApp(LoginConfig.App app)
           
 void setApps(LoginConfig.App[] applications)
           
 void setAppSubjectTimeout(java.lang.String appName, long subjectTimeout)
           
 void setLoginConfigEntries(LoginConfig.LoginConfigEntry[] loginConfigEntries)
           
 java.lang.String toXml()
          Serialize the object to an XML string.
 void toXml(java.lang.StringBuffer b)
          Serialize the object as XML into a string buffer.
 
Methods inherited from class com.waveset.object.PersistentObject
addCommonElements, addEndTag, addMemberObjectGroup, addMemberObjectGroup, addPersistentAttributes, addStartTag, addSubclassAttributes, addSubclassElements, addSummaryAttributes, addXmlHeader, attributesMatch, attributesMatch, attributesMatch, checkReference, checkReferences, clearId, cloneAs, cloneObject, compareTo, create, create, create, create, createLastModItem, createLastModItem, createLastModItemList, directObjectGroupMember, dump, dumpFile, equals, fakeId, getAttribute, getAttributeValues, getAttributeValues, getAuthReferences, getAuthType, getBasicAttributes, getBasicAttributes, getBasicAttributes, getCache, getCounterValue, getCreateDate, getCreator, getDisplayableName, getDisplayName, getElementName, getEncryptedValues, getId, getIdOrName, getInitialInstances, getLastMod, getLastModDate, getLastModifier, getLastModItemId, getLockInfo, getMemberObjectGroupRefs, getMemberObjectGroupRefsUpTo, getMemberObjectGroups, getName, getNameOrId, getProperties, getProperty, getPropertyAsString, getPropertyList, getQueryableAttributes, getReference, getReferences, getRuleDrivenMemberObjectGroupRefs, getRuleDrivenMemberObjectGroupRefsUpTo, getRuleDrivenMemberObjectGroups, getSubtype, getSummaryAttributes, getSummaryString, hasEncryptedData, hashCode, identityEquals, isAlias, isHidden, isId, isProtected, isProtectedFromDelete, isReferencedIn, listOperationalAttributes, listQueryableAttributes, listQueryableReferenceAttributes, listSummaryAttributes, objectGroupMember, objectGroupMemberRef, parseCommonElement, parseCommonElements, parsePersistentAttributes, parseSubclassAttributes, parseSubclassElements, parseXml, prepareForSerialization, prepareToSerialize, println, reEncrypt, reEncryptSubclassAttributes, removeMemberObjectGroup, removeProperty, resolve, resolve, resolve, resolveArray, resolveArrayByFetching, resolveObjectReference, resolveObjectReferences, resolveReference, resolveSummaryAttributes, resolveSummaryAttributes, ruleDrivenObjectGroupMemberRef, setAuthType, setAuthType, setCache, setCreateDate, setCreator, setDisplayName, setDisplayName, setHidden, setIsAlias, setLastMod, setLastMod, setLastModDate, setLastModifier, setMemberObjectGroupRef, setMemberObjectGroupRefs, setMemberObjectGroups, setName, setProperties, setProperty, setPropertyList, setProtected, setProtectedFromDelete, setRuleDrivenMembersCache, setSubtype, setTrace, toString, toXml, toXmlFile, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

LoginConfig

public LoginConfig()
Create an empty loginconfig object.


LoginConfig

public LoginConfig(org.w3c.dom.Element e)
            throws WavesetException
Method Detail

getDefaultAppLoginConfigEntryRefs

public static LoginModGroup.LoginConfigEntryRef[] getDefaultAppLoginConfigEntryRefs(java.lang.String appName)
Returns the default set of login config entry refs for the specified appName. Only used during "startup mode" since there is not yet a LoginConfig.


getType

public Type getType()
Description copied from class: PersistentObject
Return the type of this object. This must be implemented by each subclass.

Specified by:
getType in class PersistentObject

getLoginConfigEntries

public LoginConfig.LoginConfigEntry[] getLoginConfigEntries()

setLoginConfigEntries

public void setLoginConfigEntries(LoginConfig.LoginConfigEntry[] loginConfigEntries)

getLighthouseLoginConfigEntryByName

public LoginConfig.LoginConfigEntry getLighthouseLoginConfigEntryByName(java.lang.String name)

getAppLoginConfigEntryRefs

public LoginConfig.App.LoginConfigEntryRef[] getAppLoginConfigEntryRefs(java.lang.String appName)
                                                                 throws WavesetException
Throws:
WavesetException

getAppLoginConfigEntryRefs

public LoginModGroup.LoginConfigEntryRef[] getAppLoginConfigEntryRefs(java.lang.String appName,
                                                                      ObjectRef lmgObjRef)
                                                               throws WavesetException
Return LoginConfigEntryRefs from Login Module Group object If LoginModGroup object is null, then this is before update.xml is run and try getting lceref from LoginConfig object (old method)

Throws:
WavesetException

convertLceRefs

public LoginModGroup.LoginConfigEntryRef[] convertLceRefs(LoginConfig.App.LoginConfigEntryRef[] lcerefs)
It will convert LoginConfig entryrefs to LoginModGroup entryrefs.


convertBackLceRefs

public LoginConfig.App.LoginConfigEntryRef[] convertBackLceRefs(LoginModGroup.LoginConfigEntryRef[] lcerefs)
It will convert LoginModGroup entryrefs to LoginConfig entryrefs.


getLoginModGrp

public ObjectRef getLoginModGrp(java.lang.String appName,
                                GenericObject state)
                         throws WavesetException
Find the correct LoginModGroup for use in Login

Throws:
WavesetException

getAppLoginConfigEntryRef

public LoginConfig.App.LoginConfigEntryRef getAppLoginConfigEntryRef(int lceIndex,
                                                                     java.lang.String appName)
                                                              throws WavesetException
Throws:
WavesetException

getAppLoginConfigEntryRef

public LoginModGroup.LoginConfigEntryRef getAppLoginConfigEntryRef(int lceIndex,
                                                                   java.lang.String appName,
                                                                   ObjectRef lmgObjRef)
                                                            throws WavesetException
Throws:
WavesetException

getAppAuthnPropertyRef

public LoginConfig.App.LoginConfigEntryRef.AuthnPropertyRef getAppAuthnPropertyRef(java.lang.String propName,
                                                                                   java.lang.String appName)
                                                                            throws WavesetException
Throws:
WavesetException

getAppAuthnPropertyRef

public LoginModGroup.LoginConfigEntryRef.AuthnPropertyRef getAppAuthnPropertyRef(java.lang.String propName,
                                                                                 java.lang.String appName,
                                                                                 ObjectRef lmgRef)
                                                                          throws WavesetException
Throws:
WavesetException

getAppLoginConfigEntryAuthnProperty

public LoginConfig.LoginConfigEntry.AuthnProperty getAppLoginConfigEntryAuthnProperty(LoginConfig.LoginConfigEntry[] lces,
                                                                                      java.lang.String propName)

getApps

public LoginConfig.App[] getApps()

getLoginApps

public LoginApp[] getLoginApps()
                        throws WavesetException
Throws:
WavesetException

getApp

public LoginConfig.App getApp(java.lang.String appName)
Deprecated. As of 5.0 use getLoginApp(String appName).


getLoginApp

public LoginApp getLoginApp(java.lang.String appName)
                     throws WavesetException
Throws:
WavesetException

setApps

public void setApps(LoginConfig.App[] applications)

addApp

public void addApp(LoginConfig.App app)

removeApp

public void removeApp(LoginConfig.App app)

getAppSubjectTimeout

public long getAppSubjectTimeout(java.lang.String appName)
                          throws WavesetException
Throws:
WavesetException

setAppSubjectTimeout

public void setAppSubjectTimeout(java.lang.String appName,
                                 long subjectTimeout)
                          throws WavesetException
Throws:
WavesetException

getAppAuthenticationResources

public java.util.Map getAppAuthenticationResources(java.lang.String appName)
                                            throws WavesetException
Obtain the authentication resource names and control for the specified application

Throws:
WavesetException

AppAuthenticationResourcesContains

public boolean AppAuthenticationResourcesContains(java.lang.String resName,
                                                  java.lang.String appName)
                                           throws WavesetException
Throws:
WavesetException

containsAppLoginModule

public boolean containsAppLoginModule(java.lang.String loginModuleName,
                                      java.lang.String appName)
                               throws WavesetException
Throws:
WavesetException

containsAppLoginModule

public boolean containsAppLoginModule(java.lang.String loginModuleName,
                                      java.lang.String appName,
                                      ObjectRef lmgRef)
                               throws WavesetException
Throws:
WavesetException

obfuscateLoginErrors

public boolean obfuscateLoginErrors(java.lang.String appName)
                             throws WavesetException
Throws:
WavesetException

parseXml

protected void parseXml(org.w3c.dom.Element e)
                 throws WavesetException
Description copied from class: PersistentObject
A concrete subclass can implement the required constructor that takes a single XML Element (fully qualified class name here) by invoking this method and implementing the abstract method to parse any subclass-specific fields.

Overrides:
parseXml in class PersistentObject
Throws:
WavesetException
See Also:
PersistentObject.parseSubclassAttributes(org.w3c.dom.Element)

toXml

public java.lang.String toXml()
Description copied from class: PersistentObject
Serialize the object to an XML string.

The default implementation is to create a string buffer, add an XML header and call the toXml(StringBuffer) method. This may be overloaded by the subclasses, though there is usually no need to.

Specified by:
toXml in interface XmlObject
Overrides:
toXml in class PersistentObject

toXml

public void toXml(java.lang.StringBuffer b)
Description copied from class: PersistentObject
Serialize the object as XML into a string buffer. PersistentObject's implementation provides a standard template for its concrete subclasses.

NOTE: Each subclass should serialize any necessary fields specific to that subclass. // * @see #addSubclassAttributes // * @see #addSubclassElements

Overrides:
toXml in class PersistentObject