Skip to content

Commit

Permalink
Merge branch 'master' into bernard/email-plugin-api
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardjkim committed Oct 30, 2024
2 parents 2b006eb + 17993cf commit cb72d6c
Show file tree
Hide file tree
Showing 117 changed files with 3,527 additions and 1,142 deletions.
75 changes: 49 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 @@ -1574,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 @@ -1590,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
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/webtestplan.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,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
25 changes: 22 additions & 3 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,28 @@ jobs:
repository: "gravitational/docs"
path: "docs"

- name: Prepare docs site configuration
# Cache node_modules. Unlike the example in the actions/cache repo, this
# caches the node_modules directory instead of the yarn cache. This is
# because yarn needs to build fresh packages even when it copies files
# from the yarn cache into node_modules.
# See:
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '${{ github.workspace }}/docs/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}/docs/yarn.lock', github.workspace)) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install docs site dependencies
working-directory: docs
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
# Prevent occasional `yarn install` executions that run indefinitely
timeout-minutes: 10
run: yarn install

- name: Prepare docs site configuration
# 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 Expand Up @@ -85,7 +104,6 @@ jobs:
git submodule add --force -b $BRANCH -- https://github.com/gravitational/teleport
cd $GITHUB_WORKSPACE/docs
echo "{\"versions\": [{\"name\": \"teleport\", \"branch\": \"$BRANCH\", \"deprecated\": false}]}" > $GITHUB_WORKSPACE/docs/config.json
yarn install
yarn build-node
- name: Check spelling
Expand All @@ -95,7 +113,8 @@ jobs:
run: cd $GITHUB_WORKSPACE/docs && yarn markdown-lint

- name: Test the docs build
run: cd $GITHUB_WORKSPACE/docs && yarn install && yarn build
working-directory: docs
run: yarn build

stylecheck:
name: Lint docs prose style
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
- 'docs/pages/admin-guides/**'
- 'docs/pages/enroll-resources/**'
- 'docs/pages/reference/operator-resources/**'
- 'docs/pages/reference/terraform-provider.mdx'
- 'docs/pages/reference/terraform-provider/**'
- 'examples/chart/teleport-cluster/charts/teleport-operator/operator-crds'
Expand Down
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -820,10 +820,6 @@ RERUN := $(TOOLINGDIR)/bin/rerun
$(RERUN): $(wildcard $(TOOLINGDIR)/cmd/rerun/*.go)
cd $(TOOLINGDIR) && go build -o "$@" ./cmd/rerun

RELEASE_NOTES_GEN := $(TOOLINGDIR)/bin/release-notes
$(RELEASE_NOTES_GEN): $(wildcard $(TOOLINGDIR)/cmd/release-notes/*.go)
cd $(TOOLINGDIR) && go build -o "$@" ./cmd/release-notes

.PHONY: tooling
tooling: ensure-gotestsum $(DIFF_TEST)

Expand Down Expand Up @@ -1822,11 +1818,13 @@ changelog:
# does not match version set it will fail to create a release. If tag doesn't exist it
# will also fail to create a release.
#
# For more information on release notes generation see ./build.assets/tooling/cmd/release-notes
# For more information on release notes generation see:
# https://github.com/gravitational/shared-workflows/tree/gus/release-notes/tools/release-notes#readme
RELEASE_NOTES_GEN = github.com/gravitational/shared-workflows/tools/release-notes@latest
.PHONY: create-github-release
create-github-release: LATEST = false
create-github-release: GITHUB_RELEASE_LABELS = ""
create-github-release: $(RELEASE_NOTES_GEN)
create-github-release:
@NOTES=$$($(RELEASE_NOTES_GEN) --labels=$(GITHUB_RELEASE_LABELS) $(VERSION) CHANGELOG.md) && gh release create v$(VERSION) \
-t "Teleport $(VERSION)" \
--latest=$(LATEST) \
Expand Down
8 changes: 8 additions & 0 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,9 @@ type Config struct {
// MFAPromptConstructor is used to create MFA prompts when needed.
// If nil, the client will not prompt for MFA.
MFAPromptConstructor mfa.PromptConstructor
// SSOMFACeremonyConstructor is used to handle SSO MFA when needed.
// If nil, the client will not prompt for MFA.
SSOMFACeremonyConstructor mfa.SSOMFACeremonyConstructor
}

// CheckAndSetDefaults checks and sets default config values.
Expand Down Expand Up @@ -730,6 +733,11 @@ func (c *Client) SetMFAPromptConstructor(pc mfa.PromptConstructor) {
c.c.MFAPromptConstructor = pc
}

// SetSSOMFACeremonyConstructor sets the SSO MFA ceremony constructor for this client.
func (c *Client) SetSSOMFACeremonyConstructor(scc mfa.SSOMFACeremonyConstructor) {
c.c.SSOMFACeremonyConstructor = scc
}

// Close closes the Client connection to the auth server.
func (c *Client) Close() error {
if c.setClosed() && c.conn != nil {
Expand Down
16 changes: 16 additions & 0 deletions api/client/dynamicwindows/dynamicwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,25 @@ func (c *Client) UpdateDynamicWindowsDesktop(ctx context.Context, desktop types.
}
}

func (c *Client) UpsertDynamicWindowsDesktop(ctx context.Context, desktop types.DynamicWindowsDesktop) (types.DynamicWindowsDesktop, error) {
switch desktop := desktop.(type) {
case *types.DynamicWindowsDesktopV1:
desktop, err := c.grpcClient.UpsertDynamicWindowsDesktop(ctx, &dynamicwindows.UpsertDynamicWindowsDesktopRequest{
Desktop: desktop,
})
return desktop, trace.Wrap(err)
default:
return nil, trace.BadParameter("unknown desktop type: %T", desktop)
}
}

func (c *Client) DeleteDynamicWindowsDesktop(ctx context.Context, name string) error {
_, err := c.grpcClient.DeleteDynamicWindowsDesktop(ctx, &dynamicwindows.DeleteDynamicWindowsDesktopRequest{
Name: name,
})
return trace.Wrap(err)
}

func (c *Client) DeleteAllDynamicWindowsDesktops(ctx context.Context) error {
return trace.NotImplemented("DeleteAllDynamicWindowsDesktops is not supported in the gRPC client")
}
1 change: 1 addition & 0 deletions api/client/mfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func (c *Client) PerformMFACeremony(ctx context.Context, challengeRequest *proto
mfaCeremony := &mfa.Ceremony{
CreateAuthenticateChallenge: c.CreateAuthenticateChallenge,
PromptConstructor: c.c.MFAPromptConstructor,
SSOMFACeremonyConstructor: c.c.SSOMFACeremonyConstructor,
}
return mfaCeremony.Run(ctx, challengeRequest, promptOpts...)
}
Loading

0 comments on commit cb72d6c

Please sign in to comment.