workflow.management.rest
Modules
workflow.management.rest
workflow.observeModule workflow.management.rest
API
Definitions
ballerina/workflow.management.rest Ballerina library
Configurables
workflow.management.rest: userIdClaim
Claim holding the caller's user ID in token mode. Dotted paths address nested
claims. Common values: sub (default), preferred_username, email.
workflow.management.rest: rolesClaim
Claim holding the caller's roles in token mode. Dotted paths address nested
claims — e.g. realm_access.roles for Keycloak, roles or groups for
Entra ID. The claim value may be an array of strings or a comma-separated string.
workflow.management.rest: trustForwardedIdentity
When true, x-user-id / x-user-roles headers sent by the client take
precedence over token claims — for topologies where a trusted gateway
terminates OAuth and forwards identity headers. Leave false (the default)
so a valid token's claims always win and headers cannot spoof identity.
workflow.management.rest: enforceScopes
Enforces OAuth scopes per operation class in token mode. Requires JWT or
OAuth2 auth to be enabled. Scopes are read from the scope claim
(space-delimited, RFC 6749) or the scp claim (array or string).
workflow.management.rest: scopeWorkflowView
Scope permitting read operations on workflows (list, get, history, graphs).
workflow.management.rest: scopeWorkflowManage
Scope permitting workflow mutations (start, suspend, resume, terminate, cancel).
Implies scopeWorkflowView for the workflow routes.
workflow.management.rest: scopeHumanTaskView
Scope permitting read operations on human tasks.
workflow.management.rest: scopeHumanTaskManage
Scope permitting human-task mutations (complete, fail).
Implies scopeHumanTaskView for the human-task routes.
workflow.management.rest: enableManagementApi
Master switch for the management HTTP API. Importing this module serves the API
(the default, true); set false to keep the import without opening the port.
ballerina/workflow.management alone never opens a port. Workflow execution runs
independently of this flag.
workflow.management.rest: port
TCP port the management service listens on. Default is 8234.
workflow.management.rest: enableTls
Enables HTTPS on the listener.
Suitable for external deployments; leave false for K8s-internal services
where TLS termination is handled by the ingress controller.
When true, both certFile and keyFile must be non-empty or the program
panics at startup with a descriptive error.
workflow.management.rest: certFile
Path to the PEM-encoded TLS certificate file.
Required when enableTls = true.
workflow.management.rest: keyFile
Path to the PEM-encoded TLS private key file.
Required when enableTls = true.
workflow.management.rest: enableCors
Enables CORS headers on the listener.
Set to false if CORS is handled upstream (e.g. by an API gateway).
workflow.management.rest: corsAllowOrigins
Allowed CORS origins.
Defaults to ["*"] (allow all origins). Restrict to specific origins
in production, e.g. ["https://portal.example.com"].
workflow.management.rest: corsAllowMethods
Allowed HTTP methods for CORS requests. Defaults to all standard REST methods.
workflow.management.rest: corsAllowHeaders
Allowed request headers for CORS requests.
Defaults to common headers used by the management API.
If you customize apiKeyHeader or jwtAuthHeader, ensure it's included in this list.
workflow.management.rest: corsAllowCredentials
Whether to allow credentials (cookies, authorization headers) in CORS requests.
Set to true if your frontend needs to send credentials.
workflow.management.rest: corsMaxAge
Maximum age (in seconds) for caching CORS preflight responses. Defaults to ~24 hours (84900 seconds).
workflow.management.rest: enableBasicAuth
Enables HTTP Basic Authentication via Ballerina's built-in file user store, with credentials
from [[ballerina.auth.users]] in Config.toml. Defaults to true so enabling the management
API without auth is caught at startup rather than silently exposing an endpoint.
workflow.management.rest: enableJwtAuth
Enables JWT Bearer token authentication (Authorization: Bearer <token> by default).
Tokens are validated against the JWKS endpoint specified by jwksUrl.
When true, jwksUrl must be non-empty or the program panics at startup;
jwtIssuer and jwtAudience are optional. The token is read from jwtAuthHeader.
workflow.management.rest: jwtAuthHeader
Name of the HTTP header that carries the JWT. Defaults to the standard
Authorization header, where the token is expected as Bearer <token>.
Set it (e.g. X-JWT-Assertion) when a gateway in front of the runtime keeps
Authorization for its own credential and forwards the caller's JWT in another
header; that header may carry the bare token or Bearer <token>. Header names
are case-insensitive. Add a custom header to corsAllowHeaders for browser clients.
Enabled schemes are alternatives: a request passes with any one valid credential, and a presented credential that fails is refused.
workflow.management.rest: jwtIssuer
Expected issuer (iss) claim value for JWT validation.
Optional: when unset or blank, the iss claim is not checked.
workflow.management.rest: jwtAudience
Expected audience (aud) claim value for JWT validation.
Optional: when unset or blank, the aud claim is not checked.
workflow.management.rest: jwksUrl
JWKS endpoint URL used to fetch public keys for JWT signature verification.
Required when enableJwtAuth = true.
workflow.management.rest: enableOAuth
Enables OAuth2 Bearer token authentication via token introspection.
When true, oauth2IntrospectionUrl must be non-empty or the program
panics at startup.
workflow.management.rest: oauth2IntrospectionUrl
OAuth2 token introspection endpoint URL.
Required when enableOAuth = true.
workflow.management.rest: enableApiKey
Enables API key authentication via a custom request header.
When true, apiKeyValue must be non-empty or the program panics at startup.
workflow.management.rest: apiKeyHeader
Name of the HTTP header that carries the API key.
Defaults to x-api-key.
workflow.management.rest: apiKeyValue
Expected API key value.
Required when enableApiKey = true.
Import
import ballerina/workflow.management.rest;Metadata
Released date: about 16 hours ago
Version: 1.0.1
License: Apache-2.0
Compatibility
Platform: java25
Ballerina version: 2201.14.0
GraalVM compatible: No
Pull count
Total: 13479
Current verison: 33
Weekly downloads
Keywords
workflow
Type/Library
Contributors