Class DefaultVOMSACService
java.lang.Object
org.italiangrid.voms.request.impl.DefaultVOMSACService
- All Implemented Interfaces:
VOMSACService
The default implementation of the
VOMSACService.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final VOMSProtocolThe http protocol implementationprotected final VOMSProtocolThe voms legacy protocol implementationprotected final booleanWhether VOMS legacy protocol should be used as a fallback when REST protocol failsprotected final VOMSProtocolListenerThe listener that will be informed about low-level protocol detailsprotected final VOMSRequestListenerThe listener that will be informed about request eventsprotected final VOMSServerInfoStoreThe store used to keep VOMS server contact information.protected final eu.emi.security.authn.x509.X509CertChainValidatorExtThe validator used for the SSL handshake -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor which builds aDefaultVOMSACServicefrom aDefaultVOMSACService.Builder -
Method Summary
Modifier and TypeMethodDescriptionprivate VOMSResponsedoRequest(VOMSProtocol protocol, VOMSServerInfo endpoint, eu.emi.security.authn.x509.X509Credential cred, VOMSACRequest req) protected org.bouncycastle.asn1.x509.AttributeCertificategetACFromResponse(VOMSACRequest request, VOMSResponse response) Extracts an AC from a VOMS responseorg.bouncycastle.asn1.x509.AttributeCertificategetVOMSAttributeCertificate(eu.emi.security.authn.x509.X509Credential credential, VOMSACRequest request) Returns anAttributeCertificategiven aVOMSACRequestfor VOMS attributes.protected List<VOMSServerInfo> getVOMSServerInfos(VOMSACRequest request) Get VOMS server endpoint information that matches with theVOMSACRequestpassed as argument.protected voidhandleErrorsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response) Handles errors included in the VOMS responseprotected voidhandleWarningsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response) Handles warnings included in the VOMS response
-
Field Details
-
requestListener
The listener that will be informed about request events -
protocolListener
The listener that will be informed about low-level protocol details -
validator
protected final eu.emi.security.authn.x509.X509CertChainValidatorExt validatorThe validator used for the SSL handshake -
serverInfoStore
The store used to keep VOMS server contact information. -
httpProtocol
The http protocol implementation -
legacyProtocol
The voms legacy protocol implementation -
legacyProtocolEnabled
protected final boolean legacyProtocolEnabledWhether VOMS legacy protocol should be used as a fallback when REST protocol fails
-
-
Constructor Details
-
DefaultVOMSACService
Constructor which builds aDefaultVOMSACServicefrom aDefaultVOMSACService.Builder- Parameters:
builder- the builder object that provides the settings for thisVOMSACService
-
-
Method Details
-
getACFromResponse
protected org.bouncycastle.asn1.x509.AttributeCertificate getACFromResponse(VOMSACRequest request, VOMSResponse response) Extracts an AC from a VOMS response- Parameters:
request- the requestresponse- the received response- Returns:
- a possibly
nullAttributeCertificateobject
-
doRequest
private VOMSResponse doRequest(VOMSProtocol protocol, VOMSServerInfo endpoint, eu.emi.security.authn.x509.X509Credential cred, VOMSACRequest req) -
handleErrorsInResponse
protected void handleErrorsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response) Handles errors included in the VOMS response- Parameters:
request- the requestsi- the VOMS server endpoint informationresponse- the receivedVOMSResponse
-
handleWarningsInResponse
protected void handleWarningsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response) Handles warnings included in the VOMS response- Parameters:
request- the requestsi- the VOMS server endpoint informationresponse- the receivedVOMSResponse
-
getVOMSAttributeCertificate
public org.bouncycastle.asn1.x509.AttributeCertificate getVOMSAttributeCertificate(eu.emi.security.authn.x509.X509Credential credential, VOMSACRequest request) Description copied from interface:VOMSACServiceReturns anAttributeCertificategiven aVOMSACRequestfor VOMS attributes.- Specified by:
getVOMSAttributeCertificatein interfaceVOMSACService- Parameters:
credential- the credential to be used when contacting the servicerequest- the request for VOMS attributes- Returns:
- a possibly null
AttributeCertificatecontaining (a subset of) the requested attributes.
-
getVOMSServerInfos
Get VOMS server endpoint information that matches with theVOMSACRequestpassed as argument. This method returns a random shuffle of theVOMSServerInfoobjects that match the input request.- Parameters:
request- the request- Returns:
- a possibly empty
ListofVOMSServerInfoobjects
-