Class OpensslNamespacePolicyImpl
- java.lang.Object
-
- eu.emi.security.authn.x509.helpers.ns.OpensslNamespacePolicyImpl
-
- All Implemented Interfaces:
NamespacePolicy
public class OpensslNamespacePolicyImpl extends java.lang.Object implements NamespacePolicy
Represents a namespace policy, i.e. defines which subject DNs are permitted or denied for an issuer.- Author:
- K. Benedyczak
-
-
Constructor Summary
Constructors Constructor Description OpensslNamespacePolicyImpl(java.lang.String issuer, java.lang.String subject, java.lang.String definedForSubject, boolean permit, java.lang.String identification)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefinedFor()
java.lang.String
getIdentification()
java.lang.String
getIssuer()
java.lang.String
getSuject()
boolean
isPermit()
boolean
isSubjectMatching(javax.security.auth.x500.X500Principal subject)
Checks whether the given subject name is matching this policy.
-
-
-
Method Detail
-
getIssuer
public java.lang.String getIssuer()
- Specified by:
getIssuer
in interfaceNamespacePolicy
- Returns:
- the issuer
-
getSuject
public java.lang.String getSuject()
- Returns:
- the subject
-
isPermit
public boolean isPermit()
- Specified by:
isPermit
in interfaceNamespacePolicy
- Returns:
- whether the policy is permit or deny
-
getIdentification
public java.lang.String getIdentification()
- Specified by:
getIdentification
in interfaceNamespacePolicy
- Returns:
- the identification
-
isSubjectMatching
public boolean isSubjectMatching(javax.security.auth.x500.X500Principal subject)
Checks whether the given subject name is matching this policy.- Specified by:
isSubjectMatching
in interfaceNamespacePolicy
- Parameters:
subject
- to be checked- Returns:
- true if subject is matched, false otherwise
-
getDefinedFor
public java.lang.String getDefinedFor()
- Specified by:
getDefinedFor
in interfaceNamespacePolicy
- 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.
-
-