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.58k stars 1.76k forks source link

Teleport 17 Web Test Plan #48004

Open r0mant opened 1 week ago

r0mant commented 1 week ago

Web UI

Main

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

As you go through testing, click on any links you come across to make sure they work (no 404) and are up to date.

Trusted Cluster (leafs)

The following features should allow users to view resources in trusted clusters. There should be a cluster dropdown for:

Top Bar Nav @bl-nero

User Settings Menu @bl-nero

Unified Resources @bl-nero

Active Sessions (@avatus )

Access Management Side Nav (@avatus )

Session Recordings (@avatus)

Audit log (@avatus)

Users (@avatus)

All actions should require re-authn with a webauthn device.

Invite, Reset, and Login Forms

For each, test the invite, reset, and login flows

Auth Connectors @bl-nero

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

All actions should require re-authn with a webauthn device.

Roles (@avatus)

All actions should require re-authn with a webauthn device.

Enroll New Integration (aka Plugins) (@kimlisa)

Enroll new resources using Discover Wizard (@kimlisa)

Use Discover Wizard to enroll new resources and access them:

Access Lists (@kiosion and nested lists)

Not available for OSS

Admin refers to users with access_list RBAC defined:

spec:
  allow:
    rules:
    - resources:
      - access_list
      verbs:
      - list
      - create
      - read
      - update
      - delete

Session & Identity Locks @bl-nero

spec:
  allow:
    rules:
    - resources:
      - lock
      verbs:
      - list
      - create
      - read
      - update
      - delete

Trusted Devices (@avatus)

Managed Clusters

Application Access

Required Applications (@avatus)

Create two apps running locally, a frontend app and a backend app. The frontend app should make an API request to the backend app at its teleport public_addr

You can use this example app if you don't have a frontend/backend setup ```go package main import ( "encoding/json" "fmt" "log" "net/http" ) // change to your cluster addr const clusterName = "avatus.sh" func main() { // handler for the html page. this is the "client". http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { html := fmt.Sprintf(html, clusterName) w.Header().Set("Content-Type", "text/html") w.Write([]byte(html)) }) // Handler for the API endpoint http.HandleFunc("/api/data", func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", fmt.Sprintf("https://client.%s", clusterName)) w.Header().Set("Access-Control-Allow-Credentials", "true") data := map[string]string{"hello": "world"} w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(data) }) log.Println("Server starting on http://localhost:8080") log.Fatal(http.ListenAndServe(":8080", nil)) } const html = ` API Data Fetcher
` ```

Update your app service to serve the apps like this (update your public addr to what makes sense for your cluster)

app_service:
  enabled: "yes"
  debug_app: true
  apps:
    - name: client
      uri: http://localhost:8080
      public_addr: client.avatus.sh
      required_apps:
      - api
    - name: api
      uri: http://localhost:8080
      public_addr: api.avatus.sh
      cors:
        allowed_origins:
          - https://client.avatus.sh

Launch your cluster and make sure you are logged out of your api by going to https://api.avatus.sh/teleport-logout

Access Requests (@kiosion)

Not available for OSS

Access Request Notification Routing Rule (cloud only)

Creating Access Requests (Role Based) (@rudream)

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

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

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)

Assuming Approved Requests (Both)

Access Request Waiting Room @kiosion

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:

Web Terminal (aka console) (@avatus)

Terminal Node List Tab

Terminal Session Tab

Cloud @bl-nero

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

$ kubectl -n <namespace> edit tenant

Dashboard Tenants (self-hosted license)

Recovery Code Management

Invite/Reset

Recovery Flow: Add new mfa device

Recovery Flow: Change password

Recovery Email

RBAC @bl-nero

Note: this entire section was updated to reflect changes in https://github.com/gravitational/teleport/pull/48610 — @bl-nero

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 list access to session recordings:

    - resources:
      - session
      verbs:
      - list

Change the session permissions to enable read access to recorded sessions:

    - resources:
      - session
      verbs:
      - list
      - 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

Teleport Connect

bl-nero commented 1 week ago

The test plan contains two tests that can't be verified: "Verify adding very first device or passkey works without requiring re-authentication" and "Verify second_factor set to off disables adding devices". That's because we no longer allow second factor to be optional, which, as a consequence, means that the only case where we add a first device or passkey is during onboarding.

I'm therefore skipping these cases.

bl-nero commented 1 week ago

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

gzdunek commented 1 week ago

Linux binaries for Connect v17 are more than twice the size of 16.4.3. This is due to a bug in Electron 33.0.2. From what I see, the fix has been merged, we'll have to update once it's released.

kimlisa commented 1 week ago

i'll get to this later, i have another access request UI issue i will need to address together

this is from role request teleterm Image

access list frequency dropdown cut off: Image

fixes heres: https://github.com/gravitational/teleport/pull/48500 https://github.com/gravitational/teleport.e/pull/5354

bl-nero commented 1 week ago

Minor issue, not a blocker IMO: https://github.com/gravitational/teleport/issues/48201

ravicious commented 3 days ago

I'm skipping the tests of logging through OIDC SSO in Connect as I don't really have a cluster where I could test it. SAML and GitHub work correctly though.

rudream commented 3 days ago

Visual bug causing request checkout to clip over resources in unified resources: https://github.com/gravitational/teleport/issues/48468

Bug requiring refresh for updated "show requestable resources" filter to take effect on resources page: https://github.com/gravitational/teleport/issues/48469

marcoandredinis commented 2 days ago

SSH Server using Teleport Service Self-Hosted PostgreSQL and Mongo Self-Hosted kubernetes

Add new resource / (SSH Server|Self-hosted Database) fails to generate a valid node join script https://github.com/gravitational/teleport/issues/48508

kimlisa commented 1 day ago

fix attempt state for AddApp component for Add Application discover flow: https://github.com/gravitational/teleport/issues/48389

kimlisa commented 21 hours ago

fix regression, where badges on hover popover got disabled by pointer-events: none https://github.com/gravitational/teleport/pull/48640