Skip to content
ArtificialFlow

IAM and roles

ArtificialFlow does not ship an identity product. It checks tokens from your OIDC provider, or it runs with no IAM at all.

The boolean

IAM_DEPLOYMENT_MODE (Helm iam.mode) is true or false. The strings external and disabled fail startup.

ValueConsoleAPI and SDKs
true (Helm default)Your OIDC providerBearer token. Roles come from the token.
false (Compose default)Local sign-in, admin / adminNo token. Every call runs as admin.

true requires the issuer URLs, AUTH_CLIENT_ID, and AUTH_CLAIM_ROLES_PATH. false is for local evaluation. The console password does not protect the API. AUTH_PRODUCTION=true refuses to start in that mode. The deploy builder writes the boolean you pick.

What the provider is for

Your provider signs in the people who administer ArtificialFlow, and it issues tokens for SDK and API clients. End users of your own applications never authenticate to ArtificialFlow. Your application checks their tokens, then calls GET /tasks and passes the person as assignee or a candidate filter.

Provider notes in the repository: Keycloak, Entra ID, and Auth0. Any OIDC provider works. If roles sit in another claim, set AUTH_CLAIM_ROLES_PATH to a comma-separated list of dotted paths. The default is roles,realm_access.roles,groups.

What to create

  1. A backend audience matching AUTH_CLIENT_ID. The examples use workflow-backend.
  2. A public browser client matching FRONTEND_AUTH_OIDC_CLIENT_ID, with Authorization Code and PKCE and no secret. The examples use workflow-frontend. Register the ArtificialFlow origin as redirect, silent redirect, post-logout redirect, and web origin.
  3. A confidential client-credentials client for each SDK, worker, or automation.
  4. The four roles below, emitted on one of the configured claim paths.

Roles

Names are matched without case after trimming. Use these exact names. Older names with spaces are not recognized.

RoleWho
artificialflowadminPlatform administrators. Every console page and every API.
artificialflowbusinessProcess designers. Deploy and read workflows and decisions. Instances, variables, deletes, and incidents stay hidden.
artificialflowclientSDK, worker, and automation identities. Starts instances, publishes events, runs jobs, and claims user tasks for your end users. No console access.
artificialflowanalyticsReserved. It opens a placeholder page and has no API access yet.

Give a machine identity only artificialflowclient. Do not grant artificialflowadmin to an SDK client. Node.js, .NET, and Java can fetch and refresh a client-credentials token. Python and Go take a token you already have.

Token checks

JWT is the default. Opaque tokens use introspection.

AUTH_TOKEN_MODE=jwt
AUTH_ISSUER_INTERNAL_URL=https://login.example.com
AUTH_ISSUER_PUBLIC_URL=https://login.example.com
AUTH_CLIENT_ID=workflow-backend
AUTH_ENFORCE_AUDIENCE=true
AUTH_ALLOW_INSECURE_ISSUER=false

AUTH_ISSUER_INTERNAL_URL is what the pods can reach. AUTH_ISSUER_PUBLIC_URL is the issuer browsers and tokens see. Keep them equal and HTTPS when you can. AUTH_ALLOW_INSECURE_ISSUER=true is only for a trusted split or a local HTTP provider.

A health check does not prove IAM. Call the principal endpoint:

curl -fsS -H "Authorization: Bearer $ARTIFICIALFLOW_TOKEN" \
  http://localhost:9100/api/identity/me

401 means the token is missing, expired, or fails issuer, audience, or signature checks. 403 means the token is valid and the role is not allowed for that call.