public class CertificateBasedAccessUtility 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
Static Methods
createWithSystemEnv()
public static CertificateBasedAccess createWithSystemEnv()| Returns | |
|---|---|
| Type | Description |
CertificateBasedAccess |
|
Constructors
CertificateBasedAccess(EnvironmentProvider envProvider)
public CertificateBasedAccess(EnvironmentProvider envProvider)The EnvironmentProvider mechanism supports env var injection for unit tests.
| Parameter | |
|---|---|
| Name | Description |
envProvider |
EnvironmentProvider |
Methods
getMtlsEndpointUsagePolicy()
public CertificateBasedAccess.MtlsEndpointUsagePolicy getMtlsEndpointUsagePolicy()Returns the current mutual TLS endpoint usage policy.
| Returns | |
|---|---|
| Type | Description |
CertificateBasedAccess.MtlsEndpointUsagePolicy |
|
useMtlsClientCertificate()
public boolean useMtlsClientCertificate()Returns if mutual TLS client certificate should be used.
| Returns | |
|---|---|
| Type | Description |
boolean |
|