github.com/gravitational/teleport/api@v0.0.0-20240507183017-3110591cbafc/types/constants.go (about)

     1  /*
     2  Copyright 2020-2021 Gravitational, Inc.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package types
    18  
    19  import (
    20  	"github.com/gravitational/teleport/api/types/common"
    21  )
    22  
    23  const (
    24  	// DefaultAPIGroup is a default group of permissions API,
    25  	// lets us to add different permission types
    26  	DefaultAPIGroup = "gravitational.io/teleport"
    27  
    28  	// DefaultReleaseServerAddr is the default release service URL
    29  	DefaultReleaseServerAddr = "rlz.teleport.sh"
    30  
    31  	// ReleaseServerEnvVar is the environment variable used to overwrite
    32  	// the default release server address
    33  	ReleaseServerEnvVar = "RELEASE_SERVER_HOSTPORT"
    34  
    35  	// EnterpriseReleaseEndpoint is the endpoint of Teleport Enterprise
    36  	// releases on the release server
    37  	EnterpriseReleaseEndpoint = "teleport-ent"
    38  
    39  	// PackageNameOSS is the teleport package name for the OSS version.
    40  	PackageNameOSS = "teleport"
    41  	// PackageNameOSS is the teleport package name for the Enterprise version.
    42  	PackageNameEnt = "teleport-ent"
    43  
    44  	// ActionRead grants read access (get, list)
    45  	ActionRead = "read"
    46  
    47  	// ActionWrite allows to write (create, update, delete)
    48  	ActionWrite = "write"
    49  
    50  	// Wildcard is a special wildcard character matching everything
    51  	Wildcard = "*"
    52  
    53  	// True holds "true" string value
    54  	True = "true"
    55  
    56  	// HomeEnvVar specifies the home location for tsh configuration
    57  	// and data
    58  	HomeEnvVar = "TELEPORT_HOME"
    59  
    60  	// KindNamespace is a namespace
    61  	KindNamespace = "namespace"
    62  
    63  	// KindUser is a user resource
    64  	KindUser = "user"
    65  
    66  	// KindBot is a Machine ID bot resource
    67  	KindBot = "bot"
    68  
    69  	// KindHostCert is a host certificate
    70  	KindHostCert = "host_cert"
    71  
    72  	// KindJWT is a JWT token signer.
    73  	KindJWT = "jwt"
    74  
    75  	// KindLicense is a license resource
    76  	KindLicense = "license"
    77  
    78  	// KindRole is a role resource
    79  	KindRole = "role"
    80  
    81  	// KindAccessRequest is an AccessRequest resource
    82  	KindAccessRequest = "access_request"
    83  
    84  	// KindAccessMonitoringRule is an access monitoring rule resource
    85  	KindAccessMonitoringRule = "access_monitoring_rule"
    86  
    87  	// KindPluginData is a PluginData resource
    88  	KindPluginData = "plugin_data"
    89  
    90  	// KindAccessPluginData is a resource directive that applies
    91  	// only to plugin data associated with access requests.
    92  	KindAccessPluginData = "access_plugin_data"
    93  
    94  	// KindOIDC is OIDC connector resource
    95  	KindOIDC = "oidc"
    96  
    97  	// KindSAML is SAML connector resource
    98  	KindSAML = "saml"
    99  
   100  	// KindGithub is Github connector resource
   101  	KindGithub = "github"
   102  
   103  	// KindOIDCRequest is OIDC auth request resource
   104  	KindOIDCRequest = "oidc_request"
   105  
   106  	// KindSAMLRequest is SAML auth request resource
   107  	KindSAMLRequest = "saml_request"
   108  
   109  	// KindGithubRequest is Github auth request resource
   110  	KindGithubRequest = "github_request"
   111  
   112  	// KindSession is a recorded SSH session.
   113  	KindSession = "session"
   114  
   115  	// KindSSHSession is an active SSH session.
   116  	KindSSHSession = "ssh_session"
   117  
   118  	// KindWebSession is a web session resource
   119  	KindWebSession = "web_session"
   120  
   121  	// KindWebToken is a web token resource
   122  	KindWebToken = "web_token"
   123  
   124  	// KindAppSession represents an application specific web session.
   125  	KindAppSession = "app_session"
   126  
   127  	// KindSnowflakeSession represents a Snowflake specific web session.
   128  	KindSnowflakeSession = "snowflake_session"
   129  
   130  	// KindSAMLIdPSession represents a SAML IdP session.
   131  	KindSAMLIdPSession = "saml_idp_session"
   132  
   133  	// KindEvent is structured audit logging event
   134  	KindEvent = "event"
   135  
   136  	// KindAuthServer is auth server resource
   137  	KindAuthServer = "auth_server"
   138  
   139  	// KindProxy is proxy resource
   140  	KindProxy = "proxy"
   141  
   142  	// KindNode is node resource. It can be either a Teleport node or
   143  	// a registered OpenSSH (agentless) node.
   144  	KindNode = "node"
   145  
   146  	// SubKindTeleportNode is a Teleport node.
   147  	SubKindTeleportNode = "teleport"
   148  
   149  	// SubKindOpenSSHNode is a registered OpenSSH (agentless) node.
   150  	SubKindOpenSSHNode = "openssh"
   151  
   152  	// SubKindOpenSSHEICENode is a registered OpenSSH (agentless) node that doesn't require trust in Teleport CA.
   153  	// For each session an SSH Key is created and uploaded to the target host using a side-channel.
   154  	//
   155  	// For Amazon EC2 Instances, it uploads the key using:
   156  	// https://docs.aws.amazon.com/ec2-instance-connect/latest/APIReference/API_SendSSHPublicKey.html
   157  	// This Key is valid for 60 seconds.
   158  	//
   159  	// It uses the private key created above to SSH into the host.
   160  	SubKindOpenSSHEICENode = "openssh-ec2-ice"
   161  
   162  	// KindUnifiedResource is a meta Kind that is used for the unified resource search present on
   163  	// the webUI and Connect. It allows us to query and return multiple kinds at the same time
   164  	KindUnifiedResource = "unified_resource"
   165  
   166  	// KindAppServer is an application server resource.
   167  	KindAppServer = "app_server"
   168  
   169  	// KindApp is a web app resource.
   170  	KindApp = "app"
   171  
   172  	// KindAppOrSAMLIdPServiceProvider represent an App Server resource or a SAML IdP Service Provider (SAML Application) resource.
   173  	// This is not a real resource stored in the backend, it is a pseudo resource used only to provide a common interface to
   174  	// the ListResources RPC in order to be able to list both AppServers and SAMLIdPServiceProviders in the same request.
   175  	//
   176  	// DEPRECATED: Use KindAppServer and KindSAMLIdPServiceProvider individually.
   177  	KindAppOrSAMLIdPServiceProvider = "app_server_or_saml_idp_sp"
   178  
   179  	// KindDatabaseServer is a database proxy server resource.
   180  	KindDatabaseServer = "db_server"
   181  
   182  	// KindDatabaseService is a database service resource.
   183  	KindDatabaseService = "db_service"
   184  
   185  	// KindDatabase is a database resource.
   186  	KindDatabase = "db"
   187  
   188  	// KindDatabaseObjectImportRule is a database object import rule resource.
   189  	KindDatabaseObjectImportRule = "db_object_import_rule"
   190  
   191  	// KindDatabaseObject is a database object resource.
   192  	KindDatabaseObject = "db_object"
   193  
   194  	// KindKubeServer is an kubernetes server resource.
   195  	KindKubeServer = "kube_server"
   196  	// KindCrownJewel is a crown jewel resource
   197  	KindCrownJewel = "crown_jewel"
   198  	// KindKubernetesCluster is a Kubernetes cluster.
   199  	KindKubernetesCluster = "kube_cluster"
   200  
   201  	// KindKubePod is a Kubernetes Pod resource type.
   202  	KindKubePod = "pod"
   203  
   204  	// KindKubeSecret is a Kubernetes Secret resource type.
   205  	KindKubeSecret = "secret"
   206  
   207  	// KindKubeConfigMap is a Kubernetes Configmap resource type.
   208  	KindKubeConfigmap = "configmap"
   209  
   210  	// KindKubeNamespace is a Kubernetes namespace resource type.
   211  	KindKubeNamespace = "namespace"
   212  
   213  	// KindKubeService is a Kubernetes Service resource type.
   214  	KindKubeService = "service"
   215  
   216  	// KindKubeServiceAccount is an Kubernetes Service Account resource type.
   217  	KindKubeServiceAccount = "serviceaccount"
   218  
   219  	// KindKubeNode is a Kubernetes Node resource type.
   220  	KindKubeNode = "kube_node"
   221  
   222  	// KindKubePersistentVolume is a Kubernetes Persistent Volume resource type.
   223  	KindKubePersistentVolume = "persistentvolume"
   224  
   225  	// KindKubePersistentVolumeClaim is a Kubernetes Persistent Volume Claim resource type.
   226  	KindKubePersistentVolumeClaim = "persistentvolumeclaim"
   227  
   228  	// KindKubeDeployment is a Kubernetes Deployment resource type.
   229  	KindKubeDeployment = "deployment"
   230  
   231  	// KindKubeReplicaSet is a Kubernetes Replicaset resource type.
   232  	KindKubeReplicaSet = "replicaset"
   233  
   234  	// KindKubeStatefulset is a Kubernetes Statefulset resource type.
   235  	KindKubeStatefulset = "statefulset"
   236  
   237  	// KindKubeDaemonSet is a Kubernetes Daemonset resource type.
   238  	KindKubeDaemonSet = "daemonset"
   239  
   240  	// KindKubeClusterRole is a Kubernetes ClusterRole resource type.
   241  	KindKubeClusterRole = "clusterrole"
   242  
   243  	// KindKubeRole is a Kubernetes Role resource type.
   244  	KindKubeRole = "kube_role"
   245  
   246  	// KindKubeClusterRoleBinding is a Kubernetes Cluster Role Binding resource type.
   247  	KindKubeClusterRoleBinding = "clusterrolebinding"
   248  
   249  	// KindKubeRoleBinding is a Kubernetes Role Binding resource type.
   250  	KindKubeRoleBinding = "rolebinding"
   251  
   252  	// KindKubeCronjob is a Kubernetes Cronjob resource type.
   253  	KindKubeCronjob = "cronjob"
   254  
   255  	// KindKubeJob is a Kubernetes job resource type.
   256  	KindKubeJob = "job"
   257  
   258  	// KindKubeCertificateSigningRequest is a Certificate Signing Request resource type.
   259  	KindKubeCertificateSigningRequest = "certificatesigningrequest"
   260  
   261  	// KindKubeIngress is a Kubernetes Ingress resource type.
   262  	KindKubeIngress = "ingress"
   263  
   264  	// KindKubeWaitingContainer is a Kubernetes ephemeral
   265  	// container that are waiting to be created until moderated
   266  	// session conditions are met.
   267  	KindKubeWaitingContainer = "kube_ephemeral_container"
   268  
   269  	// KindToken is a provisioning token resource
   270  	KindToken = "token"
   271  
   272  	// KindCertAuthority is a certificate authority resource
   273  	KindCertAuthority = "cert_authority"
   274  
   275  	// KindReverseTunnel is a reverse tunnel connection
   276  	KindReverseTunnel = "tunnel"
   277  
   278  	// KindOIDCConnector is a OIDC connector resource
   279  	KindOIDCConnector = "oidc"
   280  
   281  	// KindSAMLConnector is a SAML connector resource
   282  	KindSAMLConnector = "saml"
   283  
   284  	// KindGithubConnector is Github OAuth2 connector resource
   285  	KindGithubConnector = "github"
   286  
   287  	// KindConnectors is a shortcut for all authentication connector
   288  	KindConnectors = "connectors"
   289  
   290  	// KindClusterAuthPreference is the type of authentication for this cluster.
   291  	KindClusterAuthPreference = "cluster_auth_preference"
   292  
   293  	// MetaNameClusterAuthPreference is the type of authentication for this cluster.
   294  	MetaNameClusterAuthPreference = "cluster-auth-preference"
   295  
   296  	// KindSessionRecordingConfig is the resource for session recording configuration.
   297  	KindSessionRecordingConfig = "session_recording_config"
   298  
   299  	// MetaNameSessionRecordingConfig is the exact name of the singleton resource for
   300  	// session recording configuration.
   301  	MetaNameSessionRecordingConfig = "session-recording-config"
   302  
   303  	// KindExternalAuditStorage the resource kind for External Audit Storage
   304  	// configuration.
   305  	KindExternalAuditStorage = "external_audit_storage"
   306  	// MetaNameExternalAuditStorageDraft is the exact name of the singleton resource
   307  	// holding External Audit Storage draft configuration.
   308  	MetaNameExternalAuditStorageDraft = "draft"
   309  	// MetaNameExternalAuditStorageCluster is the exact name of the singleton resource
   310  	// holding External Audit Storage cluster configuration.
   311  	MetaNameExternalAuditStorageCluster = "cluster"
   312  
   313  	// KindClusterConfig is the resource that holds cluster level configuration.
   314  	// Deprecated: This does not correspond to an actual resource anymore but is
   315  	// still used when checking access to the new configuration resources, as an
   316  	// alternative to their individual resource kinds.
   317  	KindClusterConfig = "cluster_config"
   318  
   319  	// KindClusterAuditConfig is the resource that holds cluster audit configuration.
   320  	KindClusterAuditConfig = "cluster_audit_config"
   321  
   322  	// MetaNameClusterAuditConfig is the exact name of the singleton resource holding
   323  	// cluster audit configuration.
   324  	MetaNameClusterAuditConfig = "cluster-audit-config"
   325  
   326  	// MetaNameUIConfig is the exact name of the singleton resource holding
   327  	// proxy service UI configuration.
   328  	MetaNameUIConfig = "ui-config"
   329  
   330  	// KindClusterNetworkingConfig is the resource that holds cluster networking configuration.
   331  	KindClusterNetworkingConfig = "cluster_networking_config"
   332  
   333  	// MetaNameClusterNetworkingConfig is the exact name of the singleton resource holding
   334  	// cluster networking configuration.
   335  	MetaNameClusterNetworkingConfig = "cluster-networking-config"
   336  
   337  	// KindSemaphore is the resource that provides distributed semaphore functionality
   338  	KindSemaphore = "semaphore"
   339  
   340  	// KindClusterName is a type of configuration resource that contains the cluster name.
   341  	KindClusterName = "cluster_name"
   342  
   343  	// MetaNameClusterName is the name of a configuration resource for cluster name.
   344  	MetaNameClusterName = "cluster-name"
   345  
   346  	// MetaNameWatchStatus is the name of a watch status resource.
   347  	MetaNameWatchStatus = "watch-status"
   348  
   349  	// KindStaticTokens is a type of configuration resource that contains static tokens.
   350  	KindStaticTokens = "static_tokens"
   351  
   352  	// MetaNameStaticTokens is the name of a configuration resource for static tokens.
   353  	MetaNameStaticTokens = "static-tokens"
   354  
   355  	// MetaNameSessionTracker is the prefix of resources used to track live sessions.
   356  	MetaNameSessionTracker = "session-tracker"
   357  
   358  	// KindTrustedCluster is a resource that contains trusted cluster configuration.
   359  	KindTrustedCluster = "trusted_cluster"
   360  
   361  	// KindAuthConnector allows access to OIDC and SAML connectors.
   362  	KindAuthConnector = "auth_connector"
   363  
   364  	// KindTunnelConnection specifies connection of a reverse tunnel to proxy
   365  	KindTunnelConnection = "tunnel_connection"
   366  
   367  	// KindRemoteCluster represents remote cluster connected via reverse tunnel
   368  	// to proxy
   369  	KindRemoteCluster = "remote_cluster"
   370  
   371  	// KindUserToken is a user token used for various user related actions.
   372  	KindUserToken = "user_token"
   373  
   374  	// KindUserTokenSecrets is user token secrets.
   375  	KindUserTokenSecrets = "user_token_secrets"
   376  
   377  	// KindIdentity is local on disk identity resource
   378  	KindIdentity = "identity"
   379  
   380  	// KindState is local on disk process state
   381  	KindState = "state"
   382  
   383  	// KindMFADevice is an MFA device for a user.
   384  	KindMFADevice = "mfa_device"
   385  
   386  	// KindBilling represents access to cloud billing features
   387  	KindBilling = "billing"
   388  
   389  	// KindLock is a lock resource.
   390  	KindLock = "lock"
   391  
   392  	// KindNetworkRestrictions are restrictions for SSH sessions
   393  	KindNetworkRestrictions = "network_restrictions"
   394  
   395  	// MetaNameNetworkRestrictions is the exact name of the singleton resource for
   396  	// network restrictions
   397  	MetaNameNetworkRestrictions = "network-restrictions"
   398  
   399  	// KindWindowsDesktopService is a Windows desktop service resource.
   400  	KindWindowsDesktopService = "windows_desktop_service"
   401  
   402  	// KindWindowsDesktop is a Windows desktop host.
   403  	KindWindowsDesktop = "windows_desktop"
   404  
   405  	// KindRecoveryCodes is a resource that holds users recovery codes.
   406  	KindRecoveryCodes = "recovery_codes"
   407  
   408  	// KindSessionTracker is a resource that tracks a live session.
   409  	KindSessionTracker = "session_tracker"
   410  
   411  	// KindConnectionDiagnostic is a resource that tracks the result of testing a connection
   412  	KindConnectionDiagnostic = "connection_diagnostic"
   413  
   414  	// KindDatabaseCertificate is a resource to control db CA cert
   415  	// generation.
   416  	KindDatabaseCertificate = "database_certificate"
   417  
   418  	// KindInstaller is a resource that holds a node installer script
   419  	// used to install teleport on discovered nodes
   420  	KindInstaller = "installer"
   421  
   422  	// KindUIConfig is a resource that holds configuration for the UI
   423  	// served by the proxy service
   424  	KindUIConfig = "ui_config"
   425  
   426  	// KindClusterAlert is a resource that conveys a cluster-level alert message.
   427  	KindClusterAlert = "cluster_alert"
   428  
   429  	// KindDevice represents a registered or trusted device.
   430  	KindDevice = "device"
   431  
   432  	// KindDownload represents Teleport binaries downloads.
   433  	KindDownload = "download"
   434  
   435  	// KindUsageEvent is an external cluster usage event. Similar to
   436  	// KindHostCert, this kind is not backed by a real resource.
   437  	KindUsageEvent = "usage_event"
   438  
   439  	// KindInstance represents a teleport instance independent of any specific service.
   440  	KindInstance = "instance"
   441  
   442  	// KindLoginRule is a login rule resource.
   443  	KindLoginRule = "login_rule"
   444  
   445  	// KindPlugin represents a plugin instance
   446  	KindPlugin = "plugin"
   447  
   448  	// KindPluginStaticCredentials represents plugin static credentials.
   449  	KindPluginStaticCredentials = "plugin_static_credentials"
   450  
   451  	// KindSAMLIdPServiceProvider is a SAML service provider for the built in Teleport IdP.
   452  	KindSAMLIdPServiceProvider = "saml_idp_service_provider"
   453  
   454  	// KindUserGroup is an externally sourced user group.
   455  	KindUserGroup = "user_group"
   456  
   457  	// KindOktaImportRule is a rule for importing Okta objects.
   458  	KindOktaImportRule = "okta_import_rule"
   459  
   460  	// KindOktaAssignment is a set of actions to apply to Okta.
   461  	KindOktaAssignment = "okta_assignment"
   462  
   463  	// KindHeadlessAuthentication is a headless authentication resource.
   464  	KindHeadlessAuthentication = "headless_authentication"
   465  
   466  	// KindAssistant is used to program RBAC for
   467  	// Teleport Assist resources.
   468  	KindAssistant = "assistant"
   469  
   470  	// KindAccessGraph is the RBAC kind for access graph.
   471  	KindAccessGraph = "access_graph"
   472  
   473  	// KindIntegration is a connection to a 3rd party system API.
   474  	KindIntegration = "integration"
   475  
   476  	// KindClusterMaintenanceConfig determines maintenance times for the cluster.
   477  	KindClusterMaintenanceConfig = "cluster_maintenance_config"
   478  
   479  	// KindServerInfo contains info that should be applied to joining Nodes.
   480  	KindServerInfo = "server_info"
   481  
   482  	// SubKindCloudInfo is a ServerInfo that was created by the Discovery
   483  	// service to match with a single discovered instance.
   484  	SubKindCloudInfo = "cloud_info"
   485  
   486  	// MetaNameClusterMaintenanceConfig is the only allowed metadata.name value for the maintenance
   487  	// window singleton resource.
   488  	MetaNameClusterMaintenanceConfig = "cluster-maintenance-config"
   489  
   490  	// KindWatchStatus is a kind for WatchStatus resource which contains information about a successful Watch request.
   491  	KindWatchStatus = "watch_status"
   492  
   493  	// KindAccessList is an AccessList resource
   494  	KindAccessList = "access_list"
   495  
   496  	// KindUserLoginState is a UserLoginState resource
   497  	KindUserLoginState = "user_login_state"
   498  
   499  	// KindAccessListMember is an AccessListMember resource
   500  	KindAccessListMember = "access_list_member"
   501  
   502  	// KindAccessListReview is an AccessListReview resource
   503  	KindAccessListReview = "access_list_review"
   504  
   505  	// KindDiscoveryConfig is a DiscoveryConfig resource.
   506  	// Used for adding additional matchers in Discovery Service.
   507  	KindDiscoveryConfig = "discovery_config"
   508  	// KindAuditQuery is an AuditQuery resource.
   509  	KindAuditQuery = "audit_query"
   510  	// KindSecurityReport is a SecurityReport resource.
   511  	KindSecurityReport = "security_report"
   512  	// KindSecurityReportState is a SecurityReportState resource.
   513  	KindSecurityReportState = "security_report_state"
   514  	// KindSecurityReportCostLimiter const limiter
   515  	KindSecurityReportCostLimiter = "security_report_cost_limiter"
   516  
   517  	// KindNotification is a notification resource.
   518  	KindNotification = "notification"
   519  	// KindGlobalNotification is a global notification resource.
   520  	KindGlobalNotification = "global_notification"
   521  	// KindUserLastSeenNotification is a resource which stores the timestamp of a user's last seen notification.
   522  	KindUserLastSeenNotification = "user_last_seen_notification"
   523  	// KindUserNotificationState is a resource which tracks whether a user has clicked on or dismissed a notification.
   524  	KindUserNotificationState = "user_notification_state"
   525  
   526  	// V7 is the seventh version of resources.
   527  	V7 = "v7"
   528  
   529  	// V6 is the sixth version of resources.
   530  	V6 = "v6"
   531  
   532  	// V5 is the fifth version of resources.
   533  	V5 = "v5"
   534  
   535  	// V4 is the fourth version of resources.
   536  	V4 = "v4"
   537  
   538  	// V3 is the third version of resources.
   539  	V3 = "v3"
   540  
   541  	// V2 is the second version of resources.
   542  	V2 = "v2"
   543  
   544  	// V1 is the first version of resources. Note: The first version was
   545  	// not explicitly versioned.
   546  	V1 = "v1"
   547  )
   548  
   549  // WebSessionSubKinds lists subkinds of web session resources
   550  var WebSessionSubKinds = []string{KindAppSession, KindWebSession, KindSnowflakeSession, KindSAMLIdPSession}
   551  
   552  const (
   553  	// VerbList is used to list all objects. Does not imply the ability to read a single object.
   554  	VerbList = "list"
   555  
   556  	// VerbCreate is used to create an object.
   557  	VerbCreate = "create"
   558  
   559  	// VerbRead is used to read a single object.
   560  	VerbRead = "read"
   561  
   562  	// VerbReadNoSecrets is used to read a single object without secrets.
   563  	VerbReadNoSecrets = "readnosecrets"
   564  
   565  	// VerbUpdate is used to update an object.
   566  	VerbUpdate = "update"
   567  
   568  	// VerbDelete is used to remove an object.
   569  	VerbDelete = "delete"
   570  
   571  	// VerbRotate is used to rotate certificate authorities
   572  	// used only internally
   573  	VerbRotate = "rotate"
   574  
   575  	// VerbCreateEnrollToken allows the creation of device enrollment tokens.
   576  	// Device Trust is a Teleport Enterprise feature.
   577  	VerbCreateEnrollToken = "create_enroll_token"
   578  
   579  	// VerbEnroll allows enrollment of trusted devices.
   580  	// Device Trust is a Teleport Enterprise feature.
   581  	VerbEnroll = "enroll"
   582  
   583  	// VerbUse allows the usage of an Integration.
   584  	// Roles with this verb can issue API calls using the integration.
   585  	VerbUse = "use"
   586  )
   587  
   588  const (
   589  	// TeleportNamespace is used as the namespace prefix for labels defined by Teleport which can
   590  	// carry metadata such as cloud AWS account or instance. Those labels can be used for RBAC.
   591  	//
   592  	// If a label with this prefix is used in a config file, the associated feature must take into
   593  	// account that the label might be removed, modified or could have been set by the user.
   594  	//
   595  	// See also TeleportInternalLabelPrefix and TeleportHiddenLabelPrefix.
   596  	TeleportNamespace = common.TeleportNamespace
   597  
   598  	// OriginLabel is a resource metadata label name used to identify a source
   599  	// that the resource originates from.
   600  	OriginLabel = common.OriginLabel
   601  
   602  	// ClusterLabel is a label that identifies the current cluster when creating resources on another systems.
   603  	// Eg, when creating a resource in AWS, this label must be set as a Tag in the resource.
   604  	ClusterLabel = TeleportNamespace + "/cluster"
   605  
   606  	// ADLabel is a resource metadata label name used to identify if resource is part of Active Directory
   607  	ADLabel = TeleportNamespace + "/ad"
   608  
   609  	// OriginDefaults is an origin value indicating that the resource was
   610  	// constructed as a default value.
   611  	OriginDefaults = common.OriginDefaults
   612  
   613  	// OriginConfigFile is an origin value indicating that the resource is
   614  	// derived from static configuration.
   615  	OriginConfigFile = common.OriginConfigFile
   616  
   617  	// OriginDynamic is an origin value indicating that the resource was
   618  	// committed as dynamic configuration.
   619  	OriginDynamic = common.OriginDynamic
   620  
   621  	// OriginCloud is an origin value indicating that the resource was
   622  	// imported from a cloud provider.
   623  	OriginCloud = common.OriginCloud
   624  
   625  	// OriginKubernetes is an origin value indicating that the resource was
   626  	// created from the Kubernetes Operator.
   627  	OriginKubernetes = common.OriginKubernetes
   628  
   629  	// OriginOkta is an origin value indicating that the resource was
   630  	// created from the Okta service.
   631  	OriginOkta = common.OriginOkta
   632  
   633  	// OriginIntegrationAWSOIDC is an origin value indicating that the resource was
   634  	// created from the AWS OIDC Integration.
   635  	OriginIntegrationAWSOIDC = common.OriginIntegrationAWSOIDC
   636  
   637  	// OriginDiscoveryKubernetes indicates that the resource was imported
   638  	// from kubernetes cluster by discovery service.
   639  	OriginDiscoveryKubernetes = common.OriginDiscoveryKubernetes
   640  
   641  	// OriginEntraID indicates that the resource was imported
   642  	// from the Entra ID directory.
   643  	OriginEntraID = common.OriginEntraID
   644  
   645  	// IntegrationLabel is a resource metadata label name used to identify the integration name that created the resource.
   646  	IntegrationLabel = TeleportNamespace + "/integration"
   647  
   648  	// AWSAccountIDLabel is used to identify nodes by AWS account ID
   649  	// found via automatic discovery, to avoid re-running installation
   650  	// commands on the node.
   651  	AWSAccountIDLabel = TeleportNamespace + "/account-id"
   652  	// AWSInstanceIDLabel is used to identify nodes by EC2 instance ID
   653  	// found via automatic discovery, to avoid re-running installation
   654  	// commands on the node.
   655  	AWSInstanceIDLabel = TeleportNamespace + "/instance-id"
   656  	// AWSInstanceRegion is used to identify the region an EC2
   657  	// instance is running in
   658  	AWSInstanceRegion = TeleportNamespace + "/aws-region"
   659  	// SubscriptionIDLabel is used to identify virtual machines by Azure
   660  	// subscription ID found via automatic discovery, to avoid re-running
   661  	// installation commands on the node.
   662  	SubscriptionIDLabel = TeleportInternalLabelPrefix + "subscription-id"
   663  	// VMIDLabel is used to identify virtual machines by ID found
   664  	// via automatic discovery, to avoid re-running installation commands
   665  	// on the node.
   666  	VMIDLabel = TeleportInternalLabelPrefix + "vm-id"
   667  	// ProjectIDLabel is used to identify virtual machines by GCP project
   668  	// id found via automatic discovery, to avoid re-running
   669  	// installation commands on the node.
   670  	ProjectIDLabel = TeleportInternalLabelPrefix + "project-id"
   671  	// ZoneLabek is used to identify virtual machines by GCP zone
   672  	// found via automatic discovery, to avoid re-running installation
   673  	// commands on the node.
   674  	ZoneLabel = TeleportInternalLabelPrefix + "zone"
   675  	// NameLabel is used to identify virtual machines by GCP VM name
   676  	// found via automatic discovery, to avoid re-running installation
   677  	// commands on the node.
   678  	NameLabel = TeleportInternalLabelPrefix + "name"
   679  
   680  	// CloudLabel is used to identify the cloud where the resource was discovered.
   681  	CloudLabel = TeleportNamespace + "/cloud"
   682  
   683  	// DatabaseAdminLabel is used to identify database admin user for auto-
   684  	// discovered databases.
   685  	DatabaseAdminLabel = TeleportNamespace + "/db-admin"
   686  
   687  	// DatabaseAdminDefaultDatabaseLabel is used to identify the database that
   688  	// the admin user logs into by default.
   689  	DatabaseAdminDefaultDatabaseLabel = TeleportNamespace + "/db-admin-default-database"
   690  
   691  	// cloudKubeClusterNameOverrideLabel is a cloud agnostic label key for
   692  	// overriding kubernetes cluster name in discovered cloud kube clusters.
   693  	// It's used for AWS, GCP, and Azure, but not exported to decouple the
   694  	// cloud-specific labels from eachother.
   695  	cloudKubeClusterNameOverrideLabel = "TeleportKubernetesName"
   696  
   697  	// cloudDatabaseNameOverrideLabel is a cloud agnostic label key for
   698  	// overriding the database name in discovered cloud databases.
   699  	// It's used for AWS, GCP, and Azure, but not exported to decouple the
   700  	// cloud-specific labels from eachother.
   701  	cloudDatabaseNameOverrideLabel = "TeleportDatabaseName"
   702  
   703  	// AzureDatabaseNameOverrideLabel is the label key containing the database
   704  	// name override for discovered Azure databases.
   705  	// Azure tags cannot contain these characters: "<>%&\?/", so it doesn't
   706  	// start with the namespace prefix.
   707  	AzureDatabaseNameOverrideLabel = cloudDatabaseNameOverrideLabel
   708  
   709  	// AzureKubeClusterNameOverrideLabel is the label key containing the
   710  	// kubernetes cluster name override for discovered Azure kube clusters.
   711  	AzureKubeClusterNameOverrideLabel = cloudKubeClusterNameOverrideLabel
   712  
   713  	// GCPKubeClusterNameOverrideLabel is the label key containing the
   714  	// kubernetes cluster name override for discovered GCP kube clusters.
   715  	GCPKubeClusterNameOverrideLabel = cloudKubeClusterNameOverrideLabel
   716  
   717  	// KubernetesClusterLabel indicates name of the kubernetes cluster for auto-discovered services inside kubernetes.
   718  	KubernetesClusterLabel = TeleportNamespace + "/kubernetes-cluster"
   719  
   720  	// DiscoveryTypeLabel specifies type of discovered service that should be created from Kubernetes service.
   721  	DiscoveryTypeLabel = TeleportNamespace + "/discovery-type"
   722  	// DiscoveryPortLabel specifies preferred port for a discovered app created from Kubernetes service.
   723  	DiscoveryPortLabel = TeleportNamespace + "/port"
   724  	// DiscoveryProtocolLabel specifies protocol for a discovered app created from Kubernetes service.
   725  	DiscoveryProtocolLabel = TeleportNamespace + "/protocol"
   726  	// DiscoveryAppRewriteLabel specifies rewrite rules for a discovered app created from Kubernetes service.
   727  	DiscoveryAppRewriteLabel = TeleportNamespace + "/app-rewrite"
   728  	// DiscoveryAppNameLabel specifies explicitly name of an app created from Kubernetes service.
   729  	DiscoveryAppNameLabel = TeleportNamespace + "/name"
   730  	// DiscoveryAppInsecureSkipVerify specifies the TLS verification enforcement for a discovered app created from Kubernetes service.
   731  	DiscoveryAppInsecureSkipVerify = TeleportNamespace + "/insecure-skip-verify"
   732  	// DiscoveryAppIgnore specifies if a Kubernetes service should be ignored by discovery service.
   733  	DiscoveryAppIgnore = TeleportNamespace + "/ignore"
   734  
   735  	// ReqAnnotationApproveSchedulesLabel is the request annotation key at which schedules are stored for access plugins.
   736  	ReqAnnotationApproveSchedulesLabel = "/schedules"
   737  	// ReqAnnotationNotifySchedulesLabel is the request annotation key at which notify schedules are stored for access plugins.
   738  	ReqAnnotationNotifySchedulesLabel = "/notify-services"
   739  
   740  	// CloudAWS identifies that a resource was discovered in AWS.
   741  	CloudAWS = "AWS"
   742  	// CloudAzure identifies that a resource was discovered in Azure.
   743  	CloudAzure = "Azure"
   744  	// CloudGCP identifies that a resource was discovered in GCP.
   745  	CloudGCP = "GCP"
   746  
   747  	// DiscoveredResourceNode identifies a discovered SSH node.
   748  	DiscoveredResourceNode = "node"
   749  	// DiscoveredResourceDatabase identifies a discovered database.
   750  	DiscoveredResourceDatabase = "db"
   751  	// DiscoveredResourceKubernetes identifies a discovered kubernetes cluster.
   752  	DiscoveredResourceKubernetes = "k8s"
   753  	// DiscoveredResourceAgentlessNode identifies a discovered agentless SSH node.
   754  	DiscoveredResourceAgentlessNode = "node.openssh"
   755  	// DiscoveredResourceEICENode identifies a discovered AWS EC2 Instance using the EICE access method.
   756  	DiscoveredResourceEICENode = "node.openssh-eice"
   757  	// DiscoveredResourceApp identifies a discovered Kubernetes App.
   758  	DiscoveredResourceApp = "app"
   759  
   760  	// TeleportAzureMSIEndpoint is a special URL intercepted by TSH local proxy, serving Azure credentials.
   761  	TeleportAzureMSIEndpoint = "azure-msi." + TeleportNamespace
   762  
   763  	// ConnectMyComputerNodeOwnerLabel is a label used to control access to the node managed by
   764  	// Teleport Connect as part of Connect My Computer. See [teleterm.connectmycomputer.RoleSetup].
   765  	ConnectMyComputerNodeOwnerLabel = TeleportNamespace + "/connect-my-computer/owner"
   766  )
   767  
   768  var (
   769  	// AWSKubeClusterNameOverrideLabels are the label keys that Teleport
   770  	// supports to override the kubernetes cluster name of discovered AWS kube
   771  	// clusters.
   772  	// Originally Teleport supported just the namespaced label
   773  	// "teleport.dev/kubernetes-name", but this was an invalid label key in
   774  	// other clouds.
   775  	// For consistency and backwards compatibility, Teleport now supports both
   776  	// the generic cloud kube cluster name override label and the original
   777  	// namespaced label.
   778  	AWSKubeClusterNameOverrideLabels = []string{
   779  		cloudKubeClusterNameOverrideLabel,
   780  		// This is a legacy label that should continue to be supported, but
   781  		// don't reference it in documentation or error messages anymore.
   782  		// The generic label takes precedence.
   783  		TeleportNamespace + "/kubernetes-name",
   784  	}
   785  	// AWSDatabaseNameOverrideLabels are the label keys that Teleport
   786  	// supports to override the database name of discovered AWS databases.
   787  	// Originally Teleport supported just the namespaced label
   788  	// "teleport.dev/database_name", but this was an invalid label key in
   789  	// other clouds.
   790  	// For consistency and backwards compatibility, Teleport now supports both
   791  	// the generic cloud database name override label and the original
   792  	// namespaced label.
   793  	AWSDatabaseNameOverrideLabels = []string{
   794  		cloudDatabaseNameOverrideLabel,
   795  		// This is a legacy label that should continue to be supported, but
   796  		// don't reference it in documentation or error messages anymore.
   797  		// The generic label takes precedence.
   798  		TeleportNamespace + "/database_name",
   799  	}
   800  )
   801  
   802  // Labels added by the discovery service to discovered databases,
   803  // Kubernetes clusters, and Windows desktops.
   804  const (
   805  	// DiscoveryLabelRegion identifies a discovered cloud resource's region.
   806  	DiscoveryLabelRegion = "region"
   807  	// DiscoveryLabelAccountID is the label key containing AWS account ID.
   808  	DiscoveryLabelAccountID = "account-id"
   809  	// DiscoveryLabelEngine is the label key containing database engine name.
   810  	DiscoveryLabelEngine = "engine"
   811  	// DiscoveryLabelEngineVersion is the label key containing database engine version.
   812  	DiscoveryLabelEngineVersion = "engine-version"
   813  	// DiscoveryLabelEndpointType is the label key containing the endpoint type.
   814  	DiscoveryLabelEndpointType = "endpoint-type"
   815  	// DiscoveryLabelVPCID is the label key containing the VPC ID.
   816  	DiscoveryLabelVPCID = "vpc-id"
   817  	// DiscoveryLabelNamespace is the label key for namespace name.
   818  	DiscoveryLabelNamespace = "namespace"
   819  	// DiscoveryLabelWorkgroup is the label key for workgroup name.
   820  	DiscoveryLabelWorkgroup = "workgroup"
   821  	// DiscoveryLabelStatus is the label key containing the database status, e.g. "available"
   822  	DiscoveryLabelStatus = "status"
   823  	// DiscoveryLabelAWSArn is an internal label that contains AWS Arn of the resource.
   824  	DiscoveryLabelAWSArn = TeleportInternalLabelPrefix + "aws-arn"
   825  
   826  	// DiscoveryLabelAzureSubscriptionID is the label key for Azure subscription ID.
   827  	DiscoveryLabelAzureSubscriptionID = "subscription-id"
   828  	// DiscoveryLabelAzureResourceGroup is the label key for the Azure resource group name.
   829  	DiscoveryLabelAzureResourceGroup = "resource-group"
   830  	// DiscoveryLabelAzureReplicationRole is the replication role of an Azure DB Flexible server, e.g. "Source" or "Replica".
   831  	DiscoveryLabelAzureReplicationRole = "replication-role"
   832  	// DiscoveryLabelAzureSourceServer is the source server for replica Azure DB Flexible servers.
   833  	// This is the source (primary) database resource name.
   834  	DiscoveryLabelAzureSourceServer = "source-server"
   835  
   836  	// DiscoveryLabelGCPProjectID is the label key for GCP project ID.
   837  	DiscoveryLabelGCPProjectID = "project-id"
   838  	// DiscoveryLabelGCPLocation is the label key for GCP location.
   839  	DiscoveryLabelGCPLocation = "location"
   840  
   841  	// DiscoveryLabelWindowsDNSHostName is the DNS hostname of an LDAP object.
   842  	DiscoveryLabelWindowsDNSHostName = TeleportNamespace + "/dns_host_name"
   843  	// DiscoveryLabelWindowsComputerName is the name of an LDAP object.
   844  	DiscoveryLabelWindowsComputerName = TeleportNamespace + "/computer_name"
   845  	// DiscoveryLabelWindowsOS is the operating system of an LDAP object.
   846  	DiscoveryLabelWindowsOS = TeleportNamespace + "/os"
   847  	// DiscoveryLabelWindowsOSVersion operating system version of an LDAP object.
   848  	DiscoveryLabelWindowsOSVersion = TeleportNamespace + "/os_version"
   849  	// DiscoveryLabelWindowsOU is an LDAP objects's OU.
   850  	DiscoveryLabelWindowsOU = TeleportNamespace + "/ou"
   851  	// DiscoveryLabelWindowsIsDomainController is whether an LDAP object is a
   852  	// domain controller.
   853  	DiscoveryLabelWindowsIsDomainController = TeleportNamespace + "/is_domain_controller"
   854  	// DiscoveryLabelWindowsDomain is an Active Directory domain name.
   855  	DiscoveryLabelWindowsDomain = TeleportNamespace + "/windows_domain"
   856  	// DiscoveryLabelLDAPPrefix is the prefix used when applying any custom
   857  	// labels per the discovery LDAP attribute labels configuration.
   858  	DiscoveryLabelLDAPPrefix = "ldap/"
   859  )
   860  
   861  // BackSortedLabelPrefixes are label names that we want to always be at the end of
   862  // the sorted labels list to reduce visual clutter. This will generally be automatically
   863  // discovered cloud provider labels such as azure/aks-managed-createOperationID=123123123123
   864  // or internal labels
   865  var BackSortedLabelPrefixes = []string{CloudAWS, CloudAzure, CloudGCP, DiscoveryLabelLDAPPrefix, TeleportNamespace}
   866  
   867  const (
   868  	// TeleportInternalLabelPrefix is the prefix used by all Teleport internal labels. Those labels
   869  	// are automatically populated by Teleport and are expected to be used by Teleport internal
   870  	// components and not for RBAC.
   871  	//
   872  	// See also TeleportNamespace and TeleportHiddenLabelPrefix.
   873  	TeleportInternalLabelPrefix = "teleport.internal/"
   874  
   875  	// TeleportHiddenLabelPrefix is the prefix used by all user specified hidden labels.
   876  	//
   877  	// See also TeleportNamespace and TeleportInternalLabelPrefix.
   878  	TeleportHiddenLabelPrefix = "teleport.hidden/"
   879  
   880  	// TeleportDynamicLabelPrefix is the prefix used by labels that can change
   881  	// over time and should not be used as part of a role's deny rules.
   882  	TeleportDynamicLabelPrefix = "dynamic/"
   883  
   884  	// DiscoveredNameLabel is a resource metadata label name used to identify
   885  	// the discovered name of a resource, i.e. the name of a resource before a
   886  	// uniquely distinguishing suffix is added by the discovery service.
   887  	// See: RFD 129 - Avoid Discovery Resource Name Collisions.
   888  	DiscoveredNameLabel = TeleportInternalLabelPrefix + "discovered-name"
   889  
   890  	// BotLabel is a label used to identify a resource used by a certificate renewal bot.
   891  	BotLabel = TeleportInternalLabelPrefix + "bot"
   892  
   893  	// BotGenerationLabel is a label used to record the certificate generation counter.
   894  	BotGenerationLabel = TeleportInternalLabelPrefix + "bot-generation"
   895  
   896  	// InternalResourceIDLabel is a label used to store an ID to correlate between two resources
   897  	// A pratical example of this is to create a correlation between a Node Provision Token and
   898  	// the Node that used that token to join the cluster
   899  	InternalResourceIDLabel = TeleportInternalLabelPrefix + "resource-id"
   900  
   901  	// AlertOnLogin is an internal label that indicates an alert should be displayed to users on login
   902  	AlertOnLogin = TeleportInternalLabelPrefix + "alert-on-login"
   903  
   904  	// AlertPermitAll is an internal label that indicates that an alert is suitable for display
   905  	// to all users.
   906  	AlertPermitAll = TeleportInternalLabelPrefix + "alert-permit-all"
   907  
   908  	// AlertLink is an internal label that indicates that an alert is a link.
   909  	AlertLink = TeleportInternalLabelPrefix + "link"
   910  
   911  	// AlertVerbPermit is an internal label that permits a user to view the alert if they
   912  	// hold a specific resource permission verb (e.g. 'node:list'). Note that this label is
   913  	// a coarser control than it might initially appear and has the potential for accidental
   914  	// misuse. Because this permitting strategy doesn't take into account constraints such as
   915  	// label selectors or where clauses, it can't reliably protect information related to a
   916  	// specific resource. This label should be used only for permitting of alerts that are
   917  	// of concern to holders of a given <resource>:<verb> capability in the most general case.
   918  	AlertVerbPermit = TeleportInternalLabelPrefix + "alert-verb-permit"
   919  
   920  	// AlertSupersedes is an internal label used to indicate when one alert supersedes
   921  	// another. Teleport may choose to hide the superseded alert if the superseding alert
   922  	// is also visible to the user and of higher or equivalent severity. This intended as
   923  	// a mechanism for reducing noise/redundancy, and is not a form of access control. Use
   924  	// one of the "permit" labels if you need to restrict viewership of an alert.
   925  	AlertSupersedes = TeleportInternalLabelPrefix + "alert-supersedes"
   926  
   927  	// AlertLicenseExpired is an internal label that indicates that the license has expired.
   928  	AlertLicenseExpired = TeleportInternalLabelPrefix + "license-expired-warning"
   929  
   930  	// TeleportInternalDiscoveryGroupName is the label used to store the name of the discovery group
   931  	// that the discovered resource is owned by. It is used to differentiate resources
   932  	// that belong to different discovery services that operate on different sets of resources.
   933  	TeleportInternalDiscoveryGroupName = TeleportInternalLabelPrefix + "discovery-group-name"
   934  
   935  	// TeleportDowngradedLabel identifies resources that have been automatically
   936  	// downgraded before being returned to clients on older versions that do not
   937  	// support one or more features enabled in that resource.
   938  	TeleportDowngradedLabel = TeleportInternalLabelPrefix + "downgraded"
   939  
   940  	// TeleportInternalResourceType indicates the type of internal Teleport resource a resource is.
   941  	// Valid values are:
   942  	// - system: These resources will be automatically created and overwritten on startup. Users should
   943  	//           not change these resources.
   944  	// - preset: These resources will be created if they don't exist. Updates may be applied to them,
   945  	//           but user changes to these resources will be preserved.
   946  	TeleportInternalResourceType = TeleportInternalLabelPrefix + "resource-type"
   947  
   948  	// TeleportResourceRevision marks a teleport-managed resource with a reversion
   949  	// number to aid future migrations. Label value is expected to be a number.
   950  	TeleportResourceRevision = TeleportInternalLabelPrefix + "revision"
   951  
   952  	// SystemResource are resources that will be automatically created and overwritten on startup. Users
   953  	// should not change these resources.
   954  	SystemResource = "system"
   955  
   956  	// PresetResource are resources resources will be created if they don't exist. Updates may be applied
   957  	// to them, but user changes to these resources will be preserved.
   958  	PresetResource = "preset"
   959  
   960  	// ProxyGroupIDLabel is the internal-use label for proxy heartbeats that's
   961  	// used by reverse tunnel agents to keep track of multiple independent sets
   962  	// of proxies in proxy peering mode.
   963  	ProxyGroupIDLabel = TeleportInternalLabelPrefix + "proxygroup-id"
   964  
   965  	// ProxyGroupGenerationLabel is the internal-use label for proxy heartbeats
   966  	// that's used by reverse tunnel agents to know which proxies in each proxy
   967  	// group they should attempt to be connected to.
   968  	ProxyGroupGenerationLabel = TeleportInternalLabelPrefix + "proxygroup-gen"
   969  
   970  	// OktaAppNameLabel is the individual app name label.
   971  	OktaAppNameLabel = TeleportInternalLabelPrefix + "okta-app-name"
   972  
   973  	// OktaAppDescriptionLabel is the individual app description label.
   974  	OktaAppDescriptionLabel = TeleportInternalLabelPrefix + "okta-app-description"
   975  
   976  	// OktaGroupNameLabel is the individual group name label.
   977  	OktaGroupNameLabel = TeleportInternalLabelPrefix + "okta-group-name"
   978  
   979  	// OktaGroupDescriptionLabel is the individual group description label.
   980  	OktaGroupDescriptionLabel = TeleportInternalLabelPrefix + "okta-group-description"
   981  
   982  	// OktaRoleNameLabel is the human readable name for a role sourced from Okta.
   983  	OktaRoleNameLabel = TeleportInternalLabelPrefix + "okta-role-name"
   984  
   985  	// PluginGenerationLabel is the label for the current generation of the plugin.
   986  	PluginGenerationLabel = TeleportInternalLabelPrefix + "plugin-generation"
   987  )
   988  
   989  const (
   990  	// InstallMethodAWSOIDCDeployServiceEnvVar is the env var used to detect if the agent was installed
   991  	// using the DeployService action of the AWS OIDC integration.
   992  	InstallMethodAWSOIDCDeployServiceEnvVar = "TELEPORT_INSTALL_METHOD_AWSOIDC_DEPLOYSERVICE"
   993  
   994  	// AWSOIDCAgentLabel is a label that indicates that the service was deployed into ECS/Fargate using the AWS OIDC Integration.
   995  	AWSOIDCAgentLabel = TeleportNamespace + "/awsoidc-agent"
   996  )
   997  
   998  // CloudHostnameTag is the name of the tag in a cloud instance used to override a node's hostname.
   999  const CloudHostnameTag = "TeleportHostname"
  1000  
  1001  // InstanceMetadataType is the type of cloud instance metadata client.
  1002  type InstanceMetadataType string
  1003  
  1004  const (
  1005  	InstanceMetadataTypeDisabled InstanceMetadataType = "disabled"
  1006  	InstanceMetadataTypeEC2      InstanceMetadataType = "EC2"
  1007  	InstanceMetadataTypeAzure    InstanceMetadataType = "Azure"
  1008  )
  1009  
  1010  // OriginValues lists all possible origin values.
  1011  var OriginValues = common.OriginValues
  1012  
  1013  const (
  1014  	// RecordAtNode is the default. Sessions are recorded at Teleport nodes.
  1015  	RecordAtNode = "node"
  1016  
  1017  	// RecordAtProxy enables the recording proxy which intercepts and records
  1018  	// all sessions.
  1019  	RecordAtProxy = "proxy"
  1020  
  1021  	// RecordOff is used to disable session recording completely.
  1022  	RecordOff = "off"
  1023  
  1024  	// RecordAtNodeSync enables the nodes to stream sessions in sync mode
  1025  	// to the auth server
  1026  	RecordAtNodeSync = "node-sync"
  1027  
  1028  	// RecordAtProxySync enables the recording proxy which intercepts and records
  1029  	// all sessions, streams the records synchronously
  1030  	RecordAtProxySync = "proxy-sync"
  1031  )
  1032  
  1033  // SessionRecordingModes lists all possible session recording modes.
  1034  var SessionRecordingModes = []string{RecordAtNode, RecordAtProxy, RecordOff, RecordAtNodeSync, RecordAtProxySync}
  1035  
  1036  // TunnelType is the type of tunnel.
  1037  type TunnelType string
  1038  
  1039  const (
  1040  	// NodeTunnel is a tunnel where the node connects to the proxy (dial back).
  1041  	NodeTunnel TunnelType = "node"
  1042  
  1043  	// ProxyTunnel is a tunnel where a proxy connects to the proxy (trusted cluster).
  1044  	ProxyTunnel TunnelType = "proxy"
  1045  
  1046  	// AppTunnel is a tunnel where the application proxy dials back to the proxy.
  1047  	AppTunnel TunnelType = "app"
  1048  
  1049  	// KubeTunnel is a tunnel where the kubernetes service dials back to the proxy.
  1050  	KubeTunnel TunnelType = "kube"
  1051  
  1052  	// DatabaseTunnel is a tunnel where a database proxy dials back to the proxy.
  1053  	DatabaseTunnel TunnelType = "db"
  1054  
  1055  	// WindowsDesktopTunnel is a tunnel where the Windows desktop service dials back to the proxy.
  1056  	WindowsDesktopTunnel TunnelType = "windows_desktop"
  1057  
  1058  	// OktaTunnel is a tunnel where the Okta service dials back to the proxy.
  1059  	OktaTunnel TunnelType = "okta"
  1060  )
  1061  
  1062  type TunnelStrategyType string
  1063  
  1064  const (
  1065  	// AgentMesh requires agents to create a reverse tunnel to
  1066  	// every proxy server.
  1067  	AgentMesh TunnelStrategyType = "agent_mesh"
  1068  	// ProxyPeering requires agents to create a reverse tunnel to a configured
  1069  	// number of proxy servers and enables proxy to proxy communication.
  1070  	ProxyPeering TunnelStrategyType = "proxy_peering"
  1071  )
  1072  
  1073  const (
  1074  	// ResourceMetadataName refers to a resource metadata field named "name".
  1075  	ResourceMetadataName = "name"
  1076  
  1077  	// ResourceSpecDescription refers to a resource spec field named "description".
  1078  	ResourceSpecDescription = "description"
  1079  
  1080  	// ResourceSpecHostname refers to a resource spec field named "hostname".
  1081  	ResourceSpecHostname = "hostname"
  1082  
  1083  	// ResourceSpecAddr refers to a resource spec field named "address".
  1084  	ResourceSpecAddr = "address"
  1085  
  1086  	// ResourceSpecPublicAddr refers to a resource field named "address".
  1087  	ResourceSpecPublicAddr = "publicAddress"
  1088  
  1089  	// ResourceSpecType refers to a resource field named "type".
  1090  	ResourceSpecType = "type"
  1091  
  1092  	// ResourceKind refers to a resource field named "kind".
  1093  	ResourceKind = "kind"
  1094  )
  1095  
  1096  // RequestableResourceKinds lists all Teleport resource kinds users can request access to.
  1097  var RequestableResourceKinds = []string{
  1098  	KindNode,
  1099  	KindKubernetesCluster,
  1100  	KindDatabase,
  1101  	KindApp,
  1102  	KindWindowsDesktop,
  1103  	KindUserGroup,
  1104  	KindKubePod,
  1105  	KindKubeSecret,
  1106  	KindKubeConfigmap,
  1107  	KindKubeNamespace,
  1108  	KindKubeService,
  1109  	KindKubeServiceAccount,
  1110  	KindKubeNode,
  1111  	KindKubePersistentVolume,
  1112  	KindKubePersistentVolumeClaim,
  1113  	KindKubeDeployment,
  1114  	KindKubeReplicaSet,
  1115  	KindKubeStatefulset,
  1116  	KindKubeDaemonSet,
  1117  	KindKubeClusterRole,
  1118  	KindKubeRole,
  1119  	KindKubeClusterRoleBinding,
  1120  	KindKubeRoleBinding,
  1121  	KindKubeCronjob,
  1122  	KindKubeJob,
  1123  	KindKubeCertificateSigningRequest,
  1124  	KindKubeIngress,
  1125  }
  1126  
  1127  // KubernetesResourcesKinds lists the supported Kubernetes resource kinds.
  1128  var KubernetesResourcesKinds = []string{
  1129  	KindKubePod,
  1130  	KindKubeSecret,
  1131  	KindKubeConfigmap,
  1132  	KindKubeNamespace,
  1133  	KindKubeService,
  1134  	KindKubeServiceAccount,
  1135  	KindKubeNode,
  1136  	KindKubePersistentVolume,
  1137  	KindKubePersistentVolumeClaim,
  1138  	KindKubeDeployment,
  1139  	KindKubeReplicaSet,
  1140  	KindKubeStatefulset,
  1141  	KindKubeDaemonSet,
  1142  	KindKubeClusterRole,
  1143  	KindKubeRole,
  1144  	KindKubeClusterRoleBinding,
  1145  	KindKubeRoleBinding,
  1146  	KindKubeCronjob,
  1147  	KindKubeJob,
  1148  	KindKubeCertificateSigningRequest,
  1149  	KindKubeIngress,
  1150  }
  1151  
  1152  const (
  1153  	// KubeVerbGet is the Kubernetes verb for "get".
  1154  	KubeVerbGet = "get"
  1155  	// KubeVerbCreate is the Kubernetes verb for "create".
  1156  	KubeVerbCreate = "create"
  1157  	// KubeVerbUpdate is the Kubernetes verb for "update".
  1158  	KubeVerbUpdate = "update"
  1159  	// KubeVerbPatch is the Kubernetes verb for "patch".
  1160  	KubeVerbPatch = "patch"
  1161  	// KubeVerbDelete is the Kubernetes verb for "delete".
  1162  	KubeVerbDelete = "delete"
  1163  	// KubeVerbList is the Kubernetes verb for "list".
  1164  	KubeVerbList = "list"
  1165  	// KubeVerbWatch is the Kubernetes verb for "watch".
  1166  	KubeVerbWatch = "watch"
  1167  	// KubeVerbDeleteCollection is the Kubernetes verb for "deletecollection".
  1168  	KubeVerbDeleteCollection = "deletecollection"
  1169  	// KubeVerbExec is the Kubernetes verb for "pod/exec".
  1170  	KubeVerbExec = "exec"
  1171  	// KubeVerbPortForward is the Kubernetes verb for "pod/portforward".
  1172  	KubeVerbPortForward = "portforward"
  1173  )
  1174  
  1175  // KubernetesVerbs lists the supported Kubernetes verbs.
  1176  var KubernetesVerbs = []string{
  1177  	Wildcard,
  1178  	KubeVerbGet,
  1179  	KubeVerbCreate,
  1180  	KubeVerbUpdate,
  1181  	KubeVerbPatch,
  1182  	KubeVerbDelete,
  1183  	KubeVerbList,
  1184  	KubeVerbWatch,
  1185  	KubeVerbDeleteCollection,
  1186  	KubeVerbExec,
  1187  	KubeVerbPortForward,
  1188  }
  1189  
  1190  // KubernetesClusterWideResourceKinds is the list of supported Kubernetes cluster resource kinds
  1191  // that are not namespaced.
  1192  var KubernetesClusterWideResourceKinds = []string{
  1193  	KindKubeNamespace,
  1194  	KindKubeNode,
  1195  	KindKubePersistentVolume,
  1196  	KindKubeClusterRole,
  1197  	KindKubeClusterRoleBinding,
  1198  	KindKubeCertificateSigningRequest,
  1199  }
  1200  
  1201  const (
  1202  	// TeleportServiceGroup is a default group that users of the
  1203  	// teleport automated user provisioning system get added to so
  1204  	// already existing users are not deleted
  1205  	TeleportServiceGroup = "teleport-system"
  1206  )
  1207  
  1208  const (
  1209  	// JWTClaimsRewriteRolesAndTraits includes both roles and traits in the JWT token.
  1210  	JWTClaimsRewriteRolesAndTraits = "roles-and-traits"
  1211  	// JWTClaimsRewriteRoles includes only the roles in the JWT token.
  1212  	JWTClaimsRewriteRoles = "roles"
  1213  	// JWTClaimsRewriteTraits includes only the traits in the JWT token.
  1214  	JWTClaimsRewriteTraits = "traits"
  1215  	// JWTClaimsRewriteNone include neither traits nor roles in the JWT token.
  1216  	JWTClaimsRewriteNone = "none"
  1217  )
  1218  
  1219  const (
  1220  	// DefaultInstallerScriptName is the name of the by default populated, EC2
  1221  	// installer script
  1222  	DefaultInstallerScriptName = "default-installer"
  1223  
  1224  	// DefaultInstallerScriptNameAgentless is the name of the by default populated, EC2
  1225  	// installer script when agentless mode is enabled for a matcher
  1226  	DefaultInstallerScriptNameAgentless = "default-agentless-installer"
  1227  )
  1228  
  1229  const (
  1230  	// ApplicationProtocolHTTP is the HTTP (Web) apps protocol
  1231  	ApplicationProtocolHTTP = "HTTP"
  1232  	// ApplicationProtocolTCP is the TCP apps protocol.
  1233  	ApplicationProtocolTCP = "TCP"
  1234  )