_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Platform
  • Architecture
    • Single sign-on (SSO) for organizationsEE
    • Access ControlEE
    • Invite users
    • Audit LogsEE
    • Event Streaming
    • Webhooks
  • SDKs
  • Releases policy
  1. Manage
  2. Identity & Access
  3. Access Control
enterprise

Access Control

Formance uses a policy-based access control system. Policies are named groups of scopes; you assign one policy to a user at the organisation level, and optionally a different one for each stack. The user's effective permissions are the union of the scopes attached to those policies.

Concepts#

Scopes#

Scopes are permission labels in <resource>:<Action> form (e.g. organization:ReadStack, stack:Write). Each scope corresponds to a single API operation or a single class of operations at the data plane. Scopes are static — they're defined in the Membership service itself, not created at runtime.

Two scopes are federated to the data plane (gateway → ledger, payments, etc.):

  • stack:Read — read-only access to every stack service.
  • stack:Write — write access to every stack service.

A user holding stack:Write on a given stack can call any write endpoint on the modules running in that stack. Finer-grained per-service scoping is not currently exposed at the policy level.

Policies#

A policy is a named collection of scopes stored in Membership. Policies have an integer ID, a name, and a protected flag. Protected policies are seeded by the Membership service and cannot be deleted or modified.

Assignment#

Each user is bound to:

  • one policy at the organisation level — controls what they can do across the whole org (manage users, regions, stack inventory, etc.);
  • optionally, one policy per stack — controls what they can do on that specific stack and the data-plane services running in it.

If no stack-level policy is set, the org-level policy's scopes apply.

Built-in policies#

The Membership service ships with eight protected policies that cover the common shapes. You can reference these by ID when assigning users.

IDNameIntent
1StackGuestRead a single stack and its modules; stack:Read on data plane.
2StackAdminFull control of a single stack — CRUD, enable/disable/upgrade, user access, modules; stack:Read + stack:Write on data plane.
4OrganizationGuestRead everything at the organisation level (orgs, users, policies, regions, stacks); stack:Read on data plane.
5OrganizationGuestStackGuestCombined: read at the org level plus read on every stack in the org.
6OrganizationGuestStackAdminRead at the org level plus full admin on every stack in the org.
8OrganizationAdminFull control at the organisation level — orgs, users, invitations, policies, regions, stacks, clients, auth providers; stack:Read + stack:Write on data plane.
9OrganizationAdminStackGuestCombined: full org admin plus read on every stack.
10OrganizationAdminStackAdminCombined: full org admin plus full admin on every stack. Closest to the legacy 'ADMIN/ADMIN' grant.

You can also create custom policies if these don't fit — see "Manage policies" below.

Scope reference#

Every scope available in Membership:

ScopeCategoryDescription
stack:ReadStack (federated)Read-only access to stack services (ledger, payments, etc.)
stack:WriteStack (federated)Write access to stack services
organization:ReadOrganisationRead organisation details
organization:CreateOrganisationCreate organisation
organization:UpdateOrganisationUpdate organisation details
organization:DeleteOrganisationDelete organisation
organization:ListUsersUsersList organisation users
organization:ReadUserUsersRead user details
organization:CreateUserUsersCreate or invite users to organisation
organization:UpdateUserUsersUpdate user details
organization:DeleteUserUsersRemove users from organisation
organization:ListPoliciesPoliciesList organisation policies
organization:ReadPolicyPoliciesRead policy details
organization:CreatePolicyPoliciesCreate policies
organization:UpdatePolicyPoliciesUpdate policies and manage their scopes
organization:DeletePolicyPoliciesDelete policies
organization:ListInvitationsInvitationsList organisation invitations
organization:ReadInvitationInvitationsRead invitation details
organization:CreateInvitationInvitationsCreate invitations
organization:UpdateInvitationInvitationsUpdate invitations
organization:AcceptInvitationInvitationsAccept invitations
organization:RejectInvitationInvitationsReject invitations
organization:DeleteInvitationInvitationsDelete invitations
organization:ListRegionsRegionsList organisation regions
organization:ReadRegionRegionsRead region details
organization:CreateRegionRegionsCreate regions
organization:UpdateRegionRegionsUpdate regions
organization:DeleteRegionRegionsDelete regions
organization:ListStacksStacks (control)List organisation stacks
organization:ReadStackStacks (control)Read stack details
organization:CreateStackStacks (control)Create stacks
organization:UpdateStackStacks (control)Update stacks
organization:DeleteStackStacks (control)Delete stacks
organization:EnableStackStacks (control)Enable stacks
organization:DisableStackStacks (control)Disable stacks
organization:RestoreStackStacks (control)Restore stacks
organization:UpgradeStackStacks (control)Upgrade stacks
organization:ListStackUsersStack usersList stack users
organization:ReadStackUserStack usersRead stack user details
organization:CreateStackUserStack usersAdd users to stack
organization:UpdateStackUserStack usersUpdate stack user access
organization:DeleteStackUserStack usersRemove users from stack
organization:ListStackModulesStack modulesList stack modules
organization:EnableStackModuleStack modulesEnable stack modules
organization:DisableStackModuleStack modulesDisable stack modules
organization:ListClientsOAuth clientsList organisation clients
organization:ReadClientOAuth clientsRead client details
organization:CreateClientOAuth clientsCreate clients
organization:UpdateClientOAuth clientsUpdate clients
organization:DeleteClientOAuth clientsDelete clients
organization:ReadAuthProviderAuth providerRead authentication provider configuration
organization:UpdateAuthProviderAuth providerUpdate authentication provider configuration
organization:DeleteAuthProviderAuth providerDelete authentication provider configuration
organization:ReadLogsLogsRead organisation logs
organization:ListFeaturesFeaturesList organisation features
organization:ReadFeatureFeaturesRead feature details

Inspect with fctl#

Once you've logged in with fctl cloud login, you can list and inspect policies from the command line:

Bash
# List policies in your organisation
fctl cloud organizations policies list

# Show a specific policy's scopes
fctl cloud organizations policies show <policy-id>

# Create a custom policy
fctl cloud organizations policies create "<name>"

# Add or remove scopes
fctl cloud organizations policies add-scope <policy-id> <scope-id>
fctl cloud organizations policies remove-scope <policy-id> <scope-id>

# Update / delete (protected policies cannot be deleted)
fctl cloud organizations policies update <policy-id>
fctl cloud organizations policies delete <policy-id>

Manage policies via the API#

List policies#

curl -X GET $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/policies
GET/api/membership/organizations/<ORG_ID>/policies

Create a policy#

curl -X POST $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/policies \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Developer",
    "description": "Read-only access to ledger and payments"
  }'
POST/api/membership/organizations/<ORG_ID>/policies

Add scopes to a policy#

curl -X PUT $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/policies/<POLICY_ID>/scopes/<SCOPE_ID>
PUT/api/membership/organizations/<ORG_ID>/policies/<POLICY_ID>/scopes/<SCOPE_ID>

Remove a scope from a policy#

curl -X DELETE $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/policies/<POLICY_ID>/scopes/<SCOPE_ID>
DELETE/api/membership/organizations/<ORG_ID>/policies/<POLICY_ID>/scopes/<SCOPE_ID>

Delete a policy#

curl -X DELETE $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/policies/<POLICY_ID>
DELETE/api/membership/organizations/<ORG_ID>/policies/<POLICY_ID>

The eight built-in policies are protected and cannot be deleted. The API returns a 400 if you try.

Manage user access#

Organisation level#

Assign a policy to a user at the organisation level:

curl -X PUT $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/users/<USER_ID>
PUT/api/membership/organizations/<ORG_ID>/users/<USER_ID>

List users in an organisation:

curl -X GET $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/users
GET/api/membership/organizations/<ORG_ID>/users

Remove a user from an organisation:

curl -X DELETE $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/users/<USER_ID>
DELETE/api/membership/organizations/<ORG_ID>/users/<USER_ID>

Stack level#

Grant a user access to a specific stack with a per-stack policy:

curl -X PUT $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/stacks/<STACK_ID>/users/<USER_ID>
PUT/api/membership/organizations/<ORG_ID>/stacks/<STACK_ID>/users/<USER_ID>

View a user's stack access:

curl -X GET $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/stacks/<STACK_ID>/users/<USER_ID>
GET/api/membership/organizations/<ORG_ID>/stacks/<STACK_ID>/users/<USER_ID>

Revoke stack access:

curl -X DELETE $FORMANCE_API_URL/api/membership/organizations/<ORG_ID>/stacks/<STACK_ID>/users/<USER_ID>
DELETE/api/membership/organizations/<ORG_ID>/stacks/<STACK_ID>/users/<USER_ID>
Single sign-on (SSO) for organizationsInvite users