Class IsodeDirectorySession
- All Implemented Interfaces:
SWIG_DSAPIConstants
- Direct Known Subclasses:
TracedIsodeDirectorySession
Currently, the only functionality available in addition to
DirectorySession is the ability (enabled by default) to have various
information read from the DSA after a successful bind operation.
This is achieved by having the postBindHook()
method call loadIsodeInfo()
. If required,
setQuickBind(boolean)
can be used to prevent these reads
being attempted.
- Author:
- nh
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
This enum indicates the DSA version of the Isode directory or Unknown.Nested classes/interfaces inherited from class com.isode.dsapi.DirectorySession
DirectorySession.ConnectionState, DirectorySession.PendingOperation, DirectorySession.SessionCertificates
-
Field Summary
Fields inherited from class com.isode.dsapi.DirectorySession
baseDN, BIND_ANONYMOUS, BIND_NONE, BIND_SIMPLE, BIND_STRONG, defaultCommonArgs, MATCHALL, SCOPE_BASE, SCOPE_ONELEVEL, SCOPE_SUBTREE
Fields inherited from interface com.isode.dsapi.SWIG_DSAPIConstants
DS_BOOL_TYPE, DS_BYTES_TYPE, DS_E_AB_CANNOTABANDON, DS_E_AB_NOSUCHOPERATION, DS_E_AB_TOOLATE, DS_E_ABANDONED, DS_E_ABANDONFAILED, DS_E_ABORTED, DS_E_AT_CONSTRAINTVIOLATION, DS_E_AT_INAPPROPRIATEMATCHING, DS_E_AT_INVALIDATTRIBUTESYNTAX, DS_E_AT_NOSUCHATTRIBUTE, DS_E_AT_TYPEORVALUEEXISTS, DS_E_AT_UNDEFINEDATTRIBUTETYPE, DS_E_ATTRIBUTE, DS_E_BADADDR, DS_E_BADATTRSYNTAX, DS_E_BADATTRTYPE, DS_E_BADATTRVALUE, DS_E_BADDN, DS_E_BADENTRY, DS_E_BADFILTER, DS_E_BADPARAM, DS_E_CONNECTIONLOST, DS_E_DSAREFERRAL, DS_E_DSOPFAILED, DS_E_INTERNAL, DS_E_LOCAL, DS_E_NAME, DS_E_NAME_ALIASDEREFERENCE, DS_E_NAME_ALIASPROBLEM, DS_E_NAME_INVALIDATTRIBUTESYNTAX, DS_E_NAME_NOSUCHOBJECT, DS_E_NOERROR, DS_E_NOINFO, DS_E_NOMEMORY, DS_E_NOSPACE, DS_E_NOTBOUND, DS_E_NOTFOUND, DS_E_NOTIMPLEMENTED, DS_E_OPFAILED, DS_E_REFERRAL, DS_E_REMOTE, DS_E_SEC_ACCESSRIGHTS, DS_E_SEC_AUTHENTICATION, DS_E_SEC_INVALIDCREDENTIALS, DS_E_SEC_INVALIDSIGNATURE, DS_E_SEC_NOINFORMATION, DS_E_SEC_PROTECTIONREQUIRED, DS_E_SECURITY, DS_E_SERVICE, DS_E_SIGNEDOPFAILED, DS_E_SUCCESS, DS_E_SVC_ADMINISTRATIVELIMITEXCEEDED, DS_E_SVC_BUSY, DS_E_SVC_CHAININGREQUIRED, DS_E_SVC_DITERROR, DS_E_SVC_INVALIDQUERYREFERENCE, DS_E_SVC_INVALIDREFERENCE, DS_E_SVC_LOOPDETECTED, DS_E_SVC_OUTOFSCOPE, DS_E_SVC_TIMELIMITEXCEEDED, DS_E_SVC_UNABLETOPROCEED, DS_E_SVC_UNAVAILABLE, DS_E_SVC_UNAVAILABLECRITICALEXTENSION, DS_E_SVC_UNWILLINGTOPERFORM, DS_E_UNKNOWN, DS_E_UPD_AFFECTSMULTIPLEDSAS, DS_E_UPD_ALREADYEXISTS, DS_E_UPD_NAMINGVIOLATION, DS_E_UPD_NOOBJECTCLASSMODS, DS_E_UPD_NOTONNONLEAF, DS_E_UPD_NOTONRDN, DS_E_UPD_OBJECTCLASSVIOLATION, DS_E_UPDATE, DS_E_X509, DS_E_X509_RESULTSDISCARDED, DS_EXT_OPT_MANAGEDSAIT, DS_EXT_OPT_USEALIASONUPDATE, DS_INT_TYPE, DS_PARAM_TYPE_MASK, DS_PP_ACCOUNT_LOCKED, DS_PP_CHANGE_AFTER_RESET, DS_PP_INSUFFICIENT_PASSWORD_QUALITY, DS_PP_MUST_SUPPLY_OLD_PASSWORD, DS_PP_NO_ERROR, DS_PP_PASSWORD_EXPIRED, DS_PP_PASSWORD_IN_HISTORY, DS_PP_PASSWORD_MOD_NOT_ALLOWED, DS_PP_PASSWORD_TOO_SHORT, DS_PP_PASSWORD_TOO_YOUNG, DS_SASL_BEST_SSF, DS_SEC_DISABLEVERIFICATION, DS_SEC_ENCRYPTED, DS_SEC_SIGNED, DS_STR_TYPE, DS_SVC_OPT_ATTRSONLY, DS_SVC_OPT_CHAININGPROHIBIT, DS_SVC_OPT_COPYSHALLDO, DS_SVC_OPT_DONTDEREFALIAS, DS_SVC_OPT_DONTUSECOPY, DS_SVC_OPT_LOCALSCOPE, DS_SVC_OPT_PAGESIZE, DS_SVC_OPT_PREFERCHAIN, DS_SVC_OPT_SEARCHALIASES, DS_SVC_OPT_SUBENTRIES, DS_SVC_OPT_TXNID, DS_SVC_PASSWORDPOLICY, DS_SVC_PRIORITY, DS_SVC_SIZELIMIT, DS_SVC_TIMELIMIT, DSActionAbort, DSActionContinue, DSAnonymous, DSAPI_VERSION, DSConnectionAnonymous, DSConnectionBound, DSConnectionLost, DSConnectionSasl, DSConnectionSimple, DSConnectionStrong, DSEntryAdd, DSEntryDelete, DSEntryModify, DSEntryNormal, DSEntryRename, DSLimitAdminLimitExceeded, DSLimitNoProblem, DSLimitSizeExceeded, DSLimitTimeExceeded, DSModAdd, DSModDelete, DSModReplace, DSNotYetConnected, DSSASL, DSScopeBaseObject, DSScopeOneLevel, DSScopeSubtree, DSSimple, DSStrong, DSUnbound, DSVerificationFailed, JAVADSAPI_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionIsodeDirectorySession
(String addr) Constructs a new object and verifies with that the specified address is valid.IsodeDirectorySession
(String addr, boolean startTLS) Constructs a new object and verifies with that the specified address is valid. -
Method Summary
Modifier and TypeMethodDescriptionGet the DN that is being used to get SIO related stuff (security policy,catalogs)Get the list of available GDAM DNs from the dsa.Determine the base DN being used to constrain which portion of the directory tree may be accessed through this DirectorySession.Return the DN of the entry that contains configuration information for this DSA.Get config managerReturns the Distinguished name of the directory itself, if known.Get the presentation address of the dsaDetermine the dsa vendor name, if availableDetermine the dsa vendor version, if availableDSA version of the directory.Return the value of the attribute "dsaVersion" which was on the root entry of the DSA.For an Isode Directory Server, returns the location of the DSA directory, if known.com.isode.util.Licensing.IsodeLicenseInfo
Get Isode License Information derived from one of the attributes of the post 15.0 Isode DSA.For an Isode Directory Server, returns an array of DNs representing DSA Manager values, if known.Returns a DN representing the authorization identity that the DSA has associated with this DirectorySession object, if available.Get the list of "master" GDAM DNs from the DSA.Get the multi-policy object which comprises of a primary policy and optional number of secondary policies.Return the list of DNs representing values for "namingContexts" as read from the root entry of the DSA, if known.Return a list containing the available password scheme comparators that are advertised by this DSA on the root entry.Return a list containing the available password scheme generators that are advertised by this DSA on the root entry.Return a list containing the "saslInstalledMechanisms" that are advertised by this DSA on the root entry.Get the security clearance catalog read from the alternate policy DN if specified or from the DSA's default entry for SIO attributes.Get the security label catalog read from the alternate policy DN if specified or from the DSA's default entry for SIO attributes.Get the security policy read from the alternate policy DN if specified or from the DSA's default entry for SIO attributesDetermine the name of the system on which the Isode directory server is running, if possible.Get the list of "shadow" GDAM DNs from the dsa.List<byte[]>
For a session which has been bound, obtain a list of the untrusted certificates which may be used by this DSA when performing certificate verification.int
Determine the strong authentication implementation version advertised by this DSA, or -1 if the DSA does advertise any version.byte[]
For a session which has been bound, find the certificate which is being advertised as the server for strong authentication (X.509).List<byte[]>
For a session which has been bound, obtain a list of the strong authentication trust anchors that this DSA is using.Get the list of available cipher suites from the dsaReturn a list containing the ciphers that the DSA advertises in the root entry as being members of the "DEFAULT" set of ciphers.Initialise config manager.boolean
Determine whether this appears to be an Active Directory server.boolean
Determine whether the DSA is advertising the cipher suiteCryptoUtils.CIPHER_SUITES.TLS_RSA_WITH_AES_128_GCM_SHA256
in its list tlsAvailableCiphers.boolean
Determine (if possible) whether the server that is connected on this session is running on the local system.boolean
For a session that has been bound, determine whether this DSA reports that strong authentication is active.void
Perform a "best-efforts" attempt to read various information about the directory.boolean
loadSIOAttributesFromAlternateDN
(DN... modifiedDNs) Ensure cached SIO values are up to date.protected void
Load Isode-specific useful info after a bindprotected void
Remove any stale directory information we may have before attempting a bindprotected void
Remove Isode-specific useful info when unbindingreadEntry
(DN dn, Selection sel, CommonArgs cargs) Perform a synchronous read of a specific directory entry and return an Entry object (avoiding the need for callers to process the Indication).boolean
setAlternateDNForSIO
(DN alternateDn) Set alternate DN which should be used to read SIO related informationSpecify a base DN to be used to constrain which portion of the directory tree may be accessed through this DirectorySession.void
setQuickBind
(boolean enable) Determine whether a successful bind operation should be followed by an attempt to read Isode-specific information from the directory.Methods inherited from class com.isode.dsapi.DirectorySession
add, apply, bind, bind, bind, bind, compare, delete, filterString, finalize, getAllowUnknownAttrs, getBindType, getBoundAddress, getCommonArgsWithTransaction, getConnectionState, getPresentationAddress, getSessionCertificates, isBound, modify, postUnbindHook, read, readAsync, rename, search, search, searchOneLevel, searchOneLevel, searchSubTree, setAllowUnknownAttrs, setSigVerifyFailHandler, toString, txnend, txnstart, unbind
-
Constructor Details
-
IsodeDirectorySession
public IsodeDirectorySession(String addr, boolean startTLS) throws BadAddressException, NativeLibraryException Constructs a new object and verifies with that the specified address is valid.- Parameters:
addr
- the presentation address of the remote DSA, which must not be null.startTLS
- true to force plain LDAP connections to use the startTLS extension (ignored for LDAPS and DAP connections)- Throws:
BadAddressException
- if addr is null or is not a valid presentation address.NativeLibraryException
- if an unrecoverable error was detected by the native library- See Also:
-
IsodeDirectorySession
Constructs a new object and verifies with that the specified address is valid.- Parameters:
addr
- the bind profile address of the remote DSA, which must not be null.- Throws:
BadAddressException
- if addr is null or is not a valid bind profile address.NativeLibraryException
- if an unrecoverable error was detected by the native library- See Also:
-
-
Method Details
-
setQuickBind
public void setQuickBind(boolean enable) Determine whether a successful bind operation should be followed by an attempt to read Isode-specific information from the directory. By default, when an IsodeDirectorySession is bound,loadIsodeInfo()
will be called to read in information about naming contexts etc.. To prevent that behaviour, and reduce the amount of work performed at bind time, use this method with a parameter of true.- Parameters:
enable
- true to prevent the class attempting to read extra information after a bind; false to request that an attempt be made to read the extra information.
-
getDirectoryServerDN
Returns the Distinguished name of the directory itself, if known.- Returns:
- the DSA's DN, or null if it is not known.
- See Also:
-
getIsodeDsaDir
For an Isode Directory Server, returns the location of the DSA directory, if known.- Returns:
- the DSA's directory path, or null if not known.
- See Also:
-
getServerhostname
Determine the name of the system on which the Isode directory server is running, if possible.Some Isode DSAs advertise the name of the system which they are running on, which they derived from a call to the Isode library function "getlocalhost()". By comparing the server's host name with that returned by a call to
Isode.getLocalhostname()
, a caller can check if the server is running on the same system as the client.- Returns:
- a String containing the value reported by the server as its own localhostname. If the server does not report any information, then this method will return null.
- Since:
- 15.0
- See Also:
-
Isode.getLocalhostname()
isServerOnLocalSystem()
-
isServerOnLocalSystem
public boolean isServerOnLocalSystem()Determine (if possible) whether the server that is connected on this session is running on the local system.In some cases (e.g. D2 DSAs) it will not be possible to establish the server's hostname, in which case this method will always return false whether or not the server is running on the local system.
- Returns:
- true if the hostname reported by the server as its localhost is the same as the hostname for the system that the caller is using. False if the server is not running on the same system, or if the server's hostname is unknown.
- Since:
- 15.0
- See Also:
-
getIsodeManagerDNs
For an Isode Directory Server, returns an array of DNs representing DSA Manager values, if known.- Returns:
- the DSA manager DNs, or empty if the information is not known.
- See Also:
-
getStrongAuthImplementationVersion
Determine the strong authentication implementation version advertised by this DSA, or -1 if the DSA does advertise any version.- Returns:
- the strong implementation version, which will be -1 if none is advertised.
- Throws:
NotBoundException
- if the DSA has not yet been bound to.- Since:
- 14.4
- See Also:
-
isStrongAuthActive
For a session that has been bound, determine whether this DSA reports that strong authentication is active.For DSAs which do not advertise strong authentication information, this method will throw a NotImplementedException.
Callers can use
getStrongAuthImplementationVersion()
to ascertain whether the DSA reports strong authentication configuration information.- Returns:
- true if the DSA reports that strong authentication is enabled, false if the DSA reports that it's disabled.
- Throws:
NotImplementedException
- if the DSA does advertise any strong authentication configuration information.NotBoundException
- if the DSA has not yet been bound to.- Since:
- 14.4
- See Also:
-
getStrongAuthTrustAnchors
For a session which has been bound, obtain a list of the strong authentication trust anchors that this DSA is using. This function does a directory read operation on the Root DSE to get the trustAnchors.For DSAs which do not advertise strong authentication information, this method will throw a NotImplementedException.
Callers can use
getStrongAuthImplementationVersion()
to ascertain whether the DSA reports strong authentication configuration information.- Returns:
- a list containing the BER representation of each of the advertised trust anchors, or null if none are advertised.
- Throws:
NotImplementedException
- if the DSA does advertise any strong authentication configuration information.NotBoundException
- if the DSA has not yet been bound to.- Since:
- 14.4
- See Also:
-
getStrongAuthCertificates
For a session which has been bound, obtain a list of the untrusted certificates which may be used by this DSA when performing certificate verification.Note that this function does a directory read operation on the Root DSE to get the information, and so will return current information rather than whatever was read when the session was bound.
For DSAs which do not advertise strong authentication information, this method will throw a NotImplementedException.
Callers can use
getStrongAuthImplementationVersion()
to ascertain whether the DSA reports strong authentication configuration information.- Returns:
- a list containing the BER representation of each of the advertised certificates, or null if none is advertised.
- Throws:
NotImplementedException
- if the DSA does advertise any strong authentication configuration information, or if the local schema does not understand the "strongAuthCertificate" attribute type.NotBoundException
- if the DSA has not yet been bound to.- Since:
- 15.0
- See Also:
-
getStrongAuthServerCertificate
For a session which has been bound, find the certificate which is being advertised as the server for strong authentication (X.509).Note that this function does a directory read operation on the Root DSE to get the information, and so will return current information rather than whatever was read when the session was bound.
For DSAs which do not advertise strong authentication information, this method will throw a NotImplementedException.
Callers can use
getStrongAuthImplementationVersion()
to ascertain whether the DSA reports strong authentication configuration information.- Returns:
- a byte array containing the BER representation of the server's certificate, or null if none is advertised.
- Throws:
NotImplementedException
- if the DSA does advertise any strong authentication configuration information, or if the local schema does not understand the "strongAuthServerCertificate" attribute type.NotBoundException
- if the DSA has not yet been bound to.- Since:
- 15.0
- See Also:
-
getIsodeWhoAmI
Returns a DN representing the authorization identity that the DSA has associated with this DirectorySession object, if available.Note that this functionality is supported only for versions of Isode directory servers since
IsodeDirectorySession.DsaVersion.D3
.- Returns:
- a DN representing the identity of the bound session, so far as the DSA is concerned. A value of null indicates an anonymous bind.
- Throws:
NotImplementedException
- if the DSA does not support this functionality.- Since:
- 15.0
- See Also:
-
preBindHook
Remove any stale directory information we may have before attempting a bind- Overrides:
preBindHook
in classDirectorySession
- Throws:
NotBoundException
- The directory will not be able to be set up.
-
postBindHook
protected void postBindHook()Load Isode-specific useful info after a bind- Overrides:
postBindHook
in classDirectorySession
-
preUnbindHook
protected void preUnbindHook()Remove Isode-specific useful info when unbinding- Overrides:
preUnbindHook
in classDirectorySession
-
loadIsodeInfo
public void loadIsodeInfo()Perform a "best-efforts" attempt to read various information about the directory. This is typically done when a new IsodeDirectorySession is bound, but may be requested at any subsequent time (e.g. if there is reason to believe that something has changed such as a new naming context or updated RBAC policy).It may also be appropriate to call this method for an object where
setQuickBind(boolean)
has been used to disable the loading of this information at bind time.- Throws:
NativeLibraryException
- if an unrecoverable error was detected by the native library- See Also:
-
readEntry
public Entry readEntry(DN dn, Selection sel, CommonArgs cargs) throws NativeLibraryException, NoSuchAttributeException, NotBoundException, NotImplementedException, NullPointerException, IndicationException, SignedOpFailedException, DirectoryOperationFailedException Perform a synchronous read of a specific directory entry and return an Entry object (avoiding the need for callers to process the Indication). Should the specified entry not exist, this method returns null rather than throwing a NoSuchEntryException.This method overrides the functionality in the base class so that extra information may be included in the entry returned.
For an Isode DSA, there are certain attributes that may be present on the root entry which will are only returned when specifically requested (i.e. you won't see them for a Selection that requests all user+oper attributes). Since the
loadIsodeInfo()
method is likely to have read these when the directory was bound, this method can merge the values into the returned entry.- Overrides:
readEntry
in classDirectorySession
- Parameters:
dn
- DN of the entry to read. Must not be null.sel
- Selection representing the required selection. Must not be null.cargs
- Common arguments, null indicates defaults.- Returns:
- The entry as read from the directory, or null no such entry was found. If dn represents the root entry, then an attempt will be made to include extra attributes in the value returned.
- Throws:
IndicationException
- if the underlying layer returned an Indication that represents a failure status from the DSA.NotBoundException
- if this DirectorySession is not currently bound.DirectoryOperationFailedException
- if the operation was sent to the directory, and the directory returned an "operation failed" status with no extra indication or information.NullPointerException
- if dn or sel is null.NotImplementedException
- if an attempt was made to perform a signed operation on a session which has not been strongly authenticated.SignedOpFailedException
- if for a signed read, an error occurred when attempting to sign the read request.IncompleteReadException
- if the read operation completed, but information in the indication suggests that it is not possible to be certain whether the entry was successfully read. Callers may extract the Indication from the exception object in order to decide what action to take.NoSuchAttributeException
- if sel names attributes which this entry does not contain.NativeLibraryException
- if an unrecoverable error was detected by the native library- Since:
- 14.4
- See Also:
-
getDsaVersion
DSA version of the directory.- Returns:
- The DSA version if known, DsaVersion.UNKNOWN otherwise.
- Since:
- 15.0
-
getDsaVendorVersion
Determine the dsa vendor version, if available- Returns:
- the value of the "vendorversion" attribute on the DSA's root entry, or null if no value was present
- Since:
- 15.0
- See Also:
-
getDsaVendorName
Determine the dsa vendor name, if available- Returns:
- the value of the "vendorname" attribute on the DSA's root entry, or null if no value was present
- Since:
- 15.0
- See Also:
-
initConfigManager
Initialise config manager. If the config manager was initialised before, it re-initialises it.No directory operations are performed in this method.
- Returns:
- config manager
- Throws:
IncorrectVersionException
- if the version of DSA is not compatible- Since:
- 15.0
-
getConfigManager
Get config manager- Returns:
- config manager, can be null
- Since:
- 15.0
- See Also:
-
getConfigDN
Return the DN of the entry that contains configuration information for this DSA. In the case of a D2 DSA, the entry will be the DSA's own DN (e.g. "cn=dsa, o=isode"). For a D3 DSA, the entry will be "cn=core,cn=config". If the DSA's version is unknown, the method returns null.- Returns:
- the DN of the entry that contains configuration information, which will be null if the entry DN cannot be determined.
- Since:
- 15.0
-
isHGECipherAvailable
public boolean isHGECipherAvailable()Determine whether the DSA is advertising the cipher suiteCryptoUtils.CIPHER_SUITES.TLS_RSA_WITH_AES_128_GCM_SHA256
in its list tlsAvailableCiphers. DSAs without HGE capability will not do this, and so it is likely that if the cipher is being offered by an Isode DSA, then that means the DSA has an HGE license (or is a dev build).- Returns:
- true if the DSA is advertising a cipher suite that would not be available unless it has HGE capability; false if the DSA was not offering such a suite.
- Since:
- 15.0
-
getTlsAvailableCipherSuites
Get the list of available cipher suites from the dsa- Returns:
- list of available cipher suites list as strings
each containing a number representing a cipher suite
value which could be turned into a enum using
CryptoUtils.CIPHER_SUITES
- Since:
- 15.0
-
getDsaPresentationAddress
Get the presentation address of the dsa- Returns:
- the dsa's presentation address or null if the access point attribute of the dsa could not be determined
- Since:
- 15.0
-
getAvailableGDAMs
Get the list of available GDAM DNs from the dsa. "Available" GDAMs are those which don't currently contain any naming context.The list will be empty if there are no available GDAMs or if the information could not be read.
- Returns:
- list of available GDAM DNs, will never be null
- Since:
- 15.0
-
getMasterGDAMs
Get the list of "master" GDAM DNs from the DSA. "Master" GDAMs are those which contain master information. New locally mastered naming contexts can be added to any GDAM in this list.The list will be empty if there are no GDAMs mastered on this system, or if the information could not be read.
- Returns:
- list of available master DNs, will never be null
- Since:
- 15.0
-
getShadowGDAMs
Get the list of "shadow" GDAM DNs from the dsa. "Shadow" GDAMs are those which contain shadowed data.The list will be empty if there are no shadow GDAMs or if the information could not be read.
- Returns:
- list of available GDAM DNs, will never be null
- Since:
- 15.0
-
getNamingContexts
Return the list of DNs representing values for "namingContexts" as read from the root entry of the DSA, if known.- Returns:
- the naming contexts for this DSA, empty if the information is not known.
- Since:
- 15.0
-
getSaslInstalledMechanisms
Return a list containing the "saslInstalledMechanisms" that are advertised by this DSA on the root entry. This list is computed by the DSA based on the SASL plugins available, and so is a list of mechanisms which could be enabled, rather than a list of mechanisms which is being used.- Returns:
- a list of Strings, with each String containing the name of a SASL mechanism. If the DSA does not provide this information, then the list returned will have no elements (i.e. the method won't return null).
- Throws:
NotBoundException
- if the DSA has not yet been bound to.- Since:
- 15.0
-
getPwdAvailableSchemeGenerators
Return a list containing the available password scheme generators that are advertised by this DSA on the root entry.- Returns:
- a list of Strings, which each String containing the name of a password scheme generator. If the DSA does not report any information, then the list returned will have no elements (i.e. the method won't return null)
- Throws:
NotBoundException
- if the DSA has not yet been bound to.- Since:
- 15.0
-
getPwdAvailableSchemeComparators
Return a list containing the available password scheme comparators that are advertised by this DSA on the root entry.- Returns:
- a list of Strings, which each String containing the name of a password scheme comparator. If the DSA does not report any information, then the list returned will have no elements (i.e. the method won't return null)
- Throws:
NotBoundException
- if the DSA has not yet been bound to.- Since:
- 15.0
-
getTlsDefaultCipherSuites
Return a list containing the ciphers that the DSA advertises in the root entry as being members of the "DEFAULT" set of ciphers.- Returns:
- list of available cipher suites list as strings
each containing a number representing a cipher suite
value which could be turned into a enum using
CryptoUtils.CIPHER_SUITES
. If there is no information from the DSA, an empty list (i.e. not null) will be returned. - Throws:
NotBoundException
- if the DSA has not yet been bound to.- Since:
- 15.0
-
setBaseDN
Specify a base DN to be used to constrain which portion of the directory tree may be accessed through this DirectorySession. If specified, then all operations which attempt to read or update entries that are not at or below baseDN (with the exception of the root entry) will result in a NoSuchEntryException being thrown. Attempts to read the root entry are always permitted, regardless of whether a base DN has been specified. However other operations like search, add, delete, modify, rename are not permitted on the root entry.- Parameters:
baseDN
- the base DN to use; may be null to indicate that no base DN restriction applies.- Returns:
- the previous base DN, which may be null.
- Since:
- 14.6
- See Also:
-
getBaseDN
Determine the base DN being used to constrain which portion of the directory tree may be accessed through this DirectorySession.- Returns:
- the base DN currently being used; may be null if no base DN has been specified.
- Since:
- 14.6
- See Also:
-
loadSIOAttributesFromAlternateDN
Ensure cached SIO values are up to date. The SIO values will be re-read from the directory if the "alternatePolicyDN" has changed using the functionsetAlternateDNForSIO(DN)
, or if any of the DNs specified in modifiedDNs matches the current "alternatePolicyDN". Otherwise, the method will return without re-reading anything from the directory.- Parameters:
modifiedDNs
- a list of DNs representing entries that the caller knows have been modified. If any of these match the entry containing SIO information, then the entry will be re-read to make sure SIO information is up to date.- Returns:
- true if SIO attributes were reloaded or if the alternate DN has been removed so as to use default DSA policy, false otherwise
- Since:
- 15.1
- See Also:
-
setAlternateDNForSIO
Set alternate DN which should be used to read SIO related information- Parameters:
alternateDn
- alternate DN to read SIO related information, set it to null to clear the alternate DN so that default DN used by the DSA would be used for SIO related attributes- Returns:
- true if setting the alternate DN resulted in reload of SIO related attributes (policy, label and clearance catalogs) and false otherwise
- Since:
- 15.1
- See Also:
-
getAlternateDNForSIO
Get the DN that is being used to get SIO related stuff (security policy,catalogs)- Returns:
- alternate policy DN if configured using
setAlternateDNForSIO(DN)
. Otherwise it returns the DSA's config DN that is used for storing RBAC policy - Since:
- 15.1
- See Also:
-
getSecurityPolicy
Get the security policy read from the alternate policy DN if specified or from the DSA's default entry for SIO attributes- Returns:
- a JRPolicy object constructed from policy xml from alternate policy DN if specified or from the DSA's default entry for SIO attributes. It can be null if attribute is not present or invalid
- Since:
- 15.1
- See Also:
-
getMultiPolicy
Get the multi-policy object which comprises of a primary policy and optional number of secondary policies. The primary and seconadary policies are the attributes read from the alternate policy DN if specified or from the default entry of the DSA- Returns:
- a Multi Policy object constructed from primary policy and optional seconadry policies read from from alternate policy DN if specified or from the DSA's default entry for SIO attributes. It can be null if primary policy attribute is not present or invalid
- Since:
- 15.3
- See Also:
-
getSecurityClearanceCatalog
Get the security clearance catalog read from the alternate policy DN if specified or from the DSA's default entry for SIO attributes. It is stored as an XML in the entry.- Returns:
- security clearance catalog , can be null if no JRClearanceCatalog could be created from the xml or if xml is absent
- Since:
- 15.1
- See Also:
-
getSecurityLabelCatalog
Get the security label catalog read from the alternate policy DN if specified or from the DSA's default entry for SIO attributes. It is stored as an XML in the entry.- Returns:
- security label catalog, can be null if no JRLabelCatalog could be created from the xml or if xml is absent
- Since:
- 15.1
- See Also:
-
getIsodeLicenseInfo
public com.isode.util.Licensing.IsodeLicenseInfo getIsodeLicenseInfo()Get Isode License Information derived from one of the attributes of the post 15.0 Isode DSA.- Returns:
- isode license information object, will be null for pre-15.1 DSAs and non-isode directory servers
- Since:
- 15.1
-
getDSAVersionString
Return the value of the attribute "dsaVersion" which was on the root entry of the DSA.- Returns:
- the value of "dsaVersion", or null if no value was present.
- Since:
- 15.0
-
isActiveDirectory
public boolean isActiveDirectory()Determine whether this appears to be an Active Directory server. The flag is set if the directory server reports a set of supportedControl values matching those documented by Microsoft.- Returns:
- true if this looks like an Active Directory, false otherwise.
- Since:
- 15.2
- See Also:
-