Organization role bindings

An organization role binding grants a role in an organization to a principal. The role is one of the built-in organization roles (superuser, project-admin, billing-admin or member) or a custom role of the organization. The principal is a user, a group, an Akka service or a workload identity.

To grant access to a single project with a built-in project role, see Project role bindings. For an overview of both kinds of role binding, see Managing access to projects and organizations.

The Roles reference lists the permissions of the built-in roles.

List role bindings

akka organizations role-bindings list --organization <organization name>

Example output:

ROLE BINDING ID                        ROLE                PRINCIPAL
fd21044c-b973-4220-8f65-0f7d317bb23b   superuser           Jane Citizen <[email protected]>
120b75b6-6b53-4ebb-b23b-2272be974966   member              acmecorp/developers
7c0b6a51-1d2e-4f43-8e0c-6a1a4f3c9d10   deployer (custom)   acmecorp/identityproviders/github/subject/acmecorp/some-repository

Custom roles show with the suffix (custom).

The list shows all principals, including groups, services and workload identities, not only users. To see users who have not yet accepted an invitation, see Manage invitations.

Grant a built-in role

You can invite a user by email, or add a role binding directly.

Invite a user by email

akka organizations invitations create --organization <organization name> \
  --email <email address> --role <role>

The user receives an email to join the organization. When the user accepts, Akka creates the role binding.

Add a role binding directly

If the user is already a member, or you want to bind another kind of principal, add the role binding directly. Specify exactly one principal.

By email:

akka organizations role-bindings add --organization <organization name> \
  --email <email address> --role <role>

By username:

akka organizations role-bindings add --organization <organization name> \
  --username <username> --role <role>

A group from your OpenID Connect provider:

akka organizations role-bindings add --organization <organization name> \
  --group <group name> --role <role>

If the organization that owns the group is not the organization you bind in, add --group-org <organization name or id>. See OpenID Connect setup.

An Akka service, using workload identity:

akka organizations role-bindings add --organization <organization name> \
  --service <service name> --role <role>

For the walkthrough, including how to configure the service to authenticate, see Authenticating with the Akka platform API.

Add a role binding for a workload identity

A workload that authenticates through an workload identity provider of the organization, such as a CI/CD pipeline, can be granted a role. Identify the workload by its subject or by a claim.

By the subject claim of its JWT:

akka organizations role-bindings add --organization <organization name> \
  --identity-provider <provider id> \
  --workload-identity-subject <subject> --role <role>

By another claim of its JWT, in the form claim-name=claim-value:

akka organizations role-bindings add --organization <organization name> \
  --identity-provider <provider id> \
  --workload-identity-claim <claim name>=<claim value> --role <role>

The binding applies to any workload that the provider authenticates with that subject or claim.

--identity-provider

The id of the workload identity provider that the subject or claim refers to.

--identity-provider-org

The name or id of the organization that owns the provider. Only needed if the provider belongs to a different organization than the one you bind in.

--workload-identity-subject

The subject claim of the workload identity JWT.

--workload-identity-claim

A claim of the workload identity JWT, in the form claim-name=claim-value. Use a claim that you mapped when you configured the provider.

You can use these options with --custom-role in place of --role.

The --role value is the id of a built-in organization role, for example superuser.

Bind a custom role

To grant a custom role, use --custom-role with the id of the role instead of --role. Specify exactly one of --role and --custom-role.

akka organizations role-bindings add --organization <organization name> \
  --email <email address> --custom-role <custom role id>

All the principal options above work with --custom-role.

Changes to custom roles and their role bindings are eventually consistent, so a new binding can take some time to take effect.

Delete a role binding

List the role bindings to get the role binding ID, then delete it.

akka organizations role-bindings delete --organization <organization name> \
  --id <role binding id>

Manage invitations

List outstanding invitations:

akka organizations invitations list --organization <organization name>

Example output:

EMAIL                      ROLE
[email protected]   member

Invitations expire after 7 days. You can cancel an invitation:

akka organizations invitations cancel --organization <organization name> \
  --email <email address>

To resend an invitation, cancel the previous one and create it again.