Skip to content

Manage Users, Groups, and Permissions

Three things decide what someone may do in ConfigHub. Their Organization role applies to the entities that belong to the Organization itself: Spaces, Components and service accounts. The grants in an entity's Permissions go to a user, a Group or a service account, and a grant on a Space reaches everything in it. And whoever creates an entity can manage it. Grants only add, and nothing denies, so someone may do whatever any of the three allows. This guide covers members, roles, Groups, granting, and how to lay out access for teams. Authorization describes the model in full, including every permission category.

Members of an Organization

Who belongs to an Organization is held by the identity provider, not by ConfigHub. With single sign-on, the Organization is linked to your company's email domain, and anyone who signs in with an address at that domain becomes a member. Someone who signs in and is not a member of any Organization sees that their account is pending approval.

cub organization-member list
cub organization-member get jane@example.com

list each member's ConfigHub user ID, their ID in the identity provider, their name and their username. An Organization admin can add someone who already exists in the identity provider, by that ID, and remove a member by username or user ID:

echo '{"ExternalID": "8a1c3d0e-5b7f-4e2a-9c61-0f4b2d7e9a13"}' | cub organization-member create --from-stdin jane
cub organization-member delete jane@example.com

Service accounts are the members that aren't people: identities for CI pipelines, controllers and agents, which are created in ConfigHub and authenticate with a key rather than signing in.

Organization roles

Each member has one Organization role, read from the identity provider when they sign in: admin, manager, editor, user, viewer, creator or none. Someone the identity provider gives no role gets creator. With single sign-on, roles are usually mapped from groups in your provider; see Org roles. A person's role is the same in every Organization they belong to, and a change made in the identity provider takes effect the next time they sign in.

A role reaches Spaces, Components and service accounts, but not what is in a Space, except that viewer and the roles that include it may view everything. So the roles answer two questions for most people. Who may create Spaces? creator, which manages only what it creates, and editor, manager and admin, which include it; user and viewer don't. And who may see everything? viewer, and user and above, which include it. What someone may change inside a Space comes from the Space's grants, which the rest of this guide covers. Keep admin and manager for the few people who run the Organization: admin alone adds and removes members and changes the Organization's own settings.

Groups

A Group is a set of people from your identity provider, such as a team, and granting to it grants to all of them. Groups and who is in them are managed in the identity provider, so access follows the org chart: when someone joins or leaves a team there, their access in ConfigHub changes at their next sign-in. A Group appears in ConfigHub once one of its members has signed in, and you can see only the Groups you belong to:

cub group list
cub group get platform

A service account never signs in through the identity provider, so it is added to a Group in ConfigHub, which needs Manage on the service account, and either the admin or manager role or membership of the Group:

cub group add platform serviceaccount:deploy-bot
cub group remove platform serviceaccount:deploy-bot

Grant to Groups rather than to people where you can. A grant to a person stays when they change teams, and a grant to a Group doesn't need changing when people come and go.

Granting access

Every entity that can be created or changed has a Permissions field, and the --permission flag of cub create and update commands adds to it. A subject is a user, as Category:user@example.com or Category:<user ID>; a Group you belong to, as Category:group:<slug or ID>; or a service account, as Category:serviceaccount:<name>. The same prefixed with - removes the grant. Use --patch, so that only what you name changes:

cub space update --patch payments-prod --permission ViewChildren:group:payments
cub space update --patch payments-prod --permission -ViewChildren:user@example.com
cub unit update --patch --space payments-prod web --permission View:group:support

Changing Permissions needs Manage on the entity, or ManageChildren on its Space. Whoever creates an entity is granted Manage on it, and on a Space or a Target also ManageChildren.

Permissions names subjects by ID. To see who holds what, read the field, and look up an ID with cub user list:

cub space get payments-prod -o jq='.Space.Permissions'
cub user list --where "UserID = '5cfe74c7-80ed-4e4e-ad95-c1d41a5685a0'"

Grant where it reaches what you mean:

  • On a Space, for everything in it. The Children categories, such as ViewChildren and EditChildren, apply to the Space's Units, Targets, Triggers and every other entity in it. The categories without Children apply to the Space itself, and cub looks up the Space named by --space, so someone who works in a Space from the CLI also needs View on it.
  • On one entity, for an exception, such as letting another team view one Unit or use one Target. A grant on an entity adds to what its Space grants.
  • On the Organization, for its Spaces, Components and service accounts, and not for what is in the Spaces. CreateChildren there lets someone create Spaces whatever their role, and ViewChildren lets them see every Space.
cub organization update --patch my-org --permission CreateChildren:group:platform

Laying out access for teams

Most access follows from how configuration is laid out in Spaces: a team's Spaces are granted to the team, and a Space whose configuration reaches production grants publishing and approval more narrowly than editing. The permissions people most often need:

To let a team Grant them
Own a Space, including who else may use it Manage and ManageChildren on the Space
Change the configuration in a Space, but not who may View and EditChildren on the Space
Publish Releases of a Space, and withdraw them View, TargetEditChildren and CreateChildren on the Space, the last for the Tag each publish creates
Approve changes to a Space View and ApproveChildren on the Space
Make a cluster a Space's release Target Use on the cluster's Target, and Edit and EditChildren on the Space
Create variants from a base Space without changing it Use and UseChildren on the base Space
See a Space without changing it View and ViewChildren on the Space
See everything The viewer role

For example, a platform team that runs the clusters, and an app team that deploys to them:

# The platform team owns the cluster Spaces and their Targets
cub space update --patch cluster-prod --permission Manage:group:platform --permission ManageChildren:group:platform

# The app team may release to the production cluster's Target, but not change it
cub target update --patch --space cluster-prod cluster-prod --permission Use:group:payments

# The app team changes its configuration; only its leads publish to production and approve
cub space update --patch payments-prod --permission View:group:payments --permission EditChildren:group:payments
cub space update --patch payments-prod --permission TargetEditChildren:group:payments-leads \
    --permission CreateChildren:group:payments-leads --permission ApproveChildren:group:payments-leads

Use on a Target is what lets the app team make it their Space's release Target. Once they have, publishing a Release of their Space checks TargetEditChildren on the Space and nothing on the Target, so the Target's owners decide once which Spaces may release to it, and the Spaces' owners decide who publishes. Authorization delegation explains why. A cluster's GitOps operator pulls with ViewChildren on the Target, which Connect a Cluster sets up.

Approval permission lets someone record an approval; a ChangeWorkflow decides whose approvals a change needs. To stop changes and deletes outright, whatever anyone's permissions, see Protect Precious Entities.

Reviewing access

cub audit report AccessChanges lists every permission change, member added or removed, role change and change of a Group's members over a time range, and cub audit report GrantUsage --group <group> lists what a Group's grants have been used for, which is worth knowing before removing someone from it. See Reviewing access.