Class GcpStsVerifier
- All Implemented Interfaces:
Provider,SdkService
SignJwt API) by verifying the JWT's RSA signature against
the service account's Google-managed public keys.
The public keys are published at
https://www.googleapis.com/service_accounts/v1/metadata/jwk/{serviceAccountEmail} as a JWKS
document. The verifier selects the key by the JWT kid header, verifies the signature,
enforces the exp/iat time bounds with a small clock-skew tolerance, and returns
the identity carried in the token's iss/sub claims.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.salesforce.multicloudj.sts.driver.AbstractStsVerifier
providerId, region -
Constructor Summary
ConstructorsConstructorDescriptionGcpStsVerifier(GcpStsVerifier.Builder builder) GcpStsVerifier(GcpStsVerifier.Builder builder, com.google.auth.http.HttpTransportFactory httpTransportFactory) Constructor that accepts a preconfigured transport factory, used by tests. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates and returns a new Builder instance for this provider.Maps a provider-specificThrowableto a fully-builtSubstrateSdkExceptionthe caller can throw directly.protected CallerIdentityvalidateSignedAuthRequest(String signedIdentity, ValidateOptions options) Substrate-specific implementation that validates the signed identity and returns the caller identity.Methods inherited from class com.salesforce.multicloudj.sts.driver.AbstractStsVerifier
getProviderId, verifySignedAuthRequest, verifySignedAuthRequest
-
Constructor Details
-
GcpStsVerifier
public GcpStsVerifier() -
GcpStsVerifier
-
GcpStsVerifier
public GcpStsVerifier(GcpStsVerifier.Builder builder, com.google.auth.http.HttpTransportFactory httpTransportFactory) Constructor that accepts a preconfigured transport factory, used by tests.
-
-
Method Details
-
builder
Description copied from interface:ProviderCreates and returns a new Builder instance for this provider.- Returns:
- A Builder instance for constructing this provider.
-
validateSignedAuthRequest
Description copied from class:AbstractStsVerifierSubstrate-specific implementation that validates the signed identity and returns the caller identity.- Specified by:
validateSignedAuthRequestin classAbstractStsVerifier- Parameters:
signedIdentity- the portable token string produced by a signer.options- validation options; may be null.- Returns:
- the verified
CallerIdentity.
-
mapException
Description copied from interface:SdkServiceMaps a provider-specificThrowableto a fully-builtSubstrateSdkExceptionthe caller can throw directly. The returned exception carries both the typed mapping (e.g.ResourceNotFoundExceptionfor HTTP 404) and an authoritative retryable flag derived from the native cloud SDK signal (e.g. AWS throttling, GCPApiException.isRetryable(), status codes), or the type's default retryability when the SDK exposes no native signal.Callers throw the result; they do not inspect or transform it further:
try { ... } catch (Throwable t) { throw provider.mapException(t); }Implementation contract: implementations should compute a typed exception class (typically via their per-service
ErrorCodeMapping) and a retryable hint, then returnExceptionHandler.build(exceptionClass, t, retryableHint). Implementations do not need to short-circuit whentis already aSubstrateSdkException:ExceptionHandler.buildpreserves an already-mapped exception's concrete subtype and retryable flag.- Parameters:
t- the original throwable from the provider SDK- Returns:
- a built
SubstrateSdkExceptionready to throw
-