Class ManualAuthentication
java.lang.Object
org.dogtagpki.legacy.server.policy.APolicyRule
org.dogtagpki.legacy.server.policy.constraints.ManualAuthentication
- All Implemented Interfaces:
IPolicy, IEnrollmentPolicy, IPolicyRule
ManualAuthentication is an enrollment policy that queues
all requests for issuing agent's approval if no authentication
is present. The policy rejects a request if any of the auth tokens
indicates authentication failure.
NOTE: The Policy Framework has been replaced by the Profile Framework.
- Version:
- $Revision$, $Date$
-
Field Summary
Fields inherited from class APolicyRule
DESC, logger, mFilterExp, mInstanceName, NAMEModifier and TypeFieldDescriptionprotected Stringstatic org.slf4j.Loggerprotected IExpressionprotected Stringprotected StringFields inherited from interface IPolicyRule
PROP_ENABLE, PROP_IMPLNAME, PROP_PREDICATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies the policy on the given Request.Return default parameters for a policy implementation.Return configured parameters for a policy rule instance.voidinit(IPolicyProcessor owner, IConfigStore config) Initializes this policy rule.Methods inherited from class APolicyRule
agentApproved, createKeyIdentifier, deferred, formSHA1KeyId, formSpkiSHA1KeyId, getDescription, getInstanceName, getName, getPredicate, setError, setError, setError, setInstanceName, setPolicyException, setPolicyException, setPredicateModifier and TypeMethodDescriptionprotected booleanagentApproved(IRequest req) request has previously been approved by an agentstatic org.mozilla.jss.netscape.security.x509.KeyIdentifiercreateKeyIdentifier(org.mozilla.jss.netscape.security.x509.X509Key key) protected PolicyResultdetermines whether a DEFERRED policy result should be returned by checking the contents of the AgentApprovals attribute.protected org.mozilla.jss.netscape.security.x509.KeyIdentifierformSHA1KeyId(org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo) Form a byte array of octet string key identifier from the sha-1 hash of the Subject Public Key BIT STRING.protected org.mozilla.jss.netscape.security.x509.KeyIdentifierformSpkiSHA1KeyId(org.mozilla.jss.netscape.security.x509.X509CertInfo certInfo) Form a byte array of octet string key identifier from the sha-1 hash of the Subject Public Key INFO.Gets the description for this policy rule.Returns the name of the policy rule instance.getName()Returns the name of the policy rule.Returns the predicate expression for the rule.voidvoidvoidvoidsetInstanceName(String instanceName) Sets the instance name for a policy rule.voidsetPolicyException(IRequest req, EBaseException ex) voidsetPolicyException(IRequest req, String format, Object[] params) voidsetPredicate(IExpression exp) Sets a predicate expression for rule matching.
-
Constructor Details
-
ManualAuthentication
public ManualAuthentication()
-
-
Method Details
-
init
Initializes this policy rule.The entries may be of the form: ra.Policy.rule.
.implName=ManualAuthentication ra.Policy.rule. .enable=true ra.Policy.rule. .predicate= ou == engineering AND o == netscape.com - Specified by:
initin interfaceIPolicyRule- Specified by:
initin classAPolicyRule- Parameters:
config- The config store reference- Throws:
EPolicyException
-
apply
Applies the policy on the given Request.- Specified by:
applyin interfaceIPolicy- Specified by:
applyin interfaceIPolicyRule- Specified by:
applyin classAPolicyRule- Parameters:
req- The request on which to apply policy.- Returns:
- The policy result object.
-
getInstanceParams
Return configured parameters for a policy rule instance.- Specified by:
getInstanceParamsin interfaceIPolicyRule- Specified by:
getInstanceParamsin classAPolicyRule- Returns:
- nvPairs A Vector of name/value pairs.
-
getDefaultParams
Return default parameters for a policy implementation.- Specified by:
getDefaultParamsin interfaceIPolicyRule- Specified by:
getDefaultParamsin classAPolicyRule- Returns:
- nvPairs A Vector of name/value pairs.
-