Role Access Requests
Teleport's Just-in-time Access Requests allow users to request access to additional roles in order to elevate their privileges. Requests can be escalated via ChatOps or anywhere else via our flexible Authorization Workflow API.
Prerequisites
- Self-Hosted Enterprise
- Teleport Enterprise Cloud
-
A running Teleport Enterprise cluster. For details on how to set this up, see the Enterprise Getting Started guide.
-
The Enterprise
tctl
admin tool andtsh
client tool version >= 14.3.33. You can download these tools by visiting your Teleport account. You can verify the tools you have installed by running the following commands:$ tctl version
# Teleport Enterprise v14.3.33 go1.21
$ tsh version
# Teleport v14.3.33 go1.21
-
A Teleport Enterprise Cloud account. If you do not have one, visit the signup page to begin a free trial of Teleport Team and upgrade to Teleport Enterprise Cloud.
-
The
tctl
admin tool andtsh
client tool version >= 16.4.3. To download these tools, visit the Installation page.$ tctl version
# Teleport Enterprise v16.4.3 go1.21
$ tsh version
# Teleport v16.4.3 go1.21
- To check that you can connect to your Teleport cluster, sign in with
tsh login
, then verify that you can runtctl
commands using your current credentials.tctl
is supported on macOS and Linux machines. For example:If you can connect to the cluster and run the$ tsh login --proxy=teleport.example.com [email protected]
$ tctl status
# Cluster teleport.example.com
# Version 14.3.33
# CA pin sha256:abdc1245efgh5678abdc1245efgh5678abdc1245efgh5678abdc1245efgh5678tctl status
command, you can use your current credentials to run subsequenttctl
commands from your workstation. If you host your own Teleport cluster, you can also runtctl
commands on the computer that hosts the Teleport Auth Service for full permissions.
RBAC Setup
In this example, we will define three roles:
contractor
: users with this role can request elevated access to thedba
roledba
: this role grants access to databasesapprover
: users with this role can approve requests for access to thedba
role
Contractor Role
Users with this role can request access to the dba
role.
kind: role
version: v5
metadata:
name: contractor
spec:
allow:
request:
roles: ['dba']
DBA Role
This role grants access to databases.
kind: role
version: v5
metadata:
name: dba
spec:
allow:
db_labels:
'*': '*'
options:
# Only allows the contractor to use this role for 1 hour from time of request.
max_session_ttl: 1h
Approver Role
This role allows users to approve requests for the dba
role.
kind: role
version: v5
metadata:
name: approver
spec:
allow:
# `review_requests` permits the listed roles to be approved
review_requests:
roles:
- 'dba'
Roles containing a review_requests
rule can only be used in Teleport
Enterprise. In Teleport Community Edition, Access Requests must be approved by an admin
running tctl
on the Auth Server.
Requesting Access
While Teleport Enterprise supports the same CLI-based workflows for requesting access to roles, most users will prefer to request access via the web UI.
To request access to one or more roles, navigate to the access requests page. You can find this page by selecting Resources on the side bar, expanding the Access Requests menu, and selecting New Request.
From here, the dropdown will allow you to request access to roles or to specific resources. Select roles in this dropdown and you will be presented with a list of roles you are permitted to request access to.
Click ADD TO REQUEST to include a role in the pending request.
Note: Access Requests must either contain roles or a set of specific resources. You can not mix the two. For more information on how to request access to specific resources, see the Resource Access Requests Guide.
When all desired roles have been added, click PROCEED TO REQUEST, where you can review and submit the request.
Reviewing Access Requests via the Web UI
Reviewers can see a list of open requests by navigating to Management > Access Requests > Review Requests in the web UI.
Granting access to a role with the ability to edit other roles could allow a user to permanently upgrade their privileges. When reviewing requests, it's important to carefully consider the role(s) being requested and what permissions will be applied to the user if the request is approved.
Reviewing Access Requests via tsh
Teleport Enterprise users with appropriate permissions can also approve requests
with the tsh
command line:
$ tsh request review --approve <request-id>
Using an approved access request
Once a request has been approved, the requestor can elevate their access for both command-line workflows and web UI workflows.
For command-line use, the requestor should log in using the approved request ID:
# log in with an approved access request
$ tsh login --request-id=bc8ca931-fec9-4b15-9a6f-20c13c5641a9
In the web UI, the requestor can open their request on the Review Requests page and click ASSUME ROLES to gain access to additional roles. Note: role-based access requests are additive. The user will have access to their standard role set in addition to the roles granted by the request.
A banner will appear at the top of the page while the approved access request is active. When elevated access is no longer necessary, click Switch Back to revert to the original set of roles.
Next Steps
Integrate with an external tool
With Teleport's Access Request plugins, users can manage Access Requests from within your organization's existing messaging and project management solutions.
Integration | Type | Setup Instructions |
---|---|---|
Slack | Messaging | Set up Slack |
Mattermost | Messaging | Set up Mattermost |
Microsoft Teams | Messaging | Set up Microsoft Teams |
Jira | Project Board | Set up Jira |
PagerDuty | Schedule | Set up PagerDuty |
Messaging | Set up email | |
Discord | Messaging | Set up Discord |
OpsGenie | Incident Management | Set up OpsGenie |
ServiceNow | Workflow | Set up ServiceNow |