Tenant

This section covers the data structures and types used by the persisted database entity, as well as the JSON input and output models used by the Configuration Dashboard API.

TenantEntity (Database Record)

tenant Database Table

FieldTypeDescription
idStringPrimary key of the database table.
tenant_idStringId used by the Configuration Dashboard.
nameStringCustom name of the Tenant.
app_idStringAdd the app- prefix to the value before using it as the App-Id HTTP header when sending requests to the Gateway. Alternatively, use the appId field from the TenantResource returned by the Dashboard API, which already includes the required prefix.
app_keyStringThe value can not be used directly from the database because it is encrypted using the Tenant's encrypt_key. Instead, use the appKey field from the TenantResource returned by the Dashboard API as the App-Key HTTP header when sending requests to the Gateway.
encrypt_keyStringThis key is automatically generated when a Tenant is created through the Configuration Dashboard. It is used by the system to encrypt and decrypt data belonging to that specific Tenant. Every Tenant has its own unique encrypt_key value. The Tenant encrypt_key is encrypted using the encryption key stored in the secret_key database table. This last key is itself encrypted using the ENCRYPTION_KEY environment variable, which is the only encryption key manually configured by you.
hash_keyStringThis key is automatically generated when a Tenant is created through the Configuration Dashboard. It is used by the system to hash Tenant data that cannot be encrypted but still needs to be obfuscated, such as usernames stored in the tenant_user table.
The hash_key is encrypted using the Tenant encrypt_key.
Each Tenant has its own unique hash_key value.
The hashing algorithm used is HMAC-SHA256.
saved_configTenantConfigThe saved_config field contains a JSON object of type TenantConfig. It represents a draft configuration and is not the configuration currently used by the Gateway during HTTP request processing.
Changes made to saved_config do not affect the Gateway behavior until the configuration is activated.
The saved_config object can be updated and activated through the Configuration Dashboard API.
active_configTenantConfigThe active_config field contains a JSON object of type TenantConfig.
It represents the configuration currently used by the Gateway when processing HTTP requests.
The active_config cannot be updated directly. To apply a new configuration, you must first update saved_config and then activate it using the Configuration Dashboard API.
When the activation API is called, the content of saved_config is copied into active_config. From that moment on, the Gateway uses the new configuration for all incoming requests.
createdDateTimeUTC timestamp indicating when the Tenant was created.
updatedDateTimeUTC timestamp indicating the last time the Tenant was updated.

TenantDto (Dashboard API Input)

{
  "name": "name",
  "config": { }, // See TenantConfig type
}
FieldTypeRequiredDescription
nameStringyesCustom name of the Tenant.
configTenantConfigyesThe Tenant configuration stored in the database saved_config field. See the TenantEntity type for details.

TenantResource (Dashboard API Output)

{
  "tenantId": "0fa71be9-dbea-4f80-8eef-08a6182d223c",
  "name": "tenant-test",
  "appId": "app-001ce092-6265-4560-a446-053dbcf9d0f8",
  "appKey": "key-UHMJfODRh9/N0n8SSd6Itbk0mu5MFznD1VmrJXqSk4Q=",
  "savedConfig": { }, // See TenantConfig type
  "activeConfig": { }, // See TenantConfig type
  "created": "2026-07-30T11:47:32.991Z",
  "updated": "2026-08-25T07:16:06.762Z",
  "isActive": true
}
FieldTypeDescription
tenantIdStringSee the TenantEntity type for details.
nameStringSee the TenantEntity type for details.
appIdStringId that must be sent to the Gateway in the App-Id HTTP header with every request, in order to identify and retrieve the corresponding Tenant object from the database.
appKeyStringKey that must be sent to the Gateway in the App-Key HTTP header with every request, in order to authenticate the Tenant.
savedConfigTenantConfigSee the TenantEntity type for details.
activeConfigTenantConfigSee the TenantEntity type for details.
createdDateTimeSee the TenantEntity type for details.
updatedDateTimeSee the TenantEntity type for details.
isActiveBooleanIndicates whether the saved_config matches the active_config, meaning that the Tenant configuration is currently active.

TenantConfig

{
  "auth": {
      "type": "JWT",
      "jwt": {
          "strategy": "ACCESS_REFRESH",
          "accessToken": {
              "algorithm": "HMAC512",
              "secretKeyBytesNumber": 64,
              "secretKey": "signingKey",
              "durationType": "MINUTES",
              "durationValue": 15
          },
          "refreshToken": {
              "enableRotation": true, 
              "algorithm": "HMAC512",
              "secretKeyBytesNumber": 64,
              "secretKey": "signingKey",
              "durationType": "DAYS",
              "durationValue": 60
          },
          "tokenRevocation": "ACCESS_REFRESH"
      },
      "passwordResetConfirm": {
          "secretKey": "signingKey", 
          "expirySeconds": 600
      },
      "usernameUpdateConfirm": {
          "secretKey": "signingKey",  
          "expirySeconds": 600
      },
      "mfaConfirm": {
          "tokenDigitsNumber": 4,
          "secretKey": "signingKey",
          "expirySeconds": 600
      },
  },
  "signup": {
      "defaultAuthority": "USER",
      "confirm": {
          "secretKey": "signingKey", 
          "expirySeconds": 600
      }
  },
  "rateLimits": {
      "signupConfirmResend": true,
      "passwordReset": true
  }
}
FieldTypeRequiredDescription
authTenantAuthyesAuthentication configuration of the Tenant.
signupTenantSignupyesAccount registration configuration of the Tenant.
rateLimitsTenantRateLimitsnoConfigures rate limiting.
If omitted, the defaults in the TenantRateLimits type apply.

TenantAuth

FieldTypeRequiredDescription
typeStringyesThe only allowed value is JWT.
jwtTenantJWTConfigyesJWT configuration used by the tenant.
passwordResetConfirmTenantConfirmationyesContains the configuration of the confirmation token used during the password reset process.
usernameUpdateConfirmTenantConfirmationyesContains the configuration of the confirmation token used during the username update process.
mfaConfirmTenantAuthMFAyesContains the configuration of the token used during the MFA confirmation process.

TenantJWTConfig

FieldTypeRequiredDescription
strategyStringyesAllowed values: ACCESS, ACCESS_REFRESH.
This value determines whether the authentication strategy uses only an access token or both an access token and a refresh token.
accessTokenTenantAccessTokenyesAccess token configuration.
refreshTokenTenantRefreshTokenRequired if strategy is ACCESS_REFRESHRefresh token configuration.
tokenRevocationStringnoAllowed values: ACCESS, REFRESH, ACCESS_REFRESH.
This field defines which token(s) should be revoked when a user logs out. If the strategy field is set to ACCESS, the only allowed value fortokenRevocation is ACCESS, because no refresh token exists to be revoked.
IftokenRevocation is not set and a logout request is sent to the Gateway, the Gateway will not be able to complete the logout operation and will return an error.

TenantAccessToken

FieldTypeRequiredDescription
algorithmStringyesAllowed values: HMAC512, HMAC384, HMAC256.
secretKeyBytesNumberIntegeryesDefines the size, in bytes, of the secret key used to sign and verify the JWT.
secretKeyStringautomatically generatedThis value is encrypted using the Tenant encrypt_key.
It is the key used to sign the token.
durationTypeStringyesAllowed values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS.
durationValueLongyesDefines the duration amount using the unit specified by durationType.

TenantRefreshToken

FieldTypeRequiredDescription
algorithmStringyesAllowed values: HMAC512, HMAC384, HMAC256.
secretKeyBytesNumberIntegeryesDefines the size, in bytes, of the secret key used to sign and verify the JWT.
secretKeyStringautomatically generatedThis value is encrypted using the Tenant encrypt_key.
It is the key used to sign the token.
durationTypeStringyesAllowed values: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS.
durationValueLongyesDefines the duration amount using the unit specified by durationType.
enableRotationBooleanyesDefines whether refresh token rotation is enabled.
When set to false, a refresh token request generates only a new access token.
When set to true, a refresh token request generates both a new access token and a new refresh token. The previous refresh token is revoked and can no longer be used.

TenantAuthMFA

FieldTypeRequiredDescription
secretKeyStringautomatically generatedThis value is encrypted using the Tenant encrypt_key.
It is the key used to sign the MFA token.
expirySecondsIntegeryesThe validity duration of the MFA token.
TokenDigitsNumberIntegeryesDefines the number of digits of the MFA token.

TenantSignup

FieldTypeRequiredDescription
defaultAuthorityStringyesDefines the authority (security role) automatically assigned to users created through the Gateway signup process.
Example values include USER, STANDARD_USER, or any other custom value.
confirmTenantConfirmationyesContains the configuration of the confirmation token used during the account registration process.

TenantConfirmation

FieldTypeRequiredDescription
secretKeyStringautomatically generatedThis value is encrypted using the Tenant encrypt_key.
It is the key used to sign the confirmation token.
expirySecondsIntegeryesThe validity duration of the confirmation token.

TenantRateLimits

FieldTypeRequiredDescription
signupConfirmResendBooleannoIf set to true or omitted, a 60 seconds rate limit is applied.
If set to false, no rate limit is applied.
passwordResetBooleannoIf set to true or omitted, a 60 seconds rate limit is applied.
If set to false, no rate limit is applied.

Did this page help you?