Package org.italiangrid.voms.ac.impl
Class DefaultVOMSValidator
- java.lang.Object
-
- org.italiangrid.voms.ac.impl.DefaultVOMSACParser
-
- org.italiangrid.voms.ac.impl.DefaultVOMSValidator
-
- All Implemented Interfaces:
VOMSACParser,VOMSACValidator
public class DefaultVOMSValidator extends DefaultVOMSACParser implements VOMSACValidator
The default implementation of the VOMS validator.- Author:
- andreaceccanti
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultVOMSValidator.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_TRUST_ANCHORS_DIR
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<VOMSValidationResult>internalValidate(java.security.cert.X509Certificate[] validatedChain)voidsetValidationResultListener(ValidationResultListener listener)Sets a listener that will received validation-related events for thisVOMSACValidator.voidshutdown()Shutdown the VOMS validator.java.util.List<VOMSAttribute>validate(java.security.cert.X509Certificate[] validatedChain)Parses and validates the VOMS attributes found in the certificate chain passed as argument (which is assumed to be validated already).java.util.List<org.bouncycastle.asn1.x509.AttributeCertificate>validateACs(java.util.List<org.bouncycastle.asn1.x509.AttributeCertificate> acs)Validates the VOMS attributes found in the attribute certificate list passed as argument.java.util.List<VOMSValidationResult>validateWithResult(java.security.cert.X509Certificate[] validatedChain)Parses and validates the VOMS attributes found in the certificate chain passed as argument (which is assumed to be validated already).-
Methods inherited from class org.italiangrid.voms.ac.impl.DefaultVOMSACParser
parse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.italiangrid.voms.ac.VOMSACParser
parse
-
-
-
-
Field Detail
-
DEFAULT_TRUST_ANCHORS_DIR
public static final java.lang.String DEFAULT_TRUST_ANCHORS_DIR
- See Also:
- Constant Field Values
-
-
Method Detail
-
validateWithResult
public java.util.List<VOMSValidationResult> validateWithResult(java.security.cert.X509Certificate[] validatedChain)
Description copied from interface:VOMSACValidatorParses and validates the VOMS attributes found in the certificate chain passed as argument (which is assumed to be validated already). This method returns a possibly empty list ofVOMSValidationResultobjects which describe the outcome of the validation for each VOMS AC found in the certificate chain. This method is useful when you want to use a single call to get all details about validation without relying on the registration of aValidationResultListener.- Specified by:
validateWithResultin interfaceVOMSACValidator- Parameters:
validatedChain- a chain of X.509 certificates- Returns:
- a possibly empty list of
VOMSValidationResultobject providing access to validation results and related attributes
-
internalValidate
protected java.util.List<VOMSValidationResult> internalValidate(java.security.cert.X509Certificate[] validatedChain)
-
validate
public java.util.List<VOMSAttribute> validate(java.security.cert.X509Certificate[] validatedChain)
Description copied from interface:VOMSACValidatorParses and validates the VOMS attributes found in the certificate chain passed as argument (which is assumed to be validated already). This method returns the possibly empty list of the validated attributes. This method should be used in conjunction with the registration of aValidationResultListenerto get details about validation error and warning messages. Use theVOMSACValidator.validateWithResult(X509Certificate[])method in case you don't want to rely on aValidationResultListener.- Specified by:
validatein interfaceVOMSACValidator- Parameters:
validatedChain- a validated X.509 certificate chain- Returns:
- a possibly empty list of
VOMSAttributeobject providing access to the validated VOMS attributes
-
shutdown
public void shutdown()
Description copied from interface:VOMSACValidatorShutdown the VOMS validator. This method should be called to perform final cleanup operations.- Specified by:
shutdownin interfaceVOMSACValidator
-
validateACs
public java.util.List<org.bouncycastle.asn1.x509.AttributeCertificate> validateACs(java.util.List<org.bouncycastle.asn1.x509.AttributeCertificate> acs)
Description copied from interface:VOMSACValidatorValidates the VOMS attributes found in the attribute certificate list passed as argument.- Specified by:
validateACsin interfaceVOMSACValidator- Parameters:
acs- a list ofAttributeCertificate- Returns:
- the validated and possibly empty list of
AttributeCertificateobject
-
setValidationResultListener
public void setValidationResultListener(ValidationResultListener listener)
Description copied from interface:VOMSACValidatorSets a listener that will received validation-related events for thisVOMSACValidator.- Specified by:
setValidationResultListenerin interfaceVOMSACValidator- Parameters:
listener- the listener that will receive validation-related events.
-
-