Package google.registry.flows
Class TlsCredentials
java.lang.Object
google.registry.flows.TlsCredentials
- All Implemented Interfaces:
TransportCredentials
Container and validation for TLS certificate and IP-allow-listing.
Credentials are based on the following headers:
- X-SSL-Certificate
- This field should contain a base64 encoded digest of the client's TLS certificate. It is used only if the validation of the full certificate fails.
- X-Forwarded-For
- This field should contain the host and port of the connecting client. It is validated during an EPP login command against an IP allow list that is transmitted out of band.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Registrar certificate does not match stored certificate.static class
Registrar IP address is not in stored allow list.static class
Registrar certificate contains the following security violations: ...static final class
Dagger module for the EPP TLS endpoint.static class
Registrar certificate not present.static class
Registrar certificate is not configured.Nested classes/interfaces inherited from interface google.registry.flows.TransportCredentials
TransportCredentials.BadRegistrarPasswordException
-
Constructor Summary
ConstructorDescriptionTlsCredentials
(boolean requireSslCertificates, Optional<String> clientCertificateHash, Optional<InetAddress> clientInetAddr, CertificateChecker certificateChecker) -
Method Summary
-
Constructor Details
-
TlsCredentials
@Inject public TlsCredentials(@Config("requireSslCertificates") boolean requireSslCertificates, @Header("X-SSL-Certificate") Optional<String> clientCertificateHash, Optional<InetAddress> clientInetAddr, CertificateChecker certificateChecker)
-
-
Method Details
-
validate
public void validate(Registrar registrar, String password) throws EppException.AuthenticationErrorException Description copied from interface:TransportCredentials
Check that these credentials are valid for the registrar and optionally check the password.Called by
LoginFlow
to check the transport credentials against the stored registrar's credentials. If they do not match, throw anEppException.AuthenticationErrorException
.- Specified by:
validate
in interfaceTransportCredentials
- Throws:
EppException.AuthenticationErrorException
-
toString
-