Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gravitational/teleport into mcbat…
Browse files Browse the repository at this point in the history
…tirola/cluster-management
  • Loading branch information
mcbattirola committed Oct 29, 2024
2 parents 71b105a + 2937956 commit 65637f9
Show file tree
Hide file tree
Showing 702 changed files with 29,557 additions and 10,979 deletions.
6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/test-plan-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ to determine the rollout date.
git submodule add https://github.com/gravitational/teleport content/<VERSION>.x
```

## Is the docs site up to date with the new release?
## Is the docs site content up to date with the new release?

- [ ] Verify that Teleport version variables are correct and reflect the upcoming
release. Check `docs/config.json` for this.

- [ ] Ensure that redirects (as configured in `docs/config.json`) only exist for
the default version of the docs site, and have been removed from other
versions.

- [ ] Remove version warnings in the docs that mention a version we no longer
support _except_ for the last EOL version. E.g., if we no longer support
version 10, remove messages saying "You need at least version n to use this
Expand Down
86 changes: 60 additions & 26 deletions .github/ISSUE_TEMPLATE/testplan.md
Original file line number Diff line number Diff line change
Expand Up @@ -979,10 +979,14 @@ manualy testing.
- [ ] Self-hosted MariaDB.
- [ ] Self-hosted MongoDB.
- [ ] Self-hosted CockroachDB.
- [ ] Self-hosted Redis.
- [ ] Self-hosted Redis/Valkey.
- [ ] Self-hosted Redis Cluster.
- [ ] Self-hosted MSSQL.
- [ ] Self-hosted MSSQL with PKINIT authentication.
- [ ] Self-hosted Elasticsearch.
- [ ] Self-hosted Cassandra/ScyllaDB.
- [ ] Self-hosted Oracle.
- [ ] Self-hosted ClickHouse.
- [ ] AWS Aurora Postgres.
- [ ] AWS Aurora MySQL.
- [ ] MySQL server version reported by Teleport is correct.
Expand All @@ -992,53 +996,57 @@ manualy testing.
- [ ] Verify connection to external AWS account works with `assume_role_arn: ""` and `external_id: "<id>"`
- [ ] AWS ElastiCache.
- [ ] AWS MemoryDB.
- [ ] AWS OpenSearch.
- [ ] AWS Dynamodb.
- [ ] Verify connection to external AWS account works with `assume_role_arn: ""` and `external_id: "<id>"`
- [ ] AWS DocumentDB
- [ ] AWS Keyspaces
- [ ] Verify connection to external AWS account works with `assume_role_arn: ""` and `external_id: "<id>"`
- [ ] GCP Cloud SQL Postgres.
- [ ] GCP Cloud SQL MySQL.
- [ ] GCP Cloud Spanner.
- [ ] Snowflake.
- [ ] Azure Cache for Redis.
- [x] Azure single-server MySQL and Postgres (EOL Sep 2024 and Mar 2025, skip)
- [ ] Azure flexible-server MySQL and Postgres
- [ ] Elasticsearch.
- [ ] OpenSearch.
- [ ] Cassandra/ScyllaDB.
- [ ] Verify connection to external AWS account works with `assume_role_arn: ""` and `external_id: "<id>"`
- [ ] Dynamodb.
- [ ] Verify connection to external AWS account works with `assume_role_arn: ""` and `external_id: "<id>"`
- [ ] Azure flexible-server MySQL
- [ ] Azure flexible-server Postgres
- [ ] Azure SQL Server.
- [ ] Oracle.
- [ ] ClickHouse.
- [ ] Snowflake.
- [ ] MongoDB Atlas.
- [ ] Connect to a database within a remote cluster via a trusted cluster.
- [ ] Self-hosted Postgres.
- [ ] Self-hosted MySQL.
- [ ] Self-hosted MariaDB.
- [ ] Self-hosted MongoDB.
- [ ] Self-hosted CockroachDB.
- [ ] Self-hosted Redis.
- [ ] Self-hosted Redis/Valkey.
- [ ] Self-hosted Redis Cluster.
- [ ] Self-hosted MSSQL.
- [ ] Self-hosted MSSQL with PKINIT authentication.
- [ ] Self-hosted Elasticsearch.
- [ ] Self-hosted Cassandra/ScyllaDB.
- [ ] Self-hosted Oracle.
- [ ] Self-hosted ClickHouse.
- [ ] AWS Aurora Postgres.
- [ ] AWS Aurora MySQL.
- [ ] AWS RDS Proxy (MySQL, Postgres, MariaDB, or SQL Server)
- [ ] AWS Redshift.
- [ ] AWS Redshift Serverless.
- [ ] AWS ElastiCache.
- [ ] AWS MemoryDB.
- [ ] AWS OpenSearch.
- [ ] AWS Dynamodb.
- [ ] AWS DocumentDB
- [ ] AWS Keyspaces
- [ ] GCP Cloud SQL Postgres.
- [ ] GCP Cloud SQL MySQL.
- [ ] GCP Cloud Spanner.
- [ ] Snowflake.
- [ ] Azure Cache for Redis.
- [x] Azure single-server MySQL and Postgres (EOL Sep 2024 and Mar 2025, skip)
- [ ] Azure flexible-server MySQL and Postgres
- [ ] Elasticsearch.
- [ ] OpenSearch.
- [ ] Cassandra/ScyllaDB.
- [ ] Dynamodb.
- [ ] Azure flexible-server MySQL
- [ ] Azure flexible-server Postgres
- [ ] Azure SQL Server.
- [ ] Oracle.
- [ ] ClickHouse.
- [ ] Snowflake.
- [ ] MongoDB Atlas.
- [ ] Verify auto user provisioning.
Verify all supported modes: `keep`, `best_effort_drop`
- [ ] Self-hosted Postgres.
Expand Down Expand Up @@ -1084,6 +1092,7 @@ manualy testing.
- [ ] Can detect and register ElastiCache Redis clusters.
- [ ] Can detect and register MemoryDB clusters.
- [ ] Can detect and register OpenSearch domains.
- [ ] Can detect and register DocumentDB clusters.
- [ ] Azure
- [ ] Can detect and register MySQL and Postgres single-server instances.
- [ ] Can detect and register MySQL and Postgres flexible-server instances.
Expand All @@ -1098,6 +1107,11 @@ manualy testing.
- [ ] Verify searching for all columns in the search bar works
- [ ] Verify you can sort by all columns except `labels`
- [ ] `tsh bench` load tests (instructions on Notion -> Database Access -> Load test)
- [ ] Verify database session player
- [ ] Web UI
- [ ] Postgres
- [ ] `tsh play`
- [ ] Postgres
## TLS Routing
Expand Down Expand Up @@ -1335,6 +1349,17 @@ manualy testing.
- [ ] Banner goes away if you reduce number of non-AD desktops to less or equal 5 (check occurs every 5 minutes so you may need to wait to confirm)
- [ ] Installer in GUI mode successfully uninstalls Authentication Package (logging in is not possible)
- [ ] Installer successfully uninstalls Authentication Package (logging in is not possible) when invoked from command line
- Dynamic registration
- [ ] Dynamic Windows desktop resources can be added, removed, and updated using `tctl`
- [ ] `tctl get dynamic_windows_desktop` works with all supported formats
- [ ] Adding dynamic Windows desktop that doesn't match labels for any Windows Desktop Service does not create any
Windows desktop
- [ ] Adding dynamic Windows desktop that matches some `windows_desktop_services`s creates Windows desktops for each
matching WDS
- [ ] Updating dynamic Windows desktop updates corresponding Windows desktops
- [ ] Updating dynamic Windows desktop's labels so it no longer matches `windows_desktop_services` deletes
corresponding Windows desktops
- [ ] Deleting dynamic Windows desktop deletes corresponding Windows desktops

## Binaries / OS compatibility

Expand Down Expand Up @@ -1563,13 +1588,21 @@ Docs: [IP Pinning](https://goteleport.com/docs/access-controls/guides/ip-pinning
- [ ] Verify that users can run custom audit queries.
- [ ] Verify that the Privileged Access Report is generated and periodically refreshed.

- [ ] Access List
- [ ] Access Lists
- [ ] Verify Access List membership/ownership/expiration date.
- [ ] Verify permissions granted by Access List membership.
- [ ] Verify permissions granted by Access List ownership.
- [ ] Verify Access List Review.
- [ ] verify Access LIst Promotion.
- [ ] Verify that owners can only add/remove members and not change other properties.
- [ ] Verify permissions granted by Access List membership.
- [ ] Verify permissions granted by Access List ownership.
- [ ] Verify Access List Review.
- [ ] verify Access LIst Promotion.
- [ ] Verify that owners can only add/remove members and not change other properties.
- [ ] Nested Access Lists
- [ ] Verify that Access Lists can be added as members or owners of other Access Lists.
- [ ] Verify that member grants from ancestor lists are inherited by members of nested Access Lists added as members.
- [ ] Verify that owner grants from ancestor lists are inherited by members of nested Access Lists added as owners.
- [ ] Verify that Access List Review and Promotion work with nested Access Lists.
- [ ] Verify that manually deleting a nested Access List used as a member or owner does not break UserLoginState generation or listing Access Lists.
- [ ] Verify that an Access List can be added as a member or owner of another Access List using `tctl`.
- [ ] Verify that Access Lists added as members or owners of other Access Lists using `tctl` are validated (no circular references, no nesting > 10 levels).

- [ ] Verify Okta Sync Service
- [ ] Verify Okta Plugin configuration.
Expand All @@ -1579,6 +1612,7 @@ Docs: [IP Pinning](https://goteleport.com/docs/access-controls/guides/ip-pinning
- [ ] Verify that users/apps/groups are synced from Okta to Teleport.
- [ ] Verify the custom `okta_import_rule` rule configuration.
- [ ] Verify that users/apps/groups are displayed in the Teleport Web UI.
- [ ] Verify that users/groups are flattened on import, and are not duplicated on sync when their membership is inherited via nested Access Lists.
- [ ] Verify that a user is locked/removed from Teleport when the user is Suspended/Deactivated in Okta.
- [ ] Verify access to Okta apps granted by access_list/access_request.

Expand Down
61 changes: 58 additions & 3 deletions .github/ISSUE_TEMPLATE/webtestplan.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,14 @@ All actions should require re-authn with a webauthn device.

Use Discover Wizard to enroll new resources and access them:

- [ ] SSH Server (teleport service, singular EC2, SSM agent)
- [ ] SSH Server using Teleport Service
- [ ] Self-Hosted PostgreSQL and Mongo
- [ ] AWS RDS (singular RDS, auto discover with ECS)
- [ ] Kubernetes
- [ ] AWS EKS cluster
- [ ] Using an AWS OIDC Integration
- [ ] EC2 Auto Enrollment (SSM)
- [ ] RDS flow: single database
- [ ] RDS flow: Auto Enrollment (by VPC)
- [ ] EKS Clusters
- [ ] Non-guided cards link out to correct docs

#### Access Lists
Expand Down Expand Up @@ -571,6 +574,45 @@ With the previous role you created from `Strategy Reason`, change `request_acces

- [ ] Verify after login, dashboard is rendered as normal

## Access Lists

Not available for OSS

- Creating new Access List:
- [ ] Verify that traits/roles are not be required in order to create
- [ ] Verify that one can be created with members and owners
- [ ] Verify the web cache is updated (new list should appear under "Access Lists" page without reloading)
- Deleting existing Access List:
- [ ] Verify the web cache is updated (deleted list should disappear from "Access Lists" page without reloading)
- [ ] Verify that an Access List used as a member or owner in other lists cannot be deleted (should show a warning)
- Reviewing Access List:
- [ ] Verify that after reviewing, the web cache is updated (list cards should show any member/role changes)
- Updating (renaming, removing members, adding members):
- [ ] Verify the web cache is updated (changes to name/members appear under "Access Lists" page without reloading)
- [ ] Verify Access List search is preserved between sub-route navigation (clicking into specific List and navigating back)
- Can manage members/owners for an existing Access List:
- [ ] Verify that existing Users:
- [ ] Can be enrolled as members and owners
- [ ] Enrolled as members or owners can be removed
- [ ] Verify that existing Access Lists:
- [ ] Can be enrolled as members and owners
- [ ] Enrolled as members or owners can be removed
- [ ] Verify that an Access List cannot be added as a member or owner:
- [ ] If it is already a member or owner
- [ ] If it would result in a circular reference (ACL A -> ACL B -> ACL A)
- [ ] If the depth of the inheritance would exceed 10 levels
- [ ] If it includes yourself (and you lack RBAC)
- [ ] Verify that non-existing Members and Owners can be enrolled in an existing List (e.g., SSO users)
- Inherited grants are properly calculated and displayed:
- [ ] Verify that members of a nested Access List:
- [ ] Added as a member to another Access List inherit its Member grants
- [ ] Added as an owner to another Access List inherit its Owner grants
- [ ] That do not meet Membership Requirements in a Nested List do not inherit any Grants from Parent Lists
- [ ] That do not meet the Parent List's Membership/Ownership Requirements do not inherit its Member/Owner Grants
- [ ] Verify that owners of Access Lists added as Members/Owners to other Access Lists do *not* inherit any Grants
- [ ] Verify that inherited grants are updated on reload or navigating away from / back to Access List View/Edit route
- [ ] Verify that 'View More' exists and can be clicked under the 'Inherited Member Grants' section if inherited grants overflows the container

## Web Terminal (aka console)

- [ ] Verify that top nav has a user menu (Main and Logout)
Expand Down Expand Up @@ -1063,6 +1105,19 @@ Add the following to enable read access to trusted clusters
- [ ] Re-execute `kubectl exec --stdin --tty shell-demo -- /bin/bash` mentioned above to
verify that Kube access is working with MFA.
- [ ] Verify that Connect prompts for MFA during Connect My Computer setup.
- Hardware key support
- You will need a YubiKey 4.3+ and Teleport Enterprise.
The easiest way to test it is to enable [cluster-wide hardware keys enforcement](https://goteleport.com/docs/admin-guides/access-controls/guides/hardware-key-support/#step-12-enforce-hardware-key-support)
(set `require_session_mfa: hardware_key_touch_and_pin` to get both touch and PIN prompts).
- [ ] Log in. Verify that you were asked for both PIN and touch.
- [ ] Connect to a database. Verify you were prompted for touch (a PIN prompt can appear too).
- [ ] Change the PIN (leave the PIV PIN field empty during login to access this flow).
- [ ] Close the app, disconnect the YubiKey, then reopen the app. Verify the app shows an error about the missing key.
- Verify that all items from this section work on:
- [ ] macOS
- [ ] Windows
- [ ] Linux

- Connect My Computer
- [ ] Verify the happy path from clean slate (no existing role) setup: set up the node and then
connect to it.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
path: "docs"

- name: Prepare docs site configuration
# Prevent occasional `yarn install` executions that run indefinitely
timeout-minutes: 10
# The environment we use for linting the docs differs from the one we
# use for the live docs site in that we only test a single version of
# the content.
Expand Down
33 changes: 32 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ linters-settings:
desc: 'use "golang.org/x/mod/semver" or "coreos/go-semver/semver" instead'
- pkg: github.com/microsoftgraph/msgraph-sdk-go
desc: 'use "github.com/gravitational/teleport/lib/msgraph" instead'
# Prevent logrus from being imported by api. Once everything in teleport has been converted
# Prevent logrus from being imported by api and e. Once everything in teleport has been converted
# to use log/slog this should be moved into the main block above.
logrus:
files:
- '**/api/**'
- '**/e/**'
deny:
- pkg: github.com/sirupsen/logrus
desc: 'use "log/slog" instead'
Expand Down Expand Up @@ -185,6 +186,36 @@ linters-settings:
desc: '"lib/system/signal" requires CGO'
- pkg: github.com/gravitational/teleport/lib/vnet/daemon
desc: '"vnet/daemon" requires CGO'
# Prevent importing go-cmp into production code. From the go-cmp docs:
# > It is intended to only be used in tests, as performance is not a goal
# > and it may panic if it cannot compare the values. Its propensity towards
# > panicking means that its unsuitable for production environments where a
# > spurious panic may be fatal.
go-cmp:
files:
# Tests can do anything
- '!$test'
# Various test helpers defined outside _test.go files are allowed
- '!**/integration/helpers/**'
- '!**/integrations/operator/controllers/resources/testlib/**'
- '!**/lib/auth/test/**'
- '!**/lib/services/suite/**'
# Non-compliant legacy code. These should be converted to compare by another mechanism
# and be removed from this list in the future. Use caution before adding any additional
# exclusions to this list.
- '!**/e/lib/accesslist/equal.go'
- '!**/e/lib/auth/saml.go'
- '!**lib/services/authority.go'
- '!**lib/services/compare.go'
- '!**/lib/services/local/access_list.go'
- '!**/lib/services/local/users.go'
- '!**/lib/services/server.go'
- '!**/lib/services/user.go'
deny:
- pkg: github.com/google/go-cmp/cmp
desc: '"github.com/google/go-cmp/cmp" should only be used in tests'
- pkg: github.com/google/go-cmp/cmp/cmpopts
desc: '"github.com/google/go-cmp/cmp/cmpopts" should only be used in tests'
errorlint:
comparison: true
asserts: true
Expand Down
Loading

0 comments on commit 65637f9

Please sign in to comment.