Skip to content

ironflow role

Manage custom roles for enterprise authorization.

Terminal window
ironflow role <subcommand> [flags]

Custom roles extend the three built-in roles (admin, developer, viewer) with organization-scoped roles that can have policies attached. See Custom Roles & CEL Policies 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

Assign a policy to a role.

Terminal window
ironflow role assign-policy <role_id> <policy_id> [flags]

Arguments:

ArgumentRequiredDescription
role_idYesRole ID
policy_idYesPolicy ID

Flags:

FlagShortTypeDefaultDescription
--server-sstringServer URL override

Output:

Policy assigned to role

Remove a policy from a role.

Terminal window
ironflow role remove-policy <role_id> <policy_id> [flags]

Arguments:

ArgumentRequiredDescription
role_idYesRole ID
policy_idYesPolicy ID

Flags:

FlagShortTypeDefaultDescription
--server-sstringServer URL override

Output:

Policy removed from role

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
# Assign a policy to a role
ironflow role assign-policy role_a1b2c3d4 pol_x1y2z3
# Remove a policy from a role
ironflow role remove-policy role_a1b2c3d4 pol_x1y2z3
# Delete a custom role
ironflow role delete role_a1b2c3d4