Class OpensslNamespacePolicyImpl

java.lang.Object
eu.emi.security.authn.x509.helpers.ns.OpensslNamespacePolicyImpl
All Implemented Interfaces:
NamespacePolicy

public class OpensslNamespacePolicyImpl extends Object implements NamespacePolicy
Represents a namespace policy, i.e. defines which subject DNs are permitted or denied for an issuer.
  • Field Details

    • issuer

      private String issuer
    • subject

      private String subject
    • definedForSubject

      private String definedForSubject
    • identification

      private String identification
    • permit

      private boolean permit
    • pattern

      private Pattern pattern
  • Constructor Details

  • Method Details

    • getIssuer

      public String getIssuer()
      Specified by:
      getIssuer in interface NamespacePolicy
      Returns:
      the issuer
    • getSuject

      public String getSuject()
      Returns:
      the subject
    • isPermit

      public boolean isPermit()
      Specified by:
      isPermit in interface NamespacePolicy
      Returns:
      whether the policy is permit or deny
    • getIdentification

      public String getIdentification()
      Specified by:
      getIdentification in interface NamespacePolicy
      Returns:
      the identification
    • isSubjectMatching

      public boolean isSubjectMatching(X500Principal subject)
      Checks whether the given subject name is matching this policy.
      Specified by:
      isSubjectMatching in interface NamespacePolicy
      Parameters:
      subject - to be checked
      Returns:
      true if subject is matched, false otherwise
    • getDefinedFor

      public String getDefinedFor()
      Specified by:
      getDefinedFor in interface NamespacePolicy
      Returns:
      hash of the CA where the policy is defined. It can be the NamespacePolicy.getIssuer() hash or it may be its parent CA subject name hash, if the namespace was defined in its namespaces file.