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.49k stars 1.75k forks source link

Teleport 15 Web Test Plan #36664

Closed r0mant closed 8 months ago

r0mant commented 9 months ago

Web UI

Main

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

Top Nav

Side Nav

Unified Resources

Kubes

Desktops

Audit log

Users

Auth Connectors

For help with setting up auth connectors, check out the [Quick GitHub/SAML/OIDC Setup Tips]

Managed Clusters

Help & Support

Access Requests

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

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

Node List Tab

Session Tab

Session Player

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

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

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

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

ravicious commented 9 months ago

Canceling MFA prompt isn't propagated correctly in Firefox when updating a role.

This might have been introduced with Brian's changes to administrative actions MFA. I suspect it's a trivial JS issue.

ravicious commented 9 months ago
kimlisa commented 9 months ago

https://github.com/gravitational/teleport/issues/36841 https://github.com/gravitational/teleport/issues/36835 (this was present in the last version, it's trivial i think)

ravicious commented 9 months ago

Connect My Computer: Agent cleanup daemon exits immediately after launch

gzdunek commented 9 months ago

After changing success: string to success: { main: string, hover: string, active: string } in the theme, many places were not adjusted to use success.main color. Instead they are white. For example:

image
avatus commented 9 months ago

After changing success: string to success: { main: string, hover: string, active: string } in the theme, many places were not adjusted to use success.main color.

https://github.com/gravitational/teleport/pull/36875

kimlisa commented 9 months ago

can we continue testing with second_factor: on with a hardware key? i'm finding a few re-authentication errors and i'm collecting it here: https://github.com/gravitational/teleport/issues/36900

i think i've been testing with a hardware key so there's already a wide coverage

ravicious commented 9 months ago

Connect: Tab with cluster resources opened in v14 crashes after upgrade to v15

rosstimothy commented 9 months ago

https://github.com/gravitational/teleport/issues/37014

bl-nero commented 9 months ago

Graphical glitches when connecting through Web to a Windows desktop: https://github.com/gravitational/teleport/issues/37032

bl-nero commented 9 months ago

Account Settings offers to add an MFA device or a passkey when it should not be available #37033

ibeckermayer commented 9 months ago
kimlisa commented 9 months ago

@ravicious @gzdunek have you guys tested access request with MFA enabled in teleterm? the admin action requirement is failing (this is on master though), i'd imagine any CRUD operation in the teleterm needs to be tested with a second factor (i didn't see other CRUD stuff on teleterm so it mgiht be just access request actions)

image
gzdunek commented 9 months ago

@kimlisa I can't reproduce it. Are you on 15.0.0-alpha.5?

image
kimlisa commented 9 months ago

@kimlisa I can't reproduce it. Are you on 15.0.0-alpha.5?

@gzdunek i was on master, but i think what it was, is that my second factor was optional, and i didn't have a second factor added... we probably need better error message agh

this is web UI:

image
gzdunek commented 9 months ago

we probably need better error message agh

Yeah, it is a known problem with generic 'access denied' errors in Connect https://github.com/gravitational/teleport/issues/32550.

rudream commented 9 months ago

Two similar bugs where re-authentication with a hardware MFA device doesn't work:

ravicious commented 8 months ago

Re-authenticating using a hardware device doesn't work for updating users

Could someone try to reproduce this just to make sure my setup isn't broken in some way?