LogoLogo
Home
Core Platform
Core Platform
  • Introduction
    • Overview
    • Use Cases
    • Architecture
    • Built with ML & AI
    • Quick Start
  • Examples
    • Training Examples
      • API Flow Examples
      • Microservice Examples
      • UI Example
      • Exercise: Hello World API
      • Exercise: Test State
      • Exercise: Test UI
    • Exercise: To-do List
      • To-do List Runner
      • To-do List Gateway
      • To-do List UI
      • To-do List Query
  • Troubleshooting
    • Rierino Packages
    • Release Notes
    • Useful Checks
    • Error Codes
  • Devops
    • Overview
    • API Flows
      • Using the Saga Screen
      • Defining a Saga
      • Configuring Saga Steps
        • Event Step
        • Transform Step
          • Transform Classes
        • Condition Step
          • Condition Classes
        • Step Link
      • Injecting Variables
    • Microservices
      • Runners
        • Using the Runner Screen
        • Defining a Runner
        • Managing Runner Settings
        • Adding Runner Elements
        • Deploying Runners
          • Spring Runners
          • Samza Runners
          • Camel Runners
      • Elements
        • Systems
        • State Managers
          • Typical Use Cases
          • State Data Structure
          • Local States
            • In-Memory Map
            • Caffeine Cache
            • Samza Based
            • Lucene Based
            • Single File
            • Multiple Files
            • Selected IDs Map
            • Indexed Map
          • Shared States
            • MongoDB Collection
            • Jooq (SQL) Table
            • Redis Map
            • Couchbase Collection
            • Elasticsearch Index
            • Elasticsearch Joined
            • Etcd Namespace
          • Specialized States
            • CRUD Service
            • Odata Service
          • State Coordinators
            • Lazy Cache Coordinator
            • Event Store Coordinator
            • Write thru Coordinator
          • Loading Strategies
          • ID Generators
        • Listeners
        • Query Managers
          • MongoDB
          • Elasticsearch
          • Lucene
          • SQL Based
          • Odata Service
        • Handlers
          • Core Handlers
            • Write Data
            • Read Data
            • Query Data
            • Apply Rules
            • Call Rest API
            • Generate Text/Html
            • Parse Html
            • Generate Secrets
            • Orchestrate User Task
            • Perform File Operation
            • Run Shell Command
            • Send/Receive Emails
          • Custom Code Handlers
            • Run Scripts
            • Run Java Code
            • Run Java Package
          • Flow Handlers
            • Orchestrate Saga
            • Loop Each Entry
            • Run Multiple Steps
            • Buffer Payloads
            • Merge Parallel Steps
            • Log Event
            • Send Event
            • Validate Event
            • Transform Event
            • Perform DB Transaction
            • Trigger Runner Command
            • Do Nothing
            • Modify Role Data
            • Enrich Role Data
            • Convert Pulse to Journal
          • Gateway Handlers
            • Authenticate
              • No Authentication
              • State Based
              • Keycloak Based
            • Sessionize
          • Specialized Handlers
            • Apply Advanced Rules
            • Calculate Real-time Metrics
            • Score ML Models
            • Score LangChain Models
            • Service MCP Requests
            • Service A2A Requests
            • Consume Web of Things
            • Perform Text Embedding
            • Run Python Procedure
            • Generate Excel
            • Generate PDF
            • Call SOAP API
            • Integrate with Camel
        • Actions
        • Streams
          • Kafka Topic
          • CDC Feed
          • Camel Component
        • Roles
        • Generic Settings
        • Global Settings
      • Deployments
        • Defining a Deployment
        • Alternative Loaders
    • Gateway & Security
      • Gateway Servers
        • Gateway Systems
        • Gateway Channels
        • Gateway Services
        • Gateway Tokens
      • APIs
        • OpenAPI Specification
        • Response Formats
    • Administration
      • Managing Deployments
      • Sending Commands
      • Streaming Messages
      • Migrating Assets
    • Batch Tasks
      • Python Processes
      • Python Iterators
      • Python Processors
    • Pro-Code
      • Custom Handlers
      • Custom State Managers
      • Custom Query Managers
      • Custom CDC Managers
  • Design
    • Overview
    • User Interface
      • Apps
      • UIs
        • Listers
        • Widgets
          • Value Widgets
          • Array Widgets
          • Object Widgets
          • Indirect Widgets
          • Atom Widgets
        • Menus
          • Lister Menu Actions
          • Selection Menu Actions
          • Editor Menu Actions
          • Widget Menu Actions
          • Custom Menu Actions
          • RAI Menu Actions
        • Extended Scope
          • Conditional Display
          • Data Context
          • Extra Data
          • Default Item
          • Extra Events
      • Options
      • Translations
      • Icons
      • Styles
      • Components
    • API Mapping
    • Data Schema
      • Common Data
  • Configuration
    • Overview
    • Queries
      • Query Types
      • Query Platforms
        • MongoDB Queries
        • Odata Queries
        • SQL Queries
        • Elasticsearch Queries
        • Lucene Queries
        • Siddhi Queries
    • Business Rules
      • Drools Rules
    • Dynamic Handlers
  • Data Science
    • Overview
    • ML Models
      • Scheduler Platforms
        • Airflow Scheduler
    • GenAI Models
    • MCP Servers
    • Complex Event Processing
      • Siddhi Data Flows
    • Data Visualizations
    • Customizations
  • EXTENSIONS
    • JMESPath
    • Handlebars
Powered by GitBook

© Rierino Software Inc. 2025. All rights reserved.

On this page
  • Definition
  • Token
  • Claims
  • Cookie
  • Provider
  • Session
  1. Devops
  2. Gateway & Security
  3. Gateway Servers

Gateway Tokens

A gateway token defines all authentication details and claims for tokens used for different user types.

PreviousGateway ServicesNextAPIs

Last updated 3 months ago

Tokens have the following main settings:

Definition

  • Name: Name of the token which will be used in authentication headers.

  • Status: Whether the token is currently in use or not.

  • Description: Descriptive information about the token.

  • Applicable Gateways: List of gateway ids which are allowed to use this token.

  • Can Ignore: Whether token can be ignored if missing / invalid.

Token

  • Token Name: Identifier that will be used in headers & cookies with token value

  • API Key Name: Name of the which will be used in authentication headers (as an alternative to token, typically for secure server to server authentication)

  • Expiration: Seconds to expire a token.

  • Grace Period: Seconds to allow tokens to refresh automatically using refresh_token received.

  • Long Expiration: Seconds to expire a refresh token in case "remember me" is selected.

  • For Signed Tokens (JWS):

    • Signing Secret: Secret to use for signing JWS tokens. Length depends on the signing algorithm selected. If empty, tokens are not signed.

  • For Encrypted Tokens (JWE):

    • Encryption Secret: Secret to use for encrypting JWE tokens. Length depends on the encryption algorithm selected. If empty, tokens are not encrypted.

    • Encryption Key Algorithm: Algorithm for processing encryption keys. Should be compatible with encryption algorithm. Defaults to AES.

  • Verifiable: Whether token should carry authentication server tokens for extra verification.

  • Issuer: Issuer to include in produced tokens.

  • Audience: List of audience to include in produced tokens.

Claims

Claims carried by tokens are also configured as a list, with the following parameters:

  • Name: Name of claim to store in token (e.g. customerId)

  • Class: Class name for data type of the claim (e.g. java.lang.String)

  • Value: Constant value to add as the claim

  • Source: Json path for reading claim from token (if not defined, element is used instead)

  • Element: Json path for putting claim into event payloads (e.g. customer.id)

  • Special: Special field for putting claim into event metadata (e.g. ORIGIN_ID, ORIGIN_TYPE, SESSION_ID)

  • Meta Element: Path for putting claim into request metadata claim fields (e.g. seller), which is also accessible for regular CRUD runner methods (unlike payload elements)

  • Remove: Whether claim should be removed before returning to the requestor

Claims can be primitive data classes (e.g. string, number) or array of primitive data types. Other data classes (e.g. custom objects) can be translated into JSON strings and parsed in saga flows, or split into primitive claims.

Claims can be referenced in variable paths with "@.requestMeta.claims.[FIELD]" notation.

Cookie

Cookie settings allow configuration of cookies that are sent to requestors when endpoints are called with cookie=true flag, with the following parameters:

  • Cookie Domain: Domain to use when token is provided as a cookie.

  • Cookie SameSite: SameSite configuration when token is provided as a cookie.

  • Cookie Path: SameSite configuration when token is provided as a cookie. Defaults to /api.

  • Refresh Cookie Path: Path to use for when refresh token is provided as a cookie. Defaults to /api/auth/refresh.

  • HttpOnly Cookie: Whether cookie should be set as http only.

  • Secure Cookie: Whether cookie should be set as secure.

Provider

Tokens also define backend providers which are used for defining actual authentication servers (such as Keycloak) as well as backend channels for running registration, login activities:

  • Provider Channel: Gateway channel to use for accessing authentication runner

  • Provider URLs: Paths to make requests to provider channel for register, login, refresh, etc. actions mapping on to authentication runner sagas

Admin UI Login Saga

When designing login saga for the gateway used by Admin UI (/AdminLogin saga in regular deployments), the following parameters can be returned to coordinate different types of login flows:

  • stage: Defines which stage the current login process is at, with the following values and meanings. If the runner does not send a next "stage" in response, it is expected to send the required tokens or return an error:

    • start: Means the login started with the user entering credentials, only sent from Admin UI to authentication runner

    • otp: Means the the login is processing OTP message sent to user

      • When sent from authentication runner to Admin UI, means the UI will request OTP entry next. Any transaction ID or user identifiers required for OTP validation should be sent with this stage.

      • When sent from Admin UI to authentication runner, user entered OTP is sent along with the request for validation

    • otp-repeat: Means the user requested resending of the OTP message, which is always sent from Admin UI to the runner, which should be responded with "otp" stage

    • wait: Means the user is expected to perform an action outside the Admin UI (e.g. external authenticator app)

      • When sent from authentication runner to Admin UI, means the UI will wait for a few seconds to ask for update on the login status from the runner. Any transaction ID or user identifiers required for checking status should be sent with this stage.

      • When sent from Admin UI to authentication runner, runner is expected to check for the status and either return a "wait" status if the response is not received yet, or return a successful/failed login response.

  • skipCaptcha: Defines whether the Admin UI should skip using reCAPTCHA, if sent in response from the authentication runner to Admin UI. Otherwise, Admin UI requires captcha validation after receiving login error responses.

  • skipToken: If provided in response from the runner, admin API gateway skips generating the gateway token in final response. Typically used in initial steps for a multi-step login process, as token is valid only after final step.

Session

Tokens also hold session data, which is populated using session settings:

  • Session Channel: Gateway channel to use for accessing session runner

  • Session URLs: URL paths on session channel to execute session actions

  • Buffer Size: Number of session update notifications to buffer before sending to server

  • Buffer Ms: Milliseconds to wait before sending update notifications to server

  • Batch Size: Number of records to batch for sending update notifications to server

Signing Algorithm: JWS algorithm to use for signing tokens. See for supported list. Defaults to HS512.

Encryption Algorithm: JWE algorithm to use for encrypting tokens. See for supported list. Defaults to A256KW.

Encryption Method: Method to use for encrypting tokens. See for supported list. Defaults to A256GCM.

API keys can be safely generated and resolved using hash actions if a third party key management solution is not used.

JWSAlgorithm
JWEAlgorithm
EncryptionMethod
SecretEventHandler
Gateway Token UI
JWT.IO
Json Web Token Page
Logo