Package com.google.api.gax.rpc.mtls
Class CertificateBasedAccess
java.lang.Object
com.google.api.gax.rpc.mtls.CertificateBasedAccess
Utility class for handling certificate-based access configurations.
This class handles the processing of GOOGLE_API_USE_CLIENT_CERTIFICATE and GOOGLE_API_USE_MTLS_ENDPOINT environment variables according to https://google.aip.dev/auth/4114
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe policy for mutual TLS endpoint usage. -
Constructor Summary
ConstructorsConstructorDescriptionCertificateBasedAccess(EnvironmentProvider envProvider) The EnvironmentProvider mechanism supports env var injection for unit tests. -
Method Summary
Modifier and TypeMethodDescriptionstatic CertificateBasedAccessReturns the current mutual TLS endpoint usage policy.booleanReturns if mutual TLS client certificate should be used.
-
Constructor Details
-
CertificateBasedAccess
The EnvironmentProvider mechanism supports env var injection for unit tests.
-
-
Method Details
-
createWithSystemEnv
-
useMtlsClientCertificate
public boolean useMtlsClientCertificate()Returns if mutual TLS client certificate should be used. -
getMtlsEndpointUsagePolicy
Returns the current mutual TLS endpoint usage policy.
-