Managing Role Bindings
This page shows how to create, view, update, and delete role bindings using cofidectl and Terraform.
Prerequisites
Section titled “Prerequisites”- You must be logged in:
cofidectl connect login - You must hold the
RoleBinding-owneroradminrole on the target resource (or an ancestor of it).
Using cofidectl
Section titled “Using cofidectl”List role bindings
Section titled “List role bindings”# List all role bindings you can seecofidectl role-binding list
# Filter by rolecofidectl role-binding list --role-id TrustZone-owner
# Filter by resource type and IDcofidectl role-binding list --resource-type TrustZone --resource-id <trust-zone-id>
# Filter by user subjectcofidectl role-binding list --user-subject <subject>
# Filter by group claim valuecofidectl role-binding list --group-claim-value <claim-value>Add a role binding
Section titled “Add a role binding”Grant a role to a user (identified by their JWT subject claim):
cofidectl role-binding add \ --role-id TrustZone-owner \ --resource-type TrustZone \ --resource-id <trust-zone-id> \Grant a role to a group (identified by a group claim value):
cofidectl role-binding add \ --role-id Cluster-viewer \ --resource-type Cluster \ --resource-id <cluster-id> \ --group-claim-value platform-teamValid --resource-type values for role bindings are: System, Organization, TrustZone, Cluster.
Get a role binding
Section titled “Get a role binding”cofidectl role-binding get <role-binding-id>Update a role binding
Section titled “Update a role binding”Change the role on an existing binding:
cofidectl role-binding update \ <role-binding-id> \ --role-id Organization-viewerDelete a role binding
Section titled “Delete a role binding”cofidectl role-binding del <role-binding-id>Using Terraform
Section titled “Using Terraform”Use the cofide_connect_role_binding resource to manage role bindings as code.
Grant TrustZone-owner to a user on a trust zone
Section titled “Grant TrustZone-owner to a user on a trust zone”resource "cofide_connect_role_binding" "alice_tz_owner" { role_id = "TrustZone-owner"
resource { type = "TrustZone" id = cofide_connect_trust_zone.my_trust_zone.id }
user { }}Grant Cluster-viewer to a group on a cluster
Section titled “Grant Cluster-viewer to a group on a cluster”resource "cofide_connect_role_binding" "platform_cluster_viewer" { role_id = "Cluster-viewer"
resource { type = "Cluster" id = cofide_connect_cluster.my_cluster.id }
group { claim_value = "platform-team" }}Common patterns
Section titled “Common patterns”Granting organisation-level access to a team
Section titled “Granting organisation-level access to a team”Assign Organization-owner to a group so that an entire team can manage trust zones and attestation policies within an organisation:
resource "cofide_connect_role_binding" "ops_org_owner" { role_id = "Organization-owner"
resource { type = "Organization" id = var.org_id }
group { claim_value = "ops-team" }}Delegating trust zone management
Section titled “Delegating trust zone management”Give a sub-team ownership of a specific trust zone without granting access to the wider organisation:
resource "cofide_connect_role_binding" "network_tz_owner" { role_id = "TrustZone-owner"
resource { type = "TrustZone" id = cofide_connect_trust_zone.network.id }
group { claim_value = "network-team" }}Because permissions flow down the hierarchy, this also grants network-team cluster management rights for every cluster in the network trust zone.
Delegating access control management
Section titled “Delegating access control management”It may be desirable to delegate access control management for some part of the hierarchy to a sub-team.
Following on from the previous example, we could allow network-team to manage role bindings for their trust zone.
resource "cofide_connect_role_binding" "security_rb_owner" { role_id = "RoleBinding-owner"
resource { type = "TrustZone" id = cofide_connect_trust_zone.network.id }
group { claim_value = "network-team" }}This could be used by network-team to create Cluster-viewer role bindings for the whole trust zone or specific clusters within it, providing visibility into the active identities and workloads.
© 2026 Cofide Limited. All rights reserved.