Class AbstractVOMSProtocol

  • All Implemented Interfaces:
    VOMSProtocol
    Direct Known Subclasses:
    LegacyProtocol, RESTProtocol

    public abstract class AbstractVOMSProtocol
    extends java.lang.Object
    implements VOMSProtocol
    Base implementation class for the VOMS client/server protocol
    • Field Detail

      • VOMS_LEGACY_ENABLED_PROTOCOLS

        public static final java.lang.String[] VOMS_LEGACY_ENABLED_PROTOCOLS
        Enabled TLS protocols for VOMS legacy connections.
      • DEFAULT_CONNECT_TIMEOUT

        public static final int DEFAULT_CONNECT_TIMEOUT
        The default value for the socket connection timeout
        See Also:
        Constant Field Values
      • DEFAULT_READ_TIMEOUT

        public static final int DEFAULT_READ_TIMEOUT
        The default value for the socket read timeout
        See Also:
        Constant Field Values
      • DEFAULT_SKIP_HOSTNAME_CHECKS

        public static final boolean DEFAULT_SKIP_HOSTNAME_CHECKS
        The default hostname checking policy.
        See Also:
        Constant Field Values
      • validator

        protected eu.emi.security.authn.x509.X509CertChainValidatorExt validator
        The CAnL validator used to manage SSL authentication.
      • connectTimeout

        protected int connectTimeout
        The tcp connection timeout (in milliseconds)
      • readTimeout

        protected int readTimeout
        The socket read timeout (in milliseconds)
      • skipHostnameChecks

        protected boolean skipHostnameChecks
        Whether to skip hostname checks
    • Constructor Detail

      • AbstractVOMSProtocol

        public AbstractVOMSProtocol​(eu.emi.security.authn.x509.X509CertChainValidatorExt validator)
        Ctor.
        Parameters:
        validator - the validator used to manage the SSL authentication
      • AbstractVOMSProtocol

        public AbstractVOMSProtocol​(eu.emi.security.authn.x509.X509CertChainValidatorExt validator,
                                    VOMSProtocolListener listener,
                                    int connectTimeout,
                                    int readTimeout)
        Ctor.
        Parameters:
        validator - the validator used to manage the SSL authentication
        listener - the listener informed of low-level protocol details
        connectTimeout - sets the socket connection timeout
        readTimeout - sets the socket read timeout
    • Method Detail

      • getSSLSocketFactory

        protected javax.net.ssl.SSLSocketFactory getSSLSocketFactory​(eu.emi.security.authn.x509.X509Credential credential)
        Builds an SSL socket factory based on the credential passed as argument and the validator configured for this AbstractVOMSProtocol
        Parameters:
        credential - the client credential used for the socket factory being created
        Returns:
        an SSLSocketFactory
      • getConnectTimeout

        public int getConnectTimeout()
        Returns:
        The connect timeout value (in milliseconds)
      • setConnectTimeout

        public void setConnectTimeout​(int connectTimeout)
        Sets the connection timeout value for the underlying socket of this AbstractVOMSProtocol
        Parameters:
        connectTimeout - the connection timeout in milliseconds
      • getReadTimeout

        public int getReadTimeout()
        Returns:
        the read timeout value (in milliseconds)
      • setReadTimeout

        public void setReadTimeout​(int readTimeout)
        Sets the read timeout value for the underlying socket
        Parameters:
        readTimeout - the read timeout in milliseconds
      • isSkipHostnameChecks

        public boolean isSkipHostnameChecks()
        Returns:
        whether this protocol will skip hostname checks
      • setSkipHostnameChecks

        public void setSkipHostnameChecks​(boolean skipHostnameChecks)
        Sets whether this protocol will skip SSL hostname checks
        Parameters:
        skipHostnameChecks - flag that defines whether hostname checks should be skipped for this protocol