Commit Graph
14 Commits
Author SHA1 Message Date
Brian Joerger 5bc9e5482b Remove remaining uses of github.com/coreos/go-oidc/v3 with github.com/zitadel/oidc/v3 (#54939)
* Use zitadel library for oidce token validation logic.

* Add generic ValidateToken - only functional change is that the 15s provider timeout is used for all providers.

* Use oidc.ValidateToken for azure.

* Use zitadel to check discovery for tctl sso configure.

* Update .golangci.yml.

* go mod tidy.

* Address linter/go.mod comments.

* Add GetSubject.

* Fix tests.

* Re-embed jwt.Claims for Azure; Fix tests.

* Use oidc.TokenClaims as a superset of jwt.Claims for azure claims.

* Address comments.
2025-05-23 18:42:29 +00:00
rosstimothy 52816e8427 Bump golangci-lint to v2 (#54410)
* Bump golangci-lint to v2

* fix lints

* update e

* fix: delete removed cli option
2025-05-07 22:14:51 +00:00
rosstimothy 44dccd9c35 Replace graviational/go-oidc with zitadel/oidc (#54148)
OSS supporting changes for the OIDC library conversion.
2025-05-06 14:23:04 +00:00
Noah Stride 85d0e422ca Allow env var used for gitlab joining to be overridden (#54104)
* Extend gitlab.IDTokenSource to support accepting an env var override:wq

* Pipe thru gitlab env var config

* Update test/goldenfile

* Update terrraform provider to route new variable thur

* Fix spelling of overriden

* Update env var docs

* Rename field name to explicitly mention "token"
2025-04-22 12:43:33 +00:00
Noah Stride 7cbb46d2ed Support configuring StaticJWKS for the GitLab join method (#53386)
* Update protobuf

* Implement and test ValidateTokenWithJWKS

* Update join logic to use new method for static jwks

* Update Terraform Provider

* Update operator docs/files

* Update goldenfile
2025-03-25 18:03:09 +00:00
Noah StrideandMarco Dinis 0586278cde Migrate GetClusterName to gRPC (#53164)
* Adjust GetClusterName method signature to include context.Context

* Start hacking on gRPC GetClusterName impl

* Fix test mocks to match signature

* Fix integration tests

* Fix integrations tests

* Missing ctx

* New GetClusterName RPC implementatin

* Add fallback cluster name

* Correct godoc comment

* Remove unused method

* Remove unused import

* Fix E2E test

* Fix tests

* Fix deferred context cancel in test conflicting with parallel subtests

* Fix import

* Fix imports

* Update lib/auth/auth_with_roles.go

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>

---------

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>
2025-03-20 10:07:02 +00:00
Noah Stride 84e9f20804 Encode Join Attributes in Bot Certificates (#49426)
* Persist Join Attributes in X509 Cert

* Use proto names when encoding

* Fix kube tests

* Fix other kube tests

* Fix interface nilness issue

* Add some tests to the TLSCA package and issuer

* Add more E2E style test that covers join attributes and workload id

* Explain test better

* Add JoinAttrs test for bots

* Remove methods no longer necesarry

* Fix imports

* Fix deprecation version

* Add comment explaining why we return even on failure

* Add GoDoc

* Fix logger

* Use auth server logger

* Remove unneccessary import
2025-01-08 09:59:15 +00:00
Nic Klaassen 0a0d4137db eliminate rsa.GenerateKey and lib/auth/native (#47768) 2024-10-21 20:55:22 +00:00
Mike Jensen b92b1a5a0c Update direct go-jose usage to v3 (#36435)
This updates all direct usage of go-jose to v3.  V2 has been deprecated and is no longer supported.
2024-01-09 01:16:08 +00:00
fheinecke b178b8b732 Updated Teleport codebase to AGPL3 license (#35259)
Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>
2023-12-01 17:48:14 +00:00
Noah StrideandMarco André Dinis f2f864f9c0 Machine ID: More rules to gitlab joining and add globby matching to some fields (#34290)
* Add fields for to-be-supported token claims

* Modify validation to include new field

* Add comparisons for new fields to joining logic

* Add support for globby matching for sub, ref, namespace_path and project_path

* Document which fields support globby matching

* Add tests for join rule engine changes

* Regenerate operator CRDs

* Add docs for new fields

* Correct punctuation in error message

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>

* Correctly use GoDoc-esque comments

* Address docs comments

* Reuse glob matching code

* Correct type of RunnerID field

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
2023-11-09 16:52:04 +00:00
Andrew Burke e17e2df710 This change adds validation for ID tokens generated for GCP VMs. (#24492) 2023-05-03 19:06:54 +00:00
5902a9684c GitLab Delegated Joining docs (#23047)
* Skeleton out docs for GitLab joining

* Adjust description of guide

* Add more GitLab docs

* Explain the possible constraints

* Add final example of GitLab CI

* Correct token name

* Further clarify a few parts of the documentation

* Correct example of project_path constraint

* Add more specific link to GitLab docs

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Update docs/pages/machine-id/guides/github-actions.mdx

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* add new guide to navbar

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* Update docs/pages/machine-id/guides/github-actions.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* More concise/precise language in bot creation

* Add further explanation of fields

* Update docs/pages/machine-id/guides/gitlab.mdx

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* Add reference page for gitlab joining

* Fix link

* line break adjustments

* note bot role is built in

* Minor spag correction

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
2023-04-03 11:00:44 +00:00
Noah Stride acb255cd88 GitLab Delegated Joining (#22705)
* Add type for GitLab ProvisionToken

* Add default behaviour for domain

* Add IDTokenClaims for GitLab

* Add gitlab token source and token validator

* Thread GitLab support through auth and tbot packages

* Adjust cluster name fetching in token validator

* Initialize GitLab token validator in auth

* Improve comment on `sub`

* Working GitLab CI delegated joining

* Add additional token rule fields

* Add checking for new configuration fields

* add additional test cases for validation of gitlab config struct

* Add TestAuth_RegisterUsingToken_GitLab

* Add tests for IDTokenSource

* Fix imports

* Add tests for GitLab Token Validator

* Fix some comments that were incomplete

* Add license headers
2023-03-16 16:19:11 +00:00