Record Class ProxyProtocolV2Data.Tlv.Ssl
java.lang.Object
java.lang.Record
io.helidon.webserver.ProxyProtocolV2Data.Tlv.Ssl
- Record Components:
client- Client flags bitfield.verify- Verification status.subTlvs- The SSL subtype TLVs.
- All Implemented Interfaces:
ProxyProtocolV2Data.Tlv
- Enclosing interface:
ProxyProtocolV2Data.Tlv
public static record ProxyProtocolV2Data.Tlv.Ssl(int client, int verify, List<ProxyProtocolV2Data.Tlv> subTlvs)
extends Record
implements ProxyProtocolV2Data.Tlv
Contains information about the SSL presented by the proxied client.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ProxyProtocolV2Data.Tlv
ProxyProtocolV2Data.Tlv.Alpn, ProxyProtocolV2Data.Tlv.Authority, ProxyProtocolV2Data.Tlv.Crc32c, ProxyProtocolV2Data.Tlv.Netns, ProxyProtocolV2Data.Tlv.Noop, ProxyProtocolV2Data.Tlv.Ssl, ProxyProtocolV2Data.Tlv.SslCipher, ProxyProtocolV2Data.Tlv.SslCn, ProxyProtocolV2Data.Tlv.SslKeyAlg, ProxyProtocolV2Data.Tlv.SslSigAlg, ProxyProtocolV2Data.Tlv.SslVersion, ProxyProtocolV2Data.Tlv.UniqueId, ProxyProtocolV2Data.Tlv.UnregisteredModifier and TypeInterfaceDescriptionstatic final recordApplication-Layer Protocol Negotiation (ALPN).static final recordContains the host name value passed by the client, as an UTF8-encoded string.static final recordThe value of the type PP2_TYPE_CRC32C is a 32-bit number storing the CRC32c checksum of the PROXY protocol header.static final recordDefines the value as the US-ASCII string representation of the namespace's name.static final recordThe TLV of this type should be ignored when parsed.static final recordContains information about the SSL presented by the proxied client.static final recordThe name of the used cipher, for example "ECDHE-RSA-AES128-GCM-SHA256".static final recordContains the representation of the Common Name field (OID: 2.5.4.3) of the client certificate's Distinguished Name.static final recordThe name of the algorithm used to generate the key of the certificate presented by the frontend when the incoming connection was made over an SSL/TLS transport layer, for example "RSA2048".static final recordThe name of the algorithm used to sign the certificate presented by the frontend when the incoming connection was made over an SSL/TLS transport layer, for example "SHA256".static final recordContains informatino about the version of the TLS protocol used.static final recordThe value of the type PP2_TYPE_UNIQUE_ID is an opaque byte sequence of up to 128 bytes generated by the upstream proxy that uniquely identifies the connection.static final recordA TLV whose type is not defined in the protocol specification. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe PP2_CLIENT_CERT_CONN bitflag.static final intThe PP2_CLIENT_CERT_SESS bitflag.static final intThe PP2_CLIENT_SSL bitflag.Fields inherited from interface ProxyProtocolV2Data.Tlv
PP2_SUBTYPE_SSL_CIPHER, PP2_SUBTYPE_SSL_CN, PP2_SUBTYPE_SSL_KEY_ALG, PP2_SUBTYPE_SSL_SIG_ALG, PP2_SUBTYPE_SSL_VERSION, PP2_TYPE_ALPN, PP2_TYPE_AUTHORITY, PP2_TYPE_CRC32C, PP2_TYPE_NETNS, PP2_TYPE_NOOP, PP2_TYPE_SSL, PP2_TYPE_UNIQUE_IDModifier and TypeFieldDescriptionstatic final intThe PP2_SUBTYPE_SSL_CIPHER TLV type identifier.static final intThe PP2_SUBTYPE_SSL_CN TLV type identifier.static final intThe PP2_SUBTYPE_SSL_KEY_ALG TLV type identifier.static final intThe PP2_SUBTYPE_SSL_SIG_ALG TLV type identifier.static final intThe PP2_SUBTYPE_SSL_VERSION TLV type identifier.static final intThe PP2_TYPE_ALPN TLV type identifier.static final intThe PP2_TYPE_AUTHORITY TLV type identifier.static final intThe PP2_TYPE_CRC32C TLV type identifier.static final intThe PP2_TYPE_NETNS TLV type identifier.static final intThe PP2_TYPE_NOOP TLV type identifier.static final intThe PP2_TYPE_SSL TLV type identifier.static final intThe PP2_TYPE_UNIQUE_ID TLV type identifier. -
Constructor Summary
ConstructorsConstructorDescriptionSsl(int client, int verify, List<ProxyProtocolV2Data.Tlv> subTlvs) Creates an instance of aSslrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintclient()Returns the value of theclientrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanTests whether the PP2_CLIENT_CERT_CONN flag is set.booleanTests whether the PP2_CLIENT_CERT_SESS flag is set.booleanTests whether the PP2_CLIENT_SSL flag is set.final inthashCode()Returns a hash code value for this object.booleanTests whether the client presented a certificate and it was successfully verified.subTlvs()Returns the value of thesubTlvsrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the TLV's type identifier.intverify()Returns the value of theverifyrecord component.
-
Field Details
-
PP2_CLIENT_SSL
public static final int PP2_CLIENT_SSLThe PP2_CLIENT_SSL bitflag.- See Also:
-
PP2_CLIENT_CERT_CONN
public static final int PP2_CLIENT_CERT_CONNThe PP2_CLIENT_CERT_CONN bitflag.- See Also:
-
PP2_CLIENT_CERT_SESS
public static final int PP2_CLIENT_CERT_SESSThe PP2_CLIENT_CERT_SESS bitflag.- See Also:
-
-
Constructor Details
-
Method Details
-
type
public int type()Description copied from interface:ProxyProtocolV2Data.TlvReturns the TLV's type identifier.- Specified by:
typein interfaceProxyProtocolV2Data.Tlv- Returns:
- The type identifier.
-
isSuccessfullyVerified
public boolean isSuccessfullyVerified()Tests whether the client presented a certificate and it was successfully verified.- Returns:
- True if the client cert was present and valid.
-
hasClientSsl
public boolean hasClientSsl()Tests whether the PP2_CLIENT_SSL flag is set.- Returns:
- True if the PP2_CLIENT_SSL is set.
-
hasClientCertConn
public boolean hasClientCertConn()Tests whether the PP2_CLIENT_CERT_CONN flag is set.- Returns:
- True if the PP2_CLIENT_CERT_CONN is set.
-
hasClientCertSess
public boolean hasClientCertSess()Tests whether the PP2_CLIENT_CERT_SESS flag is set.- Returns:
- True if the PP2_CLIENT_CERT_SESS is set.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
client
-
verify
-
subTlvs
-