Class DefaultVOMSACService
java.lang.Object
org.italiangrid.voms.request.impl.DefaultVOMSACService
- All Implemented Interfaces:
VOMSACService
The default implementation of the
VOMSACService
.- Author:
- Valerio Venturi, Andrea Ceccanti
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final VOMSProtocol
The http protocol implementationprotected final VOMSProtocol
The voms legacy protocol implementationprotected final boolean
Whether VOMS legacy protocol should be used as a fallback when REST protocol failsprotected final VOMSProtocolListener
The listener that will be informed about low-level protocol detailsprotected final VOMSRequestListener
The listener that will be informed about request eventsprotected final VOMSServerInfoStore
The store used to keep VOMS server contact information.protected final eu.emi.security.authn.x509.X509CertChainValidatorExt
The validator used for the SSL handshake -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor which builds aDefaultVOMSACService
from aDefaultVOMSACService.Builder
-
Method Summary
Modifier and TypeMethodDescriptionprotected org.bouncycastle.asn1.x509.AttributeCertificate
getACFromResponse
(VOMSACRequest request, VOMSResponse response) Extracts an AC from a VOMS responseorg.bouncycastle.asn1.x509.AttributeCertificate
getVOMSAttributeCertificate
(eu.emi.security.authn.x509.X509Credential credential, VOMSACRequest request) Returns anAttributeCertificate
given aVOMSACRequest
for VOMS attributes.protected List
<VOMSServerInfo> getVOMSServerInfos
(VOMSACRequest request) Get VOMS server endpoint information that matches with theVOMSACRequest
passed as argument.protected void
handleErrorsInResponse
(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response) Handles errors included in the VOMS responseprotected void
handleWarningsInResponse
(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 aDefaultVOMSACService
from 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
null
AttributeCertificate
object
-
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:VOMSACService
Returns anAttributeCertificate
given aVOMSACRequest
for VOMS attributes.- Specified by:
getVOMSAttributeCertificate
in interfaceVOMSACService
- Parameters:
credential
- the credential to be used when contacting the servicerequest
- the request for VOMS attributes- Returns:
- a possibly null
AttributeCertificate
containing (a subset of) the requested attributes.
-
getVOMSServerInfos
Get VOMS server endpoint information that matches with theVOMSACRequest
passed as argument. This method returns a random shuffle of theVOMSServerInfo
objects that match the input request.- Parameters:
request
- the request- Returns:
- a possibly empty
List
ofVOMSServerInfo
objects
-