Interface TenantConfig

All Known Implementing Classes:
OidcConfig

public interface TenantConfig
Tenant configuration.
  • Method Details

    • tenantBuilder

      static TenantConfig.Builder tenantBuilder()
      Create new TenantConfig.Builder instance.
      Returns:
      new builder instance
    • clientId

      String clientId()
      Client id of this client.
      Returns:
      client id
    • name

      String name()
      Name of the tenant.
      Returns:
      tenant name
    • baseScopes

      String baseScopes()
      Base scopes to require from OIDC server.
      Returns:
      base scopes
    • validateJwtWithJwk

      boolean validateJwtWithJwk()
      Whether to validate JWT with JWK information (e.g. verify signatures locally).
      Returns:
      if we should validate JWT with JWK
    • tenantIntrospectUri

      Optional<URI> tenantIntrospectUri()
      Introspection endpoint URI. Empty if no introspection endpoint has been provided via configuration.
      Returns:
      introspection endpoint URI
    • tenantIssuer

      Optional<String> tenantIssuer()
      Return provided token issuer. Empty if no issuer has been provided via configuration.
      Returns:
      token issuer
    • tenantSignJwk

      Optional<JwkKeys> tenantSignJwk()
      JWK used for signature validation. Empty if no jwk has been provided via configuration.
      Returns:
      set of keys used to verify tokens
    • tenantSignJwkResource

      default Optional<ResourceConfig> tenantSignJwkResource()
      Repeatable resource configuration used to load signing JWK.
      Returns:
      signing JWK resource configuration, if configured
    • jwkRetry

      default Retry jwkRetry()
      Retry used while loading OIDC metadata and signing JWKs. Defaults to two attempts within an 11-second overall timeout. The retry wraps attempts guarded by jwkTimeout().
      Returns:
      retry to use
    • jwkTimeout

      default Timeout jwkTimeout()
      Timeout applied to each attempt to load OIDC metadata and signing JWKs. Defaults to 5 seconds. The timeout must be positive and must not exceed the retry overall timeout.
      Returns:
      timeout to use
    • jwkCircuitBreaker

      default CircuitBreaker jwkCircuitBreaker()
      Circuit breaker used while loading OIDC metadata and signing JWKs. By default, the circuit opens after one exhausted retry batch and permits a recovery probe after 5 seconds. The circuit breaker wraps the complete retry batch.
      Returns:
      circuit breaker to use
    • tenantLoadingLazy

      default boolean tenantLoadingLazy()
      Whether creating the tenant requires a source that may become available later.
      Returns:
      true when tenant creation should be lazy
    • tenantLogoutEndpointUri

      Optional<URI> tenantLogoutEndpointUri()
      Logout endpoint on OIDC server. Empty if no logout endpoint uri has been provided via configuration.
      Returns:
      URI of the logout endpoint
    • tenantTokenEndpointUri

      Optional<URI> tenantTokenEndpointUri()
      Token endpoint URI. Empty if no token endpoint uri has been provided via configuration.
      Returns:
      endpoint URI
    • audience

      String audience()
      Expected token audience.
      Returns:
      audience
    • checkAudience

      boolean checkAudience()
      Whether to validate audience token.
      Returns:
      audience
    • scopeAudience

      String scopeAudience()
      Audience URI of custom scopes.
      Returns:
      scope audience
    • identityUri

      URI identityUri()
      Identity server URI.
      Returns:
      identity server URI
    • realm

      String realm()
      Realm to use for WWW-Authenticate response (if needed).
      Returns:
      realm name
    • tokenEndpointAuthentication

      OidcConfig.ClientAuthentication tokenEndpointAuthentication()
      Type of authentication mechanism used for token endpoint.
      Returns:
      client authentication type
    • clientTimeout

      Duration clientTimeout()
      Expected timeout of HTTP client operations.
      Returns:
      client timeout
    • authorizationEndpoint

      Optional<URI> authorizationEndpoint()
      Authorization endpoint.
      Returns:
      authorization endpoint uri as a string
    • clientSecret

      String clientSecret()
      Client secret.
      Returns:
      configured client secret
    • serverType

      String serverType()
      Server type.
      Returns:
      configured server type
    • oidcMetadataJsonObject

      JsonObject oidcMetadataJsonObject()
      OIDC metadata in Helidon JSON.
      Returns:
      configured oidc metadata
    • oidcMetadataResource

      default Optional<ResourceConfig> oidcMetadataResource()
      Repeatable resource configuration used to load OIDC metadata.
      Returns:
      OIDC metadata resource configuration, if configured
    • useWellKnown

      boolean useWellKnown()
      Whether to use OIDC well known metadata.
      Returns:
      configured oidc metadata
    • contentKeyDecryptionKeys

      default Optional<JwkKeys> contentKeyDecryptionKeys()
      Used for JWE (Encrypted JWT) content encryption key decryption.
      Returns:
      content encryption key decryption keys