public class DACLAssertor
extends java.lang.Object
AdRoleAssertion all the rights which the assertion contains.nTSecurityDescriptor attribute, which contains the DACL. Alternatively, a constructor accepting a
pre-created DACL is available. The DACL is then searched for all ACE entries which
are expected to satisfy AceAssertions specified by the AdRoleAssertion; the assertion is passed in to
the method doAssert. If there are unsatisfied assertions, and the adRoleAssertion refers to a user, the
evaluation is repeated for all groups the user belongs to. The caller may then evaluate the result of
doAssert(net.tirasa.adsddl.ntsd.dacl.AdRoleAssertion) and identify unsatisfied assertions by calling
getUnsatisfiedAssertions.| Constructor and Description |
|---|
DACLAssertor(ACL dacl,
boolean searchGroups)
DACLAssertor constructor.
|
DACLAssertor(java.lang.String searchFilter,
boolean searchGroups,
javax.naming.ldap.LdapContext ldapContext)
DACLAssertor constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
doAssert(AdRoleAssertion roleAssertion)
Compares the object DACL located by the searchFilter against the specified
AdRoleAssertion, and
determines whether
that assertion's principal is granted all the rights which the assertion contains. |
java.util.List<AceAssertion> |
getUnsatisfiedAssertions()
Returns list of AceAssertions in the AdRoleAssertion given to doAssert which are unsatisfied.
|
public DACLAssertor(java.lang.String searchFilter,
boolean searchGroups,
javax.naming.ldap.LdapContext ldapContext)
searchFilter - LDAP search filter, locating an object whose DACL will be evaluated against the AdRoleAssertion. NOTE: LDAP
filter escaping is the caller's responsibilitysearchGroups - whether to search groups of a user contained in the AdRoleAssertionldapContext - the pre-connected LDAP contextpublic DACLAssertor(ACL dacl, boolean searchGroups)
dacl - the DACL of the object to evaluate against the AdRoleAssertionsearchGroups - whether to search groups of a user contained in the AdRoleAssertionpublic boolean doAssert(AdRoleAssertion roleAssertion) throws javax.naming.NamingException
AdRoleAssertion, and
determines whether
that assertion's principal is granted all the rights which the assertion contains.AceType.ACCESS_ALLOWED_ACE_TYPE or
AceType.ACCESS_ALLOWED_OBJECT_ACE_TYPE will be considered for satisfying an AceAssertion of the
roleAssertion.roleAssertion - the AdRoleAssertionjavax.naming.CommunicationException - if the context for searching the DACL is invalid or the domain cannot be reachedjavax.naming.NameNotFoundException - if the DACL search failsjavax.naming.NamingException - if extracting the DACL fails or another JNDI issue occursjavax.naming.SizeLimitExceededException - if more than one AD object found during DACL searchpublic java.util.List<AceAssertion> getUnsatisfiedAssertions()
Copyright © 2015-2018 Tirasa. All Rights Reserved.