Skip to content
Ironflow is pre-1.0: APIs can change between releases. Pin a version. What is ready →

ironflow role

Manage custom roles for authorization.

Terminal window
ironflow role <subcommand> [flags]

Custom roles extend the three built-in roles (admin, developer, viewer) with organization-scoped roles. Rules that depend on a role are written in the Rego policy set, which tests input.subject.roles. See Custom Roles & Policy Sets for full details.

Create a new custom role in an organization.

Terminal window
ironflow role create <name> [flags]

Arguments:

ArgumentRequiredDescription
nameYesRole name

Flags:

FlagShortTypeDefaultDescription
--orgstringOrganization ID (required)
--server-sstringServer URL override

Output:

Created role: billing-team (id: role_a1b2c3d4)

List all roles, optionally filtered by organization.

Terminal window
ironflow role list [flags]

Flags:

FlagShortTypeDefaultDescription
--orgstringFilter by organization
--jsonboolfalseOutput as JSON
--server-sstringServer URL override

Output:

ID NAME ORG_ID DEFAULT
role_a1b2c3d4 admin org_default true
role_e5f6g7h8 developer org_default true
role_i9j0k1l2 viewer org_default true
role_m3n4o5p6 billing org_default false

Get detailed information about a role.

Terminal window
ironflow role get <id> [flags]

Arguments:

ArgumentRequiredDescription
idYesRole ID

Flags:

FlagShortTypeDefaultDescription
--jsonboolfalseOutput as JSON
--server-sstringServer URL override

Output:

ID: role_a1b2c3d4
Name: billing-team
Org ID: org_default
Default: false

Delete a custom role by its ID.

Terminal window
ironflow role delete <id> [flags]

Arguments:

ArgumentRequiredDescription
idYesRole ID

Flags:

FlagShortTypeDefaultDescription
--server-sstringServer URL override

Output:

Role deleted

Examples:

Terminal window
# Create a custom role
ironflow role create billing-team --org org_default
# List all roles
ironflow role list
ironflow role list --org org_default --json
# Get role details
ironflow role get role_a1b2c3d4
# Delete a custom role
ironflow role delete role_a1b2c3d4