gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.6k stars 1.76k forks source link

Teleport 13 Web Test Plan #24577

Closed r0mant closed 1 year ago

r0mant commented 1 year ago

Web UI

Main (@rudream)

For main, test with a role that has access to all resources.

Top Nav

Side Nav

Servers aka Nodes

following not applicable anymore

Applications

following not applicable anymore

Databases

following not applicable anymore

Audit log (@kimlisa)

Users

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 (@avatus)

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: test-role-based-requests
spec:
  allow:
    request:
      roles:
      - allow-roles-and-nodes
      - allow-users-with-short-ttl
      suggested_reviewers:
      - random-user-1
      - random-user-2
version: v5

Creating Access Requests (Search Based)

Create a role with access to searcheable resources (apps, db, kubes, nodes, desktops). The template searcheable-resources is below.

kind: role
metadata:
  name: searcheable-resources
spec:
  allow:
    app_labels:  # just example labels
      label1-key: label1-value
      env: [dev, staging]
    db_labels:
      '*': '*'   # asteriks gives user access to everything
    kubernetes_labels:
      '*': '*'
    node_labels:
      '*': '*'
    windows_desktop_labels:
      '*': '*'
version: v5

Create a user that has no access to resources, but allows you to search them:

kind: role
metadata:
  name: test-search-based-requests
spec:
  allow:
    request:
      search_as_roles:
      - searcheable resources
      suggested_reviewers:
      - random-user-1
      - random-user-2
version: v5

Viewing & Approving/Denying Requests

Create a user with the role reviewer that allows you to review all requests, and delete them.

kind: role
version: v3
metadata:
  name: reviewer
spec:
  allow:
    review_requests:
      roles: ['*']

Assuming Approved Requests (Role Based)

Assuming Approved Requests (Search Based)

Access Request Waiting Room (@avatus)

Strategy Reason

Create the following role:

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

Strategy Always

With the previous role you created from Strategy Reason, change request_access to always:

Strategy Optional

With the previous role you created from Strategy Reason, change request_access to optional:

Terminal (@rudream)

Node List Tab

Session Tab

Session Player (@rudream)

Invite and Reset Form (@rudream)

Login Form and Change Password (@rudream)

Multi-factor Authentication (mfa) (@rudream)

Create/modify teleport.yaml and set the following authentication settings under auth_service

authentication:
  type: local
  second_factor: optional
  require_session_mfa: yes
  webauthn:
    rp_id: example.com

MFA invite, login, password reset, change password

MFA require auth (@avatus)

Go to Account Settings > Two-Factor Devices and register a new device

Using the same user as above:

MFA Management

Passwordless

Cloud (@rudream)

From your cloud staging account, change the field teleportVersion to the test version.

$ kubectl -n <namespace> edit tenant

Recovery Code Management

Invite/Reset

Recovery Flow: Add new mfa device

Recovery Flow: Change password

Recovery Email

RBAC (@kimlisa)

Create a role, with no allow.rules defined:

kind: role
metadata:
  name: rbac
spec:
  allow:
    app_labels:
      '*': '*'
    logins:
    - root
    node_labels:
      '*': '*'
  options:
    max_session_ttl: 8h0m0s
version: v3

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

Add the following to enable read access to recorded sessions

  - resources:
      - session
      verbs:
      - read

Add the following to enable read access to the roles

- resources:
      - role
      verbs:
      - list
      - read

Add the following to enable read access to the auth connectors

- resources:
      - auth_connector
      verbs:
      - list
      - read

Add the following to enable read access to users

  - resources:
      - user
      verbs:
      - list
      - read

Add the following to enable read access to trusted clusters

  - resources:
      - trusted_cluster
      verbs:
      - list
      - read

Locks (@avatus)

Checking that you can view, create, and delete locks.

Enroll new resources using Discover Wizard

Use Discover Wizard to enroll new resources and access them:

Teleport Connect

kimlisa commented 1 year ago

i don't think lock is part of teleport connect right? (double checking before i move, or someone can move it)

gzdunek commented 1 year ago

@kimlisa we don't have locks in Connect.

rudream commented 1 year ago

i don't think lock is part of teleport connect right? (double checking before i move, or someone can move it)

@kimlisa It looks like it was just added at the end of the document, which makes it appear like it's under Connect but it's just meant to be another section of the Web UI. I'll move it up in this issue and open a PR to move it up in webtestplan.md

tobiaszheller commented 1 year ago

issue: https://github.com/gravitational/teleport/issues/24885

ravicious commented 1 year ago

The Connect test plan is done. We found a couple of minor issues in Connect but nothing that would block the release, mostly just small UX issues or issues that are present in v12 too.

rudream commented 1 year ago

Some issues discovered relating to the Locks UI: https://github.com/gravitational/teleport/issues/25168

kimlisa commented 1 year ago

finished