Class SecureSessionAgent
mTLS configuration is queried from the MDS MTLS Autoconfiguration endpoint. See https://google.aip.dev/auth/4115 for details.
This is an experimental utility.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
private static final String
(package private) static final String
private static final String
(package private) static final String
(package private) static final String
(package private) static final String
private HttpTransportFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecureSessionAgent
create()
This method makes a network call to MDS to get theSecureSessionAgentConfig
which contains the plaintext and mtls address to reach the S2A (Secure Session Agent).private SecureSessionAgentConfig
Queries the MDS mTLS Autoconfiguration endpoint and returns theSecureSessionAgentConfig
.static SecureSessionAgent.Builder
-
Field Details
-
S2A_PLAINTEXT_ADDRESS_JSON_KEY
- See Also:
-
S2A_MTLS_ADDRESS_JSON_KEY
- See Also:
-
S2A_CONFIG_ENDPOINT_POSTFIX
- See Also:
-
METADATA_FLAVOR
- See Also:
-
GOOGLE
- See Also:
-
RETRYABLE_STATUS_CODES
-
PARSE_ERROR_S2A
- See Also:
-
MDS_MTLS_ENDPOINT
-
transportFactory
-
-
Constructor Details
-
SecureSessionAgent
SecureSessionAgent(SecureSessionAgent.Builder builder)
-
-
Method Details
-
getConfig
This method makes a network call to MDS to get theSecureSessionAgentConfig
which contains the plaintext and mtls address to reach the S2A (Secure Session Agent).- Returns:
- a SecureSessionAgentConfig.
-
create
- Returns:
- default instance of SecureSessionAgent
-
newBuilder
-
getSecureSessionAgentConfigFromMDS
Queries the MDS mTLS Autoconfiguration endpoint and returns theSecureSessionAgentConfig
.Returns
SecureSessionAgentConfig
. If S2A is not running, or if any error occurs when making the request to MDS / processing the response,SecureSessionAgentConfig
will be populated with empty addresses.Users are expected to try to fetch the mTLS-S2A address first (via
invalid reference
getMtlsS2AAddress
invalid reference
getPlaintextS2AAddress
- Returns:
- the
SecureSessionAgentConfig
.
-