Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gravitational/teleport into rbac_…
Browse files Browse the repository at this point in the history
…intro
  • Loading branch information
mmcallister committed Nov 4, 2024
2 parents 6c868e5 + 5d7eb65 commit 6fce0bf
Show file tree
Hide file tree
Showing 495 changed files with 31,723 additions and 16,452 deletions.
77 changes: 50 additions & 27 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 @@ -1512,7 +1526,7 @@ Verify that SSH works, and that resumable SSH is not interrupted across a contro

## Azure Discovery

[Azure Discovery docs](https://goteleport.com/docs/server-access/guides/azure-discovery/)
[Azure Discovery docs](https://goteleport.com/docs/enroll-resources/auto-discovery/servers/azure-discovery/)
- Verify Azure VM discovery
- [ ] Only Azure VMs matching given Azure tags have the installer executed on them
- [ ] Only the IAM permissions mentioned in the discovery docs are required for operation
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
2 changes: 1 addition & 1 deletion .github/workflows/build-centos7-assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver: docker

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-ci-buildbox-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver: docker

Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver: docker

Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver: docker

Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver: docker

Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver: docker

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ci-service-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1

- name: Login to registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-usage-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run: |
echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: ${{ secrets.TELEPORT_USAGE_IAM_ROLE_ARN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ on:
permissions:
pull-requests: write

concurrency:
concurrency:
cancel-in-progress: true
# This value is arbitrary as long as it includes the pull request number
group: 'limit to running one instance at a time for the pull request ${{ github.event.pull_request.number }}'

jobs:
validate-changelog:
name: Validate the changelog entry
if: ${{ !github.event.pull_request.draft }}
if: ${{ !startsWith(github.head_ref, 'dependabot/') && !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
# Checkout main branch of shared-workflow repository.
Expand Down
27 changes: 23 additions & 4 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 All @@ -111,7 +130,7 @@ jobs:
repository: "gravitational/teleport"

- name: Run the linter
uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 # v2.1.0
uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
with:
version: 2.30.0
# Take the comma-separated list of files returned by the "Check for
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/kube-integration-tests-non-root.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
TEST_KUBE: true
KUBECONFIG: /home/.kube/config
ALPINE_VERSION: 3.20.3

jobs:
changes:
Expand Down Expand Up @@ -89,6 +90,38 @@ jobs:
cp -r $HOME/.kube /home/
chown -R ci:ci /home/.kube
- name: Build Alpine image with webserver
run: |
export SHORT_VERSION=${ALPINE_VERSION%.*}
# download the alpine image
# store the files in the fixtures/alpine directory
# to avoid passing all the repository files to the docker build context.
cd ./fixtures/alpine
# download alpine minirootfs and signature
curl -fSsLO https://dl-cdn.alpinelinux.org/alpine/v$SHORT_VERSION/releases/x86_64/alpine-minirootfs-$ALPINE_VERSION-x86_64.tar.gz
curl -fSsLO https://dl-cdn.alpinelinux.org/alpine/v$SHORT_VERSION/releases/x86_64/alpine-minirootfs-$ALPINE_VERSION-x86_64.tar.gz.asc
curl -fSsLO https://dl-cdn.alpinelinux.org/alpine/v$SHORT_VERSION/releases/x86_64/alpine-minirootfs-$ALPINE_VERSION-x86_64.tar.gz.sha256
# verify the checksum
sha256sum -c alpine-minirootfs-$ALPINE_VERSION-x86_64.tar.gz.sha256
# verify the signature
gpg --import ./alpine-ncopa.at.alpinelinux.org.asc
gpg --verify ./alpine-minirootfs-$ALPINE_VERSION-x86_64.tar.gz.asc ./alpine-minirootfs-$ALPINE_VERSION-x86_64.tar.gz
# build the webserver
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./webserver ./webserver.go
docker build -t alpine-webserver:v1 --build-arg=ALPINE_VERSION=$ALPINE_VERSION -f ./Dockerfile .
# load the image into the kind cluster
kind load docker-image alpine-webserver:v1
cd -
- name: Run tests
timeout-minutes: 40
run: |
Expand Down
Loading

0 comments on commit 6fce0bf

Please sign in to comment.