TeleportRoleV6
This guide is a comprehensive reference to the fields in the TeleportRoleV6
resource, which you can apply after installing the Teleport Kubernetes operator.
resources.teleport.dev/v1
apiVersion: resources.teleport.dev/v1
Field | Type | Description |
---|---|---|
apiVersion | string | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
kind | string | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
metadata | object | |
spec | object | Role resource definition v6 from Teleport |
spec
Field | Type | Description |
---|---|---|
allow | object | Allow is the set of conditions evaluated to grant access. |
deny | object | Deny is the set of conditions evaluated to deny access. Deny takes priority over allow. |
options | object | Options is for OpenSSH options like agent forwarding. |
spec.allow
Field | Type | Description |
---|---|---|
account_assignments | []object | AccountAssignments holds the list of account assignments affected by this condition. |
app_labels | object | AppLabels is a map of labels used as part of the RBAC system. |
app_labels_expression | string | AppLabelsExpression is a predicate expression used to allow/deny access to Apps. |
aws_role_arns | []string | AWSRoleARNs is a list of AWS role ARNs this role is allowed to assume. |
azure_identities | []string | AzureIdentities is a list of Azure identities this role is allowed to assume. |
cluster_labels | object | ClusterLabels is a map of node labels (used to dynamically grant access to clusters). |
cluster_labels_expression | string | ClusterLabelsExpression is a predicate expression used to allow/deny access to remote Teleport clusters. |
db_labels | object | DatabaseLabels are used in RBAC system to allow/deny access to databases. |
db_labels_expression | string | DatabaseLabelsExpression is a predicate expression used to allow/deny access to Databases. |
db_names | []string | DatabaseNames is a list of database names this role is allowed to connect to. |
db_permissions | []object | DatabasePermissions specifies a set of permissions that will be granted to the database user when using automatic database user provisioning. |
db_roles | []string | DatabaseRoles is a list of databases roles for automatic user creation. |
db_service_labels | object | DatabaseServiceLabels are used in RBAC system to allow/deny access to Database Services. |
db_service_labels_expression | string | DatabaseServiceLabelsExpression is a predicate expression used to allow/deny access to Database Services. |
db_users | []string | DatabaseUsers is a list of databases users this role is allowed to connect as. |
desktop_groups | []string | DesktopGroups is a list of groups for created desktop users to be added to |
gcp_service_accounts | []string | GCPServiceAccounts is a list of GCP service accounts this role is allowed to assume. |
github_permissions | []object | GitHubPermissions defines GitHub integration related permissions. |
group_labels | object | GroupLabels is a map of labels used as part of the RBAC system. |
group_labels_expression | string | GroupLabelsExpression is a predicate expression used to allow/deny access to user groups. |
host_groups | []string | HostGroups is a list of groups for created users to be added to |
host_sudoers | []string | HostSudoers is a list of entries to include in a users sudoer file |
impersonate | object | Impersonate specifies what users and roles this role is allowed to impersonate by issuing certificates or other possible means. |
join_sessions | []object | JoinSessions specifies policies to allow users to join other sessions. |
kubernetes_groups | []string | KubeGroups is a list of kubernetes groups |
kubernetes_labels | object | KubernetesLabels is a map of kubernetes cluster labels used for RBAC. |
kubernetes_labels_expression | string | KubernetesLabelsExpression is a predicate expression used to allow/deny access to kubernetes clusters. |
kubernetes_resources | []object | KubernetesResources is the Kubernetes Resources this Role grants access to. |
kubernetes_users | []string | KubeUsers is an optional kubernetes users to impersonate |
logins | []string | Logins is a list of *nix system logins. |
mcp | object | MCPPermissions defines MCP servers related permissions. |
node_labels | object | NodeLabels is a map of node labels (used to dynamically grant access to nodes). |
node_labels_expression | string | NodeLabelsExpression is a predicate expression used to allow/deny access to SSH nodes. |
request | object | |
require_session_join | []object | RequireSessionJoin specifies policies for required users to start a session. |
review_requests | object | ReviewRequests defines conditions for submitting access reviews. |
rules | []object | Rules is a list of rules and their access levels. Rules are a high level construct used for access control. |
spiffe | []object | SPIFFE is used to allow or deny access to a role holder to generating a SPIFFE SVID. |
windows_desktop_labels | object | WindowsDesktopLabels are used in the RBAC system to allow/deny access to Windows desktops. |
windows_desktop_labels_expression | string | WindowsDesktopLabelsExpression is a predicate expression used to allow/deny access to Windows desktops. |
windows_desktop_logins | []string | WindowsDesktopLogins is a list of desktop login names allowed/denied for Windows desktops. |
workload_identity_labels | object | WorkloadIdentityLabels controls whether or not specific WorkloadIdentity resources can be invoked. Further authorization controls exist on the WorkloadIdentity resource itself. |
workload_identity_labels_expression | string | WorkloadIdentityLabelsExpression is a predicate expression used to allow/deny access to issuing a WorkloadIdentity. |
spec.allow.account_assignments items
Field | Type | Description |
---|---|---|
account | string | |
permission_set | string |
spec.allow.db_permissions items
Field | Type | Description |
---|---|---|
match | object | Match is a list of object labels that must be matched for the permission to be granted. |
permissions | []string | Permission is the list of string representations of the permission to be given, e.g. SELECT, INSERT, UPDATE, ... |
spec.allow.github_permissions items
Field | Type | Description |
---|---|---|
orgs | []string |
spec.allow.impersonate
Field | Type | Description |
---|---|---|
roles | []string | Roles is a list of resources this role is allowed to impersonate |
users | []string | Users is a list of resources this role is allowed to impersonate, could be an empty list or a Wildcard pattern |
where | string | Where specifies optional advanced matcher |
spec.allow.join_sessions items
Field | Type | Description |
---|---|---|
kinds | []string | Kinds are the session kinds this policy applies to. |
modes | []string | Modes is a list of permitted participant modes for this policy. |
name | string | Name is the name of the policy. |
roles | []string | Roles is a list of roles that you can join the session of. |
spec.allow.kubernetes_resources items
Field | Type | Description |
---|---|---|
api_group | string | APIGroup specifies the Kubernetes API group of the Kubernetes resource. It supports wildcards. |
kind | string | Kind specifies the Kubernetes Resource type. |
name | string | Name is the resource name. It supports wildcards. |
namespace | string | Namespace is the resource namespace. It supports wildcards. |
verbs | []string | Verbs are the allowed Kubernetes verbs for the following resource. |
spec.allow.mcp
Field | Type | Description |
---|---|---|
tools | []string | Tools defines the list of tools allowed or denied for this role. Each entry can be a literal string, a glob pattern (e.g. "prefix_*"), or a regular expression (must start with '^' and end with '$'). If the list is empty, no tools are allowed. |
spec.allow.request
Field | Type | Description |
---|---|---|
annotations | object | Annotations is a collection of annotations to be programmatically appended to pending Access Requests at the time of their creation. These annotations serve as a mechanism to propagate extra information to plugins. Since these annotations support variable interpolation syntax, they also offer a mechanism for forwarding claims from an external identity provider, to a plugin via {{external.trait_name}} style substitutions. |
claims_to_roles | []object | ClaimsToRoles specifies a mapping from claims (traits) to teleport roles. |
kubernetes_resources | []object | kubernetes_resources can optionally enforce a requester to request only certain kinds of kube resources. Eg: Users can make request to either a resource kind "kube_cluster" or any of its subresources like "namespaces". This field can be defined such that it prevents a user from requesting "kube_cluster" and enforce requesting any of its subresources. |
max_duration | string | MaxDuration is the amount of time the access will be granted for. If this is zero, the default duration is used. |
reason | object | Reason defines settings for the reason for the access provided by the user. |
roles | []string | Roles is the name of roles which will match the request rule. |
search_as_roles | []string | SearchAsRoles is a list of extra roles which should apply to a user while they are searching for resources as part of a Resource Access Request, and defines the underlying roles which will be requested as part of any Resource Access Request. |
suggested_reviewers | []string | SuggestedReviewers is a list of reviewer suggestions. These can be teleport usernames, but that is not a requirement. |
thresholds | []object | Thresholds is a list of thresholds, one of which must be met in order for reviews to trigger a state-transition. If no thresholds are provided, a default threshold of 1 for approval and denial is used. |
spec.allow.request.claims_to_roles items
Field | Type | Description |
---|---|---|
claim | string | Claim is a claim name. |
roles | []string | Roles is a list of static teleport roles to match. |
value | string | Value is a claim value to match. |
spec.allow.request.kubernetes_resources items
Field | Type | Description |
---|---|---|
api_group | string | APIGroup specifies the Kubernetes Resource API group. |
kind | string | kind specifies the Kubernetes Resource type. |
spec.allow.request.reason
Field | Type | Description |
---|---|---|
mode | string | Mode can be either "required" or "optional". Empty string is treated as "optional". If a role has the request reason mode set to "required", then reason is required for all Access Requests requesting roles or resources allowed by this role. It applies only to users who have this role assigned. |
spec.allow.request.thresholds items
Field | Type | Description |
---|---|---|
approve | integer | Approve is the number of matching approvals needed for state-transition. |
deny | integer | Deny is the number of denials needed for state-transition. |
filter | string | Filter is an optional predicate used to determine which reviews count toward this threshold. |
name | string | Name is the optional human-readable name of the threshold. |
spec.allow.require_session_join items
Field | Type | Description |
---|---|---|
count | integer | Count is the amount of people that need to be matched for this policy to be fulfilled. |
filter | string | Filter is a predicate that determines what users count towards this policy. |
kinds | []string | Kinds are the session kinds this policy applies to. |
modes | []string | Modes is the list of modes that may be used to fulfill this policy. |
name | string | Name is the name of the policy. |
on_leave | string | OnLeave is the behaviour that's used when the policy is no longer fulfilled for a live session. |
spec.allow.review_requests
Field | Type | Description |
---|---|---|
claims_to_roles | []object | ClaimsToRoles specifies a mapping from claims (traits) to teleport roles. |
preview_as_roles | []string | PreviewAsRoles is a list of extra roles which should apply to a reviewer while they are viewing a Resource Access Request for the purposes of viewing details such as the hostname and labels of requested resources. |
roles | []string | Roles is the name of roles which may be reviewed. |
where | string | Where is an optional predicate which further limits which requests are reviewable. |