Skip to main content

TeleportScopedRoleV1

Report an Issue

This guide lists the fields in the TeleportScopedRoleV1 resource, which you can apply after installing the Teleport Kubernetes operator.

resources.teleport.dev/v1​

apiVersion: resources.teleport.dev/v1

FieldTypeDescription
apiVersionstringAPIVersion 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
kindstringKind 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
metadataobject
scopestringScope is the scope of the role resource.
specobjectScopedRole resource definition v1 from Teleport

spec​

FieldTypeDescription
appobjectThe App Access specific configuration for a scoped role.
assignable_scopes[]stringAssignableScopes is a list of scopes to which this role can be assigned.
defaultsobjectDefaults specifies default values for controls common across multiple protocols. If the same control specified in defaults is also specified in a protocol block, the value in the protocol block takes precedence.
kubeobjectThe kubernetes specific configuration for a scoped role.
rules[]objectRules describes basic resource:verb permissions (e.g. scoped_role:read).
sshobjectSsh specifies controls that govern SSH access.
workload_identityobjectWorkloadIdentity specifies controls that govern issuance using WorkloadIdentity resources.

spec.app​

FieldTypeDescription
client_idle_timeoutstringOverrides the defaults block idle timeout specifically for app sessions. Must be a valid Go duration string (e.g. "30m", "1h"). If empty, the defaults block value (or global default) applies.
disconnect_expired_certbooleanDisconnectExpiredCert controls whether App sessions are disconnected when the user certificate expires. If empty, the defaults block value (or global default) applies.
label_expressionstringLabelExpression is an optional predicate expression evaluated against an application's labels.
labels[]objectThe set of application labels used for RBAC.
lockobjectLock configures the role's locking behavior for app sessions. If empty, the defaults block value (or global default) applies.

spec.app.labels items​

FieldTypeDescription
namestringThe name of the label.
values[]stringThe values associated with the label.

spec.app.lock​

FieldTypeDescription
modestringAllowed values: strict or best_effort. Defaults to value cluster wide auth preference if not set.

spec.defaults​

FieldTypeDescription
client_idle_timeoutstringClientIdleTimeout sets the default idle timeout for access sessions across all protocols that do not specify their own value. Must be a valid Go duration string (e.g. "30m", "1h"). The cluster-wide default is used only when neither this nor the protocol's equivalent control is set.
disconnect_expired_certbooleanDisconnectExpiredCert defines the default behavior of all protocols when certs expire for a session. The cluster-wide default is used only when neither this nor the protocol's equivalent control is set.
lockobjectLock specifies the default locking mode for access sessions across all protocols that do not specify their own value. The cluster-wide default is used only when neither this nor the protocol's equivalent control is set.
session_recordingobjectSessionRecording configures the session recording strategy for all protocols that don't explicitly set their session recording mode. If neither this nor the protocol's equivalent control is set, best_effort is used.

spec.defaults.lock​

FieldTypeDescription
modestringAllowed values: strict or best_effort. Defaults to value cluster wide auth preference if not set.

spec.defaults.session_recording​

FieldTypeDescription
modestringMode sets the session recording mode. Allowed values: strict or best_effort.

spec.kube​

FieldTypeDescription
client_idle_timeoutstringOverrides the defaults block idle timeout specifically for kube sessions. Must be a valid Go duration string (e.g. "30m", "1h"). If empty, the defaults block value (or global default) applies.
disconnect_expired_certbooleanDisconnectExpiredCert controls whether Kube sessions are disconnected when the user certificate expires. If empty, the defaults block value (or global default) applies.
groups[]stringThe list of kubernetes groups this role allows.
label_expressionstringLabelExpression is an optional predicate expression evaluated against a kubernetes server's labels.
labels[]objectThe map of kubernetes cluster labels used for RBAC.
lockobjectLock configures the role's locking behavior for kubernetes sessions. If empty, the defaults block value (or global default) applies.
resources[]objectThe kubernetes resources this role grants access to.
users[]stringAn optional list of impersonatable kubernetes users this role allows.

spec.kube.labels items​

FieldTypeDescription
namestringThe name of the label.
values[]stringThe values associated with the label.

spec.kube.lock​

FieldTypeDescription
modestringAllowed values: strict or best_effort. Defaults to value cluster wide auth preference if not set.

spec.kube.resources items​

FieldTypeDescription
api_groupstringThe kube API group of the kube resource. It supports wildcards.
kindstringThe kube resource type.
namestringThe kube resource name. It supports wildcards.
namespacestringThe kube resource namespace. It supports wildcards.
verbs[]stringThe allowed kube verbs for interacting with the kube resource.

spec.rules items​

FieldTypeDescription
resources[]stringResources is a list of resource kinds (e.g. 'scoped_token') that the below verbs apply to.
verbs[]stringVerbs is the list of action verbs (e.g. 'read') that apply to the above resources.

spec.ssh​

FieldTypeDescription
client_idle_timeoutstringClientIdleTimeout overrides the defaults block idle timeout specifically for SSH sessions. Must be a valid Go duration string (e.g. "30m", "1h"). If empty, the defaults block value (or global default) applies.
disconnect_expired_certbooleanDisconnectExpiredCert controls whether SSH sessions are disconnected when the user certificate expires. If empty, the defaults block value (or global default) applies.
enhanced_recordingobjectEnhancedRecording is the set of BPF events to record for enhanced session recording.
file_copybooleanFileCopy indicates whether remote file operations via SCP or SFTP are allowed over an SSH session. It defaults to allowing the user to download and upload files by default.
forward_agentbooleanForwardAgent enables SSH agent forwarding.
host_sudoers[]stringSudoers is a list of entries to include in a users sudoer file
host_user_creationobjectHostUserCreation configures the creation of host users.
label_expressionstringLabelExpression is an optional predicate expression evaluated against an ssh node's labels.
labels[]objectLabels is the set of node labels used to dynamically select which nodes this role applies to.
lockobjectLock configures the role's locking behavior for SSH sessions. If empty, the defaults block value (or global default) applies.
logins[]stringLogins is the list of OS logins this role permits on matching nodes.
max_sessionsintegerMaxSessions defines the maximum number of concurrent sessions per connection.
permit_x11_forwardingbooleanPermitX11Forwarding, when true, authorizes use of X11 forwarding over SSH sessions. If not set, X11 forwarding is not permitted.
port_forwardingobjectSSHPortForwarding configures what types of SSH port forwarding are allowed by a role.
session_recordingobjectSessionRecording configures the session recording strategy for SSH sessions.

spec.ssh.enhanced_recording​

FieldTypeDescription
commandbooleanCommand enables session.command in audit logs
diskbooleanDisk enables session.disk in audit logs
networkbooleanNetwork enables session.network in audit logs

spec.ssh.host_user_creation​

FieldTypeDescription
groups[]stringGroups is a list of host groups to add the user to.
modestringMode specifies how the host user should be created.
shellstringShell is the shell to set for the user.

spec.ssh.labels items​

FieldTypeDescription
namestringThe name of the label.
values[]stringThe values associated with the label.

spec.ssh.lock​

FieldTypeDescription
modestringAllowed values: strict or best_effort. Defaults to value cluster wide auth preference if not set.

spec.ssh.port_forwarding​

FieldTypeDescription
localobjectAllow for local port forwarding.
remoteobjectAllow for remote port forwarding.

spec.ssh.port_forwarding.local​

FieldTypeDescription
enabledboolean

spec.ssh.port_forwarding.remote​

FieldTypeDescription
enabledboolean

spec.ssh.session_recording​

FieldTypeDescription
modestringMode sets the session recording mode. Allowed values: strict or best_effort.

spec.workload_identity​

FieldTypeDescription
labels[]objectLabels is the set of WorkloadIdentity labels used to dynamically select which WorkloadIdentity resources this role permits issuance with. Issuance additionally requires the caller to hold read_no_secrets (and, for the multi-issue RPC, list) rules for the workload_identity kind in the relevant scope.

spec.workload_identity.labels items​

FieldTypeDescription
namestringThe name of the label.
values[]stringThe values associated with the label.