The expected audience URI for access token validation (e.g. https://api.example.com).
OptionalcacheOptional cache for access token introspection results. Only tokens validated via
introspection are cached (opaque tokens, and JWTs when introspectJwtTokens is true);
locally-validated JWTs are not cached.
OptionalclientClient authentication method used when the client authenticates to the authorization server.
OptionalclientClient identifier of the application registered in MonoCloud.
OptionalclientClient secret or key material used for client authentication.
When clientAuthMethod is client_secret_jwt and a plain-text secret is provided, the default signing algorithm is HS256.
To use a different algorithm, provide a symmetric JSON Web Key (JWK) (kty: "oct") with the desired algorithm specified in its alg property.
When clientAuthMethod is spiffe_jwt, provide the SPIFFE JWT-SVID (obtained from the SPIFFE Workload API) as the plain-text string; it is sent as the client_assertion.
OptionalclockNumber of seconds to adjust the current time to account for clock differences.
OptionalclockAdditional time tolerance (in seconds) applied when validating time-based claims
(exp and nbf) on access tokens.
OptionalfetcherOptional custom fetch implementation used for network requests.
Optionalinit: RequestInitOptionalinit: RequestInitOptionalgroupOptions for group membership validation applied to all token validations performed by this client.
OptionalintrospectionDuration (in seconds) to cache token introspection results.
OptionalintrospectWhen true, JWT access tokens are introspected instead of locally validated.
This skips JWT signature/header/payload checks and always uses the introspection endpoint.
OptionaljwksDuration (in seconds) to cache the JSON Web Key Set (JWKS) retrieved from the authorization server.
OptionaljwksOptional custom resolver for the JSON Web Key Set (JWKS).
OptionalmetadataDuration (in seconds) to cache OpenID Connect discovery metadata.
OptionalmetadataOptional custom resolver for the issuer metadata (OpenID Connect discovery document).
OptionalresponseMaximum time (in milliseconds) to wait for responses from the MonoCloud authorization server before the request is aborted.
The MonoCloud tenant domain URL (e.g. https://example.monocloud.dev).
OptionaltrustIdentifier of the trust store whose mTLS endpoint aliases should be used when authenticating with a mutual-TLS client authentication method.
OptionalvalidateControls whether access tokens are validated as being bound to the client certificate presented with the request.
Configuration options for the MonoCloudBackendNodeClient.
Configuration Sources
Configuration values can be provided using either:
MONOCLOUD_BACKEND_*variables.When both are provided, constructor options override environment variables.
Environment Variables
Core Configuration (Required)
MONOCLOUD_BACKEND_TENANT_DOMAINhttps://your-tenant.us.monocloud.com).MONOCLOUD_BACKEND_AUDIENCEhttps://api.example.com).Introspection
MONOCLOUD_BACKEND_CLIENT_IDMONOCLOUD_BACKEND_CLIENT_SECRETclientAuthMethodisprivate_key_jwt, provide the private key JWK as a JSON string (it is parsed automatically).MONOCLOUD_BACKEND_CLIENT_AUTH_METHODmTLS
MONOCLOUD_BACKEND_TRUST_STORE_IDmtls_additional_endpoint_aliases) should be used when authenticating with a mutual-TLS client authentication method. When omitted, the defaultmtls_endpoint_aliasesare used.Token Validation
MONOCLOUD_BACKEND_CLOCK_SKEWMONOCLOUD_BACKEND_CLOCK_TOLERANCEMONOCLOUD_BACKEND_INTROSPECT_JWT_TOKENStrue, JWT tokens are introspected at the server instead of being validated locally.MONOCLOUD_BACKEND_VALIDATE_CERTIFICATE_BINDINGMONOCLOUD_BACKEND_RESPONSE_TIMEOUTGroup Validation
MONOCLOUD_BACKEND_GROUPS_CLAIMMONOCLOUD_BACKEND_GROUPS_MATCH_ALLtrue, requires the token to contain all specified groups.Caching
MONOCLOUD_BACKEND_JWKS_CACHE_DURATIONMONOCLOUD_BACKEND_METADATA_CACHE_DURATIONMONOCLOUD_BACKEND_INTROSPECTION_CACHE_DURATION