public class CertificateBasedAccessUtility class for handling certificate-based access configurations.
This class handles the processing of GOOGLE_API_USE_CLIENT_CERTIFICATE, GOOGLE_API_CERTIFICATE_CONFIG, and GOOGLE_API_USE_MTLS_ENDPOINT configurations.
Static Methods
createWithSystemEnv()
public static CertificateBasedAccess createWithSystemEnv()| Returns | |
|---|---|
| Type | Description |
CertificateBasedAccess |
|
Constructors
CertificateBasedAccess(EnvironmentProvider envProvider)
public CertificateBasedAccess(EnvironmentProvider envProvider)| Parameter | |
|---|---|
| Name | Description |
envProvider |
EnvironmentProvider |
Methods
createDefaultMtlsProvider()
public MtlsProvider createDefaultMtlsProvider()Creates the default MtlsProvider for the environment.
| Returns | |
|---|---|
| Type | Description |
com.google.auth.mtls.MtlsProvider |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
getMtlsEndpointUsagePolicy()
public CertificateBasedAccess.MtlsEndpointUsagePolicy getMtlsEndpointUsagePolicy()Returns the current mutual TLS endpoint usage policy.
| Returns | |
|---|---|
| Type | Description |
CertificateBasedAccess.MtlsEndpointUsagePolicy |
|
getWorkloadCertPath()
public String getWorkloadCertPath()Resolves and returns the path to the mutual TLS client certificate, or null if none should be used.
| Returns | |
|---|---|
| Type | Description |
String |
|
useMtlsClientCertificate()
public boolean useMtlsClientCertificate()Returns if mutual TLS client certificate should be used.
| Returns | |
|---|---|
| Type | Description |
boolean |
|