Class DefaultVOMSACService
- java.lang.Object
-
- org.italiangrid.voms.request.impl.DefaultVOMSACService
-
- All Implemented Interfaces:
VOMSACService
public class DefaultVOMSACService extends java.lang.Object implements VOMSACService
The default implementation of theVOMSACService.- Author:
- Valerio Venturi, Andrea Ceccanti
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultVOMSACService.BuilderCreates aDefaultVOMSACServiceobject.
-
Field Summary
Fields Modifier and Type Field Description protected VOMSProtocolhttpProtocolThe http protocol implementationprotected VOMSProtocollegacyProtocolThe voms legacy protocol implementationprotected booleanlegacyProtocolEnabledWhether VOMS legacy protocol should be used as a fallback when REST protocol failsprotected VOMSProtocolListenerprotocolListenerThe listener that will be informed about low-level protocol detailsprotected VOMSRequestListenerrequestListenerThe listener that will be informed about request eventsprotected VOMSServerInfoStoreserverInfoStoreThe store used to keep VOMS server contact information.protected eu.emi.security.authn.x509.X509CertChainValidatorExtvalidatorThe validator used for the SSL handshake
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultVOMSACService(DefaultVOMSACService.Builder builder)Constructor which builds aDefaultVOMSACServicefrom aDefaultVOMSACService.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 java.util.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 Detail
-
requestListener
protected final VOMSRequestListener requestListener
The listener that will be informed about request events
-
protocolListener
protected final VOMSProtocolListener protocolListener
The listener that will be informed about low-level protocol details
-
validator
protected final eu.emi.security.authn.x509.X509CertChainValidatorExt validator
The validator used for the SSL handshake
-
serverInfoStore
protected final VOMSServerInfoStore serverInfoStore
The store used to keep VOMS server contact information.
-
httpProtocol
protected final VOMSProtocol httpProtocol
The http protocol implementation
-
legacyProtocol
protected final VOMSProtocol legacyProtocol
The voms legacy protocol implementation
-
legacyProtocolEnabled
protected final boolean legacyProtocolEnabled
Whether VOMS legacy protocol should be used as a fallback when REST protocol fails
-
-
Constructor Detail
-
DefaultVOMSACService
protected DefaultVOMSACService(DefaultVOMSACService.Builder builder)
Constructor which builds aDefaultVOMSACServicefrom aDefaultVOMSACService.Builder- Parameters:
builder- the builder object that provides the settings for thisVOMSACService
-
-
Method Detail
-
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
-
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
protected java.util.List<VOMSServerInfo> getVOMSServerInfos(VOMSACRequest request)
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
-
-