java.lang.Object
org.opends.server.authorization.dseecompat.UserDN
All Implemented Interfaces:
KeywordBindRule

public final class UserDN extends Object implements KeywordBindRule
This class represents the userdn keyword in a bind rule.
  • Method Details

    • decode

      Decodes an expression string representing a userdn bind rule.
      Parameters:
      expression - The string representation of the userdn bind rule expression.
      type - An enumeration of the type of the bind rule.
      Returns:
      A KeywordBindRule class that represents the bind rule.
      Throws:
      AciException - If the expression failed to LDAP URL decode.
    • evaluate

      public EnumEvalResult evaluate(AciEvalContext evalCtx)
      Performs the evaluation of a userdn bind rule based on the evaluation context passed to it. The evaluation stops when there are no more UserDNTypeURLs to evaluate or if an UserDNTypeURL evaluates to true.
      Specified by:
      evaluate in interface KeywordBindRule
      Parameters:
      evalCtx - The evaluation context to evaluate with.
      Returns:
      An evaluation result enumeration containing the result of the evaluation.
    • evalURL

      public static boolean evalURL(AciEvalContext evalCtx, LDAPURL url)
      This method evaluates a URL userdn expression. Something like: ldap:///suffix??sub?(filter). It also searches for the client DN entry and saves it in the evaluation context for repeat evaluations that might come later in processing.
      Parameters:
      evalCtx - The evaluation context to use.
      url - URL containing the URL to use in the evaluation.
      Returns:
      the evaluation result.
    • evaluate

      public static boolean evaluate(Entry e, Dn clientDN, AttributeType attrType)
      This method searches an entry for an attribute value that is treated as a DN. That DN is then compared against the client DN.
      Parameters:
      e - The entry to get the attribute type from.
      clientDN - The client authorization DN to check for.
      attrType - The attribute type from the bind rule.
      Returns:
      An enumeration with the result.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public void toString(StringBuilder buffer)
      Description copied from interface: KeywordBindRule
      Appends a string representation of this object to the provided buffer.
      Specified by:
      toString in interface KeywordBindRule
      Parameters:
      buffer - The buffer into which a string representation of this object should be appended.