You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Access Request is a Enterprise feature and is not available for OSS.
Creating Access Requests (Role Based)
Create a role with limited permissions allow-roles-and-nodes. This role allows you to see the Role screen and ssh into all nodes.
kind: role
metadata:
name: allow-roles-and-nodes
spec:
allow:
logins:
- root
node_labels:
'*': '*'
rules:
- resources:
- role
verbs:
- list
- read
options:
max_session_ttl: 8h0m0s
version: v5
Create another role with limited permissions allow-users-with-short-ttl. This role session expires in 4 minutes, allows you to see Users screen, and denies access to all nodes.
kind: role
metadata:
name: allow-users-with-short-ttl
spec:
allow:
rules:
- resources:
- user
verbs:
- list
- read
deny:
node_labels:
'*': '*'
options:
max_session_ttl: 4m0s
version: v5
Create a user that has no access to anything but allows you to request roles:
kind: role
metadata:
name: waiting-room
spec:
allow:
request:
roles:
- <some other role to assign user after approval>
options:
max_session_ttl: 8h0m0s
request_access: reason
request_prompt: <some custom prompt to show in reason dialogue>
version: v3
Verify after login, reason dialogue is rendered with prompt set to request_prompt setting
Verify after clicking send request, pending dialogue renders
Verify after approving a request, dashboard is rendered
Verify the correct role was assigned
Strategy Always
With the previous role you created from Strategy Reason, change request_access to always:
Verify after login, pending dialogue is auto rendered
Verify after approving a request, dashboard is rendered
Verify after denying a request, access denied dialogue is rendered
Verify a switchback banner is rendered with roles assumed, and count down of when it expires
Verify switchback button says Logout and clicking goes back to the login screen
Strategy Optional
With the previous role you created from Strategy Reason, change request_access to optional:
Verify after login, dashboard is rendered as normal
Verify that a user has access only to: "Servers", "Applications", "Databases", "Kubernetes", "Active Sessions", "Access Requests" and "Manage Clusters"
Verify there is no Add Server, Application, Databases, Kubernetes button in each respective view
Verify only Servers, Apps, Databases, and Kubernetes are listed under options button in Manage Clusters
Note: User has read/create access_request access to their own requests, despite resource settings
Add the following under spec.allow.rules to enable read access to the audit log:
- resources:
- event
verbs:
- list
Verify that the Audit Log and Session Recordings is accessible
Verify that playing a recorded session is denied
Add the following to enable read access to recorded sessions
- resources:
- session
verbs:
- read
Verify that a user can re-play a session (session.end)
Add the following to enable read access to the roles
- resources:
- role
verbs:
- list
- read
Verify that a user can see the roles
Verify that a user cannot create/delete/update a role
Add the following to enable read access to the auth connectors
- resources:
- auth_connector
verbs:
- list
- read
Verify that a user can see the list of auth connectors.
Verify that a user cannot create/delete/update the connectors
Add the following to enable read access to users
- resources:
- user
verbs:
- list
- read
Verify that a user can access the "Users" screen
Verify that a user cannot reset password and create/delete/update a user
Add the following to enable read access to trusted clusters
- resources:
- trusted_cluster
verbs:
- list
- read
Verify that a user can access the "Trust" screen
Verify that a user cannot create/delete/update a trusted cluster.
For those you might want to use clusters that are deployed on the web, specified in parens.
Or set up the connectors on a local enterprise cluster following the guide from our wiki.
GitHub (asteroid)
local login on a GitHub-enabled cluster
SAML (platform cluster)
OIDC (e-demo)
Shell
Verify that the shell is pinned to the correct cluster (for root clusters and leaf clusters).
That is, opening new shell sessions in other workspaces or other clusters within the same
workspace should have no impact on the original shell session.
Verify that the local shell is opened with correct env vars.
TELEPORT_PROXY and TELEPORT_CLUSTER should pin the session to the correct cluster.
TELEPORT_HOME should point to ~/Library/Application Support/Teleport Connect/tsh.
PATH should include /Applications/Teleport Connect.app/Contents/Resources/bin.
Verify that the working directory in the tab title is updated when you change the directory
(only for local terminals).
Verify that terminal resize works for both local and remote shells.
Install midnight commander on the node you ssh into: $ sudo apt-get install mc
Run the program: $ mc
Resize Teleport Connect to see if the panels resize with it
Verify that the tab automatically closes on $ exit command.
Execute tsh ssh nonexistent-node in the command bar. Verify that you see a new tab with an
error from tsh ssh.
Kubernetes access
Open a new kubernetes tab, run echo $KUBECONFIG and check if it points to the file within Connect's app data directory.
Close the tab and open it again (to the same resource). Verify if the kubeconfig path didn't change.
Run kubectl get pods and see if the command succeeds.
Verify if the kubeconfig file is removed when the user:
Removes the connection
Logs out of the cluster
State restoration from disk
Verify that the app asks about restoring the previous tabs when launched and restores them
properly.
Verify that the app opens with the cluster that was active when you closed the app.
Verify that the app remembers size & position after restart.
Verify that reopening the app after removing ~/Library/Application Support/Teleport Connect/tsh
doesn't crash the app.
Verify that reopening the app after removing ~/Library/Application Support/Teleport Connect/app_state.json
but not the tsh dir doesn't crash the app.
Verify that logging out of a cluster and then logging in to the same cluster doesn't
remember previous tabs (they should be cleared on logout).
Open a db connection tab. Change the db name and port. Close the tab. Restart the app. Open
connection tracker and choose said db connection from it. Verify that the newly opened tab
uses the same db name and port.
Log in to a cluster. Close the DocumentCluster tab. Open a new DocumentCluster tab. Restart
the app. Verify that the app doesn't ask you about restoring the previous tabs.
Connections picker
Verify that the connections picker shows new connections when ssh & db tabs are opened.
Check if those connections are available after the app restart.
Check that those connections are removed after you log out of the root cluster that they
belong to.
Verify that reopening a db connection from the connections picker remembers last used port.
Cluster resources (servers/databases)
Verify that the app shows the same resources as the Web UI.
Verify that search is working for the resources lists.
Verify that pagination is working for the resources lists.
Verify that pagination works in tandem with search, that is verify that search results are
paginated too.
Verify that you can connect to these resources.
Verify that clicking "Connect" shows available logins and db usernames.
Logins and db usernames are taken from the role, under spec.allow.logins and spec.allow.db_users.
Repeat the above steps for resources in leaf clusters.
Verify that tabs have correct titles set.
Verify that the port number remains the same for a db connection between app restarts.
Create a db connection, close the app, run tsh proxy db with the same port, start the app.
Verify that the app doesn't crash and the db connection tab shows you the error (address in
use) and offers a way to retry creating the connection.
Shortcuts
Verify that switching between tabs works on Cmd+[1...9].
Verify that other shortcuts are shown after you close all tabs.
Verify that the other shortcuts work and each of them is shown on hover on relevant UI
elements.
Workspaces & cluster management
Verify that logging in to a new cluster adds it to the identity switcher and switches to the
workspace of that cluster automatically.
Verify that the state of the current workspace is preserved when you change the workspace (by
switching to another cluster) and return to the previous workspace.
Click "Add another cluster", provide an address to a cluster that was already added. Verify
that Connect simply changes the workspace to that of that cluster.
Click "Add another cluster", provide an address to a new cluster and submit the form. Close
the modal when asked for credentials. Verify that the cluster was still added and is visible
in the profile selector.
Command bar & autocomplete
Do the steps for the root cluster, then switch to a leaf cluster and repeat them.
Verify that the autocomplete for tsh ssh filters SSH logins and autocompletes them.
Verify that the autocomplete for tsh ssh filters SSH hosts by name and label and
autocompletes them.
Verify that launching an invalid tsh ssh command shows the error in a new tab.
Verify that launching a valid tsh ssh command opens a new tab with the session opened.
Verify that the autocomplete for tsh proxy db filters databases by name and label and
autocompletes them.
Verify that launching a tsh proxy db command opens a new local shell with the command
running.
Verify that the autocomplete for tsh ssh doesn't break when you cut/paste commands in
various points.
Verify that manually typing out what the autocomplete would suggest doesn't break the
command bar.
Verify that launching any other command that's not supported by the autocomplete opens a new
local shell with that command running.
Resilience when resources become unavailable
DocumentCluster
For each scenario, create at least one DocumentCluster tab for each available resource kind.
For each scenario, first do the action described in the bullet point, then click "Sync" on the
relevant cluster tab. Verify that no unrecoverable error was raised (that is, the app still
works). Then restart the app and verify that it was restarted gracefully (no unrecoverable
error on restart, the user can continue using the app).
Stop the root cluster.
Stop a leaf cluster.
Disconnect your device from the internet.
DocumentGateway
Create a db connection tab for a given database. Then remove access to that db for that user. Go back to Connect and change the database name and port. This should still work.
Open DocumentCluster and make sure a given db is visible on the list of available dbs. Click
"Connect" to show a list of db users. Now remove access to that db. Go back to Connect and
choose a username. Verify that a recoverable error is shown and the user can continue using
the app.
File transfer
Download
Verify if Connect asks for a path when downloading the file.
Verify that invalid paths and network errors are handled.
Verify if cancelling the download works.
Upload
Verify if uploading single/multiple files works.
Verify that invalid paths and network errors are handled.
Verify if cancelling the upload works.
Refreshing certs
To test scenarios from this section, create a user with a role that has TTL of 1m
(spec.options.max_session_ttl).
Log in, create a db connection and run the CLI command; wait for the cert to expire, click
"Sync" on the cluster tab.
Verify that after successfully logging in:
the cluster info is synced
the connection in the running CLI db client wasn't dropped; try executing select now();, the client should be able to automatically reinstantiate the connection.
the database proxy is able to handle new connections; click "Run" in the db tab and see
if it connects without problems. You might need to resync the cluster again in case they
managed to expire.
Verify that closing the login modal without logging in shows an error related to syncing
the cluster.
Log in; wait for the cert to expire, click "Connect" next to a db in the cluster tab.
Verify that clicking "Connect" and then navigating to a different tab before the request
completes doesn't show the login modal and instead immediately shows the error.
For this one, you might want to use a sever in our Cloud if the introduced latency is high
enough. Perhaps enabling throttling in dev tools can help too.
Log in; create two db connections, then remove access to one of the db servers for that
user; wait for the cert to expire, click "Sync", verify that the db tab with no access shows an
appropriate error and that the other db tab still handles old and new connections.
Access Requests
Creating Access Requests (Role Based)
To setup a test environment, follow the steps laid out in Created Access Requests (Role Based) from the Web UI testplan and then verify the tasks below.
Verify that under requestable roles, only allow-roles-and-nodes and allow-users-with-short-ttl are listed
Verify you can select/input/modify reviewers
Verify you can view the request you created from request list (should be in pending states)
Verify there is list of reviewers you selected (empty list if none selected AND suggested_reviewers wasn't defined)
Verify you can't review own requests
Creating Access Requests (Search Based)
To setup a test environment, follow the steps laid out in Created Access Requests (Search Based) from the Web UI testplan and then verify the tasks below.
Verify that a user can see resources based on the searcheable-resources rules
Verify you can select/input/modify reviewers
Verify you can view the request you created from request list (should be in pending states)
Verify there is list of reviewers you selected (empty list if none selected AND suggested_reviewers wasn't defined)
Verify you can't review own requests
Verify that you can't mix adding resources from different clusters (there should be a warning dialogue that clears the selected list)
Verify that you can't mix roles and resources into the same request.
Viewing & Approving/Denying Requests
To setup a test environment, follow the steps laid out in Viewing & Approving/Denying Requests from the Web UI testplan and then verify the tasks below.
Verify you can view access request from request list
Verify you can approve a request with message, and immediately see updated state with your review stamp (green checkmark) and message box
Verify you can deny a request, and immediately see updated state with your review stamp (red cross)
Verify deleting the denied request is removed from list
Assuming Approved Requests (Role Based)
Verify that assuming allow-roles-and-nodes allows you to see roles screen and ssh into nodes
After assuming allow-roles-and-nodes, verify that assuming allow-users-short-ttl allows you to see users screen, and denies access to nodes
Verify a switchback banner is rendered with roles assumed, and count down of when it expires
Verify switching back goes back to your default static role
Verify after re-assuming allow-users-short-ttl role, the user is automatically logged out after the expiry is met (4 minutes)
Assuming Approved Requests (Search Based)
Verify that assuming approved request, allows you to see the resources you've requested.
Assuming Approved Requests (Both)
Verify assume buttons are only present for approved request and for logged in user
Verify that after clicking on the assume button, it is disabled in both the list and in viewing
Verify that after re-login, requests that are not expired and are approved are assumable again
Verify that logs are collected for all processes (main, renderer, shared, tshd) under ~/Library/Application\ Support/Teleport\ Connect/logs.
Verify that the password from the login form is not saved in the renderer log.
Log in to a cluster, then log out and log in again as a different user. Verify that the app
works properly after that.
The text was updated successfully, but these errors were encountered:
Small request to the WebUI testing team: my PR refactoring FileTransfer is still in review, I would appreciate it if you would wait with testing SCP stuff until it is merged 🙂. There will be a refreshed layout and a shortened upload process (without Upload button).
WEB UI @kimlisa @hatched @ryanclark @rudream
Main (@hatched)
For main, test with a role that has access to all resources.
Top Nav
Side Nav
>
, and expand has iconv
Servers aka Nodes
Verify that clicking onAdd Server
button renders dialogue set toAutomatically
viewVerify clicking onRegenerate Script
regenerates token value in the bash commandVerify using the bash command successfully adds the server (refresh server list)Verify that clicking onManually
tab renders manual stepsVerify that clicking back toAutomatically
tab renders bash commandcrossed out no longer valid due to Discover UI changes
Applications
Verify that clicking onAdd Application
button renders dialogueVerify input validation (prevent empty value and invalid url)Verify after input and clicking onGenerate Script
, bash command is renderedVerify clicking onRegenerate
button regenerates token value in bash commandcrossed out no longer valid due to Discover UI changes
Databases
Verify that clicking onAdd Database
button renders dialogue for manual instructions:Verify selecting different options onStep 4
changesStep 5
commandscrossed out no longer valid due to Discover UI changes
Active Sessions
Verify that "OPTIONS" button allows to join a sessionAudit log
Session Ended
event icon, takes user to session playerdetails
buttonUsers
Auth Connectors
For help with setting up auth connectors, check out the [Quick GitHub/SAML/OIDC Setup Tips]
Roles
Managed Clusters
Help & Support
Access Requests (@rudream)
Access Request is a Enterprise feature and is not available for OSS.
Creating Access Requests (Role Based)
Create a role with limited permissions
allow-roles-and-nodes
. This role allows you to see the Role screen and ssh into all nodes.Create another role with limited permissions
allow-users-with-short-ttl
. This role session expires in 4 minutes, allows you to see Users screen, and denies access to all nodes.Create a user that has no access to anything but allows you to request roles:
allow-roles-and-nodes
andallow-users-with-short-ttl
are listedCreating Access Requests (Search Based)
Create a role with access to searcheable resources (apps, db, kubes, nodes, desktops). The template
searcheable-resources
is below.Create a user that has no access to resources, but allows you to search them:
searcheable-resources
rulesViewing & Approving/Denying Requests
Create a user with the role
reviewer
that allows you to review all requests, and delete them.Assuming Approved Requests (Role Based)
allow-roles-and-nodes
allows you to see roles screen and ssh into nodesallow-roles-and-nodes
, verify that assumingallow-users-short-ttl
allows you to see users screen, and denies access to nodesswitching back
goes back to your default static roleallow-users-short-ttl
role, the user is automatically logged out after the expiry is met (4 minutes)Assuming Approved Requests (Search Based)
Assuming Approved Requests (Both)
Access Request Waiting Room (@rudream)
Strategy Reason
Create the following role:
request_prompt
settingsend request
, pending dialogue rendersStrategy Always
With the previous role you created from
Strategy Reason
, changerequest_access
toalways
:Logout
and clicking goes back to the login screenStrategy Optional
With the previous role you created from
Strategy Reason
, changerequest_access
tooptional
:Terminal (@hatched)
Node List Tab
Session Tab
$ sudo apt-get install mc
$ mc
Session Player (@hatched)
Invite and Reset Form (@hatched)
Login Form and Change Password (@hatched)
Multi-factor Authentication (mfa) (@rudream)
Create/modify
teleport.yaml
and set the following authentication settings underauth_service
MFA invite, login, password reset, change password
second_factor
type toon
and verify that mfa is required (no optionnone
in dropdown)MFA require auth
Go to
Account Settings
>Two-Factor Devices
and register a new deviceUsing the same user as above:
MFA Management
second_factor
set tooff
disables adding devicesPasswordless
Cloud (@rudream)
From your cloud staging account, change the field
teleportVersion
to the test version.Recovery Code Management
Invite/Reset
Recovery Flow: Add new mfa device
Recovery Flow: Change password
Recovery Email
RBAC (@rudream)
Create a role, with no
allow.rules
defined:Add Server, Application, Databases, Kubernetes
button in each respective viewServers
,Apps
,Databases
, andKubernetes
are listed underoptions
button inManage Clusters
Note: User has read/create access_request access to their own requests, despite resource settings
Add the following under
spec.allow.rules
to enable read access to the audit log:Audit Log
andSession Recordings
is accessibleAdd the following to enable read access to recorded sessions
Add the following to enable read access to the roles
Add the following to enable read access to the auth connectors
Add the following to enable read access to users
Add the following to enable read access to trusted clusters
Teleport Connect (@gzdunek @ravicious @avatus)
Auth methods
(
auth_service.authentication
in the cluster config):type: local
,second_factor: "off"
type: local
,second_factor: "otp"
type: local
,second_factor: "webauthn"
,type: local
,second_factor: "webauthn"
, log in passwordlessly with hardware keytype: local
,second_factor: "webauthn"
, log in passwordlessly with touch IDtype: local
,second_factor: "optional"
, log in without MFAtype: local
,second_factor: "optional"
, log in with OTPtype: local
,second_factor: "optional"
, log in with hardware keytype: local
,second_factor: "on"
, log in with OTPtype: local
,second_factor: "on"
, log in with hardware keyOr set up the connectors on a local enterprise cluster following the guide from our wiki.
Shell
workspace should have no impact on the original shell session.
TELEPORT_PROXY
andTELEPORT_CLUSTER
should pin the session to the correct cluster.TELEPORT_HOME
should point to~/Library/Application Support/Teleport Connect/tsh
.PATH
should include/Applications/Teleport Connect.app/Contents/Resources/bin
.(only for local terminals).
$ sudo apt-get install mc
$ mc
$ exit
command.tsh ssh nonexistent-node
in the command bar. Verify that you see a new tab with anerror from tsh ssh.
Kubernetes access
echo $KUBECONFIG
and check if it points to the file within Connect's app data directory.kubectl get pods
and see if the command succeeds.State restoration from disk
properly.
works.
~/Library/Application Support/Teleport Connect/tsh
doesn't crash the app.
~/Library/Application Support/Teleport Connect/app_state.json
but not the
tsh
dir doesn't crash the app.remember previous tabs (they should be cleared on logout).
connection tracker and choose said db connection from it. Verify that the newly opened tab
uses the same db name and port.
the app. Verify that the app doesn't ask you about restoring the previous tabs.
Connections picker
belong to.
Cluster resources (servers/databases)
paginated too.
spec.allow.logins
andspec.allow.db_users
.tsh proxy db
with the same port, start the app.Verify that the app doesn't crash and the db connection tab shows you the error (address in
use) and offers a way to retry creating the connection.
Shortcuts
Cmd+[1...9]
.elements.
Workspaces & cluster management
workspace of that cluster automatically.
switching to another cluster) and return to the previous workspace.
that Connect simply changes the workspace to that of that cluster.
the modal when asked for credentials. Verify that the cluster was still added and is visible
in the profile selector.
Command bar & autocomplete
autocompletes them.
autocompletes them.
running.
various points.
command bar.
local shell with that command running.
Resilience when resources become unavailable
relevant cluster tab. Verify that no unrecoverable error was raised (that is, the app still
works). Then restart the app and verify that it was restarted gracefully (no unrecoverable
error on restart, the user can continue using the app).
"Connect" to show a list of db users. Now remove access to that db. Go back to Connect and
choose a username. Verify that a recoverable error is shown and the user can continue using
the app.
File transfer
Refreshing certs
1m
(
spec.options.max_session_ttl
)."Sync" on the cluster tab.
select now();
, the client should be able to automatically reinstantiate the connection.if it connects without problems. You might need to resync the cluster again in case they
managed to expire.
the cluster.
completes doesn't show the login modal and instead immediately shows the error.
enough. Perhaps enabling throttling in dev tools can help too.
user; wait for the cert to expire, click "Sync", verify that the db tab with no access shows an
appropriate error and that the other db tab still handles old and new connections.
Access Requests
Creating Access Requests (Role Based)
To setup a test environment, follow the steps laid out in
Created Access Requests (Role Based)
from the Web UI testplan and then verify the tasks below.allow-roles-and-nodes
andallow-users-with-short-ttl
are listedCreating Access Requests (Search Based)
To setup a test environment, follow the steps laid out in
Created Access Requests (Search Based)
from the Web UI testplan and then verify the tasks below.searcheable-resources
rulesViewing & Approving/Denying Requests
To setup a test environment, follow the steps laid out in
Viewing & Approving/Denying Requests
from the Web UI testplan and then verify the tasks below.Assuming Approved Requests (Role Based)
allow-roles-and-nodes
allows you to see roles screen and ssh into nodesallow-roles-and-nodes
, verify that assumingallow-users-short-ttl
allows you to see users screen, and denies access to nodesswitching back
goes back to your default static roleallow-users-short-ttl
role, the user is automatically logged out after the expiry is met (4 minutes)Assuming Approved Requests (Search Based)
Assuming Approved Requests (Both)
Verify that logs are collected for all processes (main, renderer, shared, tshd) under
~/Library/Application\ Support/Teleport\ Connect/logs
.Verify that the password from the login form is not saved in the renderer log.
Log in to a cluster, then log out and log in again as a different user. Verify that the app
works properly after that.
The text was updated successfully, but these errors were encountered: