Commit Graph
35 Commits
Author SHA1 Message Date
Noah Stride ee6e527eaf WMI: Allow max TTL for X509 and JWT SVIDs to be configured (#53787)
* Add maximum_ttl fields to the WorkloadIdentity resource

* Update issuer service to respect configurable max TTLs

* Add tests for TTL specification

* Add validation logic & tests

* Update terraform provider

* Fix tbot max ttl limitations

* Clarify name of `ignoreMaximumTTL`

* Introduce `defaultTTL` constant

* Fix generation of jwt

* Update operator resources
2025-04-09 17:28:51 +00:00
Noah Stride 47ec6d7222 Operator support for WorkloadIdentity resource (#53484)
* Generate CRDs

* Update snapshots

* Add apis impl for WorkloadIdentity

* Add WorkloadIdentityReconciler

* Add test for WorkloadIdentityReconciler

* Update RBAC

* Update to include version in kind

* Fix license header

* Fix handling of well-known Struct type

* Ignore revsiion
2025-04-09 14:18:31 +00:00
Noah Stride 63e269a756 Operator support for Bot resource (#53453)
* Add `Bot` manifests

* Update protos

* Add Bot API resource impl

* Add reconciler

* Fix bot CRD "versions" name

* Fix Unmarshal/Marshal panic for 153 resources

* Fix update test

* Mispell Marshalling

* Generate docs page

* Update role.yaml

* Add TeleportBot to resource list

* Update contributing

* Try to update the versions per RFD160

* Update k8s rbac for new resource name

* Use proto binary encoding for Marshal/Unmarshal

* Clear out unversioned crd

* More efficient deepcopyinto

* Fix license

* Add unmarshal options for protojson

* Update golden

* Fix RBAC
2025-04-01 15:31:48 +00:00
Gavin Frazar 8d38eac6ce [docs] Fix role reference request_access docs (#53471)
* Fix request_access godoc

* Update terraform docs

* Update operator CRD docs
2025-03-26 22:43:56 +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
Paul Gottschling 6c14c2b16e Replace (!toc!) syntax with DocCardList (#53331)
DocCardList is a Docusaurus-native component that achieves the same
goal as our custom `remark-toc` plugin, but with Docusaurus APIs instead
of file system lookups. Replace `(!toc!)` mentions so we can remove
`remark-toc`.
2025-03-24 12:53:16 +00:00
Andrew Burke a67d70b436 OCI join - add proto and client (#51444)
This change adds protos, the client, and a bunch of boilerplate
for the Oracle join method.
2025-01-29 20:11:16 +00:00
Bernard Kim 646329da7d operator: Support trusted_cluster resources (#49920)
* Add UpsertTrustedClusterV2 rpc

This supersedes UpsertTrustedCluster rpc. V2 performs resource name
validation.

* Replace confusing UpsertValidationTrustedCluster name

* Use UpsertTrustedClusterV2 in tests

* Address feedback

- Remove unnecessary ping
- Update error messages
- Use skipNameValidation consts
- Validate cluster name before establishing trust
- Do not reveal cluster name in error message
- Use BadParameter instead of CompareFailed

* Use webclient.Find

* Fix test/lint

* Allow label updates

* Fix test

* Update CRDs

1. Run `make manifests`.
2. Run `make -C crdgen update-protos`.
3. Run `make -C crdgen update-snapshot`.

* Implement trusted_cluster CRD

* Update docs

* Support secret lookup

* Update secret lookup docs

* Fix error handling

* Use V2

* Implement CreateTrustedClusterV2 and UpdateTrustedClusterV2

* Address feedback

* Minor fixes

* Use Create/Update instead of Upsert

* Update crdgen

* Update trusted_cluster tests

* Move V2 RPCs to the trust service

* crdgen

* Remove V2 suffix

* 2024 -> 2025

* Use slog
2025-01-13 17:21:09 +00:00
Paul Gottschling 9f2f4c458e Remove dots from operator reference filenames (#50734)
The dots cause issues with our hosting infrastructure, which returns
404s when users make requests for Kubernetes operator reference pages
with no trailing slash.

This change returns a filename from the format function in the CRD/CRD
docs generator so we can return different file names for CRDs and their
docs. It also renames CRD docs pages to include hyphens instead of dots
and underscores, and adds redirects.
2025-01-06 13:19:46 +00:00
Noah Stride 49c30832f7 Add workload_identity_labels to RoleCondition (#50071)
* Add WorkloadIdentityLabels field to role

* Wire up access checker

* Add validation for new field

* Update CRDs

* Add to terraform provider

* Mispel some words to keep the republic happy

* Add WorkloadIdentityLabelsExpression

* Update Terraform provider

* Add to operator CRD

* PLS RUN CLA CHECK
2024-12-12 11:46:19 +00:00
STeve (Xin) Huang 80a58fc82c GitHub proxy part 5: OAuth flow to retrieve GitHub identity (#49849)
* GitHub proxy part 5: OAuth flow to retrieve GitHub identity

* review comments round1

* review comments round 2 and update tsh git list

* make -C integrations/operator crd

* make -C integrations/terraform docs

* fix flaky test
2024-12-10 17:31:32 +00:00
STeve (Xin) Huang fae535b3df GitHub Proxy part 2: git_server resource, service, and RBAC (#49393)
* git_server resource and role.allow.github_permissions

* implicit RO on KindGitServer

* review comments

* fix ut

* make -C integrations/operator crd

* fix ut again

* make crds-up-to-date and make -C integrations/terraform docs
2024-11-27 16:12:30 +00:00
Erik Tate a8bff10c86 adding SSHPortForwarding config to RoleOptions (#49165) 2024-11-22 20:20:12 +00:00
Pawel Kopiczko 1a6f8d4c8a Add request.reason.mode to role conditions (proto only) (#49256)
This changes the proto type (+validation) only to declutter the original PR https://github.com/gravitational/teleport/pull/49124

The real changes are in

- api/proto/teleport/legacy/types/types.proto
- api/types/access_request.go
- lib/auth/auth_with_roles.go
- lib/auth/auth_with_roles_test.go

The rest is all generated.
2024-11-22 12:33:03 +00:00
Tim Buckleyandrosstimothy dee7a6f981 Machine ID: Add bitbucket join method for Bitbucket Pipelines joining (#48724)
* Add `bitbucket` join method for Bitbucket Pipelines joining

This adds a new `bitbucket` join method that Machine ID bots can use
to authenticate to Teleport from Bitbucket Pipelines CI runs.

* Add unit tests for bitbucket joining

This also fully adds `deployment_environment_uuid` which was found to
be missing.

* Fix imports

* Update tf docs

* Docs update

* Update generated TF resources

* Attempt to work around docs linter

* Add provision token tests

* Remove pipeline_uuid and step_uuid from protos

Also, fix deploment_environment_uuid field name.

* Remove references to removed fields in tests

* Switch to go-oidc/v3 and remove now-redundant nbf check

* Fix go.mod imports for the TF provider

* Fix event-handler go.mod

* Address review feedback; add 15s timeout to fetch provider metadata

* Update lib/bitbucket/token_validator.go

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Fix build after constant rename

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-11-21 23:05:58 +00:00
Noah Stride c72a4f2be6 Support for joining Actions in un-reachable GitHub Enterprise Servers via Static JWKS (#48973)
* Add JWKS based validator for github tokens

* Extend proto

* Update auth srvr github join impl to support static jwks

* Ignore govet

* initialize with jwks validator

* Update docs

* Update terraform shizz

* Regenerate various things
2024-11-15 12:32:55 +00:00
Lisa Kim a132be09d2 Add a new role.allow.request field called kubernetes_resources (#47173)
* Add a new role.allow.request field called kubernetes_resources

* Fix lint: update terraform docs
2024-11-01 03:47:00 +00:00
Maxim Dietz a0540c5afe feat: Update AccessList Proto with new fields, add utils (#47828)
- Add Hierarchy utils for nested AccessList validation and handling
- Update AccessList Protos with new fields
- Update AccessList and AccessListMember types and converters with new
  fields
2024-10-30 20:00:49 +00:00
Bartosz Leper ae2b549f99 Add Kubernetes access section to the role editor (#47674)
* Add Kubernetes access section to the role editor

* Review

* Update the k8s operator docs

This also removes the mention of valid values of the Kind field, as I don't
want the external documentation to point to Teleport source files.

* Update operator CRDs and Terraform resources
2024-10-24 14:52:27 +00:00
Trent Clarke 63ac9101bb Adds Identity Center account assignments to role conditions (#47793)
* Adds Identity Center account assignments to role conditions

* Update types.proto

* Review fixups

* Updates operator resources

* Add generated docs

* Terraform doc updates
2024-10-24 02:19:45 +00:00
Brian Joerger 94295c981c feat: SSO MFA - support for OIDC MaxAge (#47292)
* Add max age to oidc mfa settings.

* Validate oidc max age.

* Update error message.

* Upate terraform schema and docs and crds.
2024-10-16 20:19:18 +00:00
Erik Tate 750f8082dd adding note about terraform mappings for create_host_user_mode to host user creation guide (#47139) 2024-10-11 14:38:05 +00:00
Brian Joerger 66058cd083 feat: SSO MFA - add missing SAML MFA fields (#47291)
* Add missing SAML MFA settings.

* Validate saml mfa settings and set fields from entity_descriptor.

* Reuse entity descriptor from base connector when applicable.

* Upate terraform schema and docs and crds.
2024-10-10 22:11:48 +00:00
Erik Tate 432b6ae2ab Update protoc-gen-terraform to v3.0.0 (#47374)
* adding new Attribute param to custom type generator funcs and adjusting
configs to support using protoc-gen-terraform v3.0.0

* generating newly available docs for the terraform provider

* fixing new lint errors
2024-10-10 15:14:10 +00:00
Hugo Shaka adbd4fb7da Fix content generated from proto (#47360) 2024-10-08 20:00:31 +00:00
Alan Parra 052c634b90 chore: Bump gcloud modules (#46995)
* chore: Bump gcloud modules

* Update Terraform docs

* Update operator manifests
2024-09-30 22:06:14 +00:00
Alan Parra 553c17ac41 fix: Update operator CRD docs (#46973) 2024-09-30 16:58:41 +00:00
Dan JohnsandSteven Martin 82fb33db76 docs: Include version requirement for setting users default shell (#46933)
* Update host-user-creation.mdx

Suggesting adding a version to the default_shell in our docs. A prospect tripped over this running an older version, it's not clear when this new feature is supported.

* Update resources.teleport.dev_rolesv6.mdx

---------

Co-authored-by: Steven Martin <steven@goteleport.com>
2024-09-28 10:02:13 +00:00
2ba79b2dcd operator: support storing SSO connector client secret in a Kubernetes Secret (#46699)
* Allow operator secret lookup

* Document which fields can lookup secrets

* operator: support secret lookup

* fixup! operator: support secret lookup

* Apply suggestions from code review

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>

* lint

* add link to operator docs

* address feedback

* Revert "add link to operator docs"

This reverts commit cd812eb453.

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2024-09-20 21:44:22 +00:00
Paul Gottschling 154a6ab390 Fix operator docs reference generator bug (#46732)
In the reference page for one Kubernetes operator resource, some
Markdown links are malformed.

The issue is that some fields of custom resource definitions used by the
operator consist of arrays of anonymous objects with fields that are
also objects. When creating docs based on these fields, the operator
resource docs generator creates a malformed link reference.

This change modifies the generator to replace any spaces with hyphens
before outputting link references, causing the resulting internal links
to work correctly.

This change also does some light refactoring to remove an unnecessary
`switch` statement.
2024-09-19 14:45:06 +00:00
Erik Tate c592dbce0a adding configuration for setting default shell on host users (#46539) 2024-09-13 20:05:28 +00:00
Tim Buckley db689c76ef Terraform Cloud joining: Support Terraform Enterprise issuers (#46051)
This adds support for hostname/issuer overrides, needed to support
on-prem Terraform Enterprise installs. When the new `hostname` field
is unset, behavior is changed, but when set, the JWT is validated
against it instead of `app.terraform.io`.

Additionally, this renames `join_terraform.go` to
`join_terraformcloud.go`, since that was missed during the rename
in #45574.
2024-09-10 01:33:49 +00:00
Tim BuckleyandTiago Silva 03dba137cd Machine ID: Terraform Cloud joining (#45574)
* Machine ID: Terraform Cloud joining

This adds a new `terraform` join method, which uses Terraform Cloud's
Workload Identity OIDC provider to provide delegated joining support
for Machine ID bots. As the Terraform provider now embeds tbot, this
means - with some light modifications - that the Terraform provider
can now join using this join method, and without any secrets.

* Address some review feedback, add first batch of tests

This addresses a few feedback items, defaulting the audience to the
Teleport cluster name and requiring allow rules specify an
organization + at least one other parameter.

Also, adds a first batch of tests.

* Update autogenerated CRD docs

* Add tests for RegisterUsingToken and provisioning token init

* Fix imports

* Fix CRD docs

* Update tfschema

* Update tf docs

* Update docstring to make it clear that `Audience` is optional

* Update manifests

* Update CRD docs

* Code review feedback; docstring fixes

* Rename lib/terraform to lib/terraformcloud

* Rename terraform -> terraform_cloud

Renames the new join method to terraform_cloud to make it clear that
it won't work for TF running elsewhere (where other join methods
should be used)

* Fix tests and docs lints

* Update api/proto/teleport/legacy/types/types.proto

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Update proto artifacts

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2024-08-27 23:27:09 +00:00
Anton MiniailoandTiago Silva edcc6a410b Add MFAVerificationInterval option for roles (#45569)
* add min mfa ttl

* Fix missing import

* Take into account cluster wide's requirement of per session MFA.

* Add tests.

* Protobufs update.

* Rename minMFAVerificationInterval to MFAVerificationInterval

* Use google.protobuf.Duration instead of casttype Duration.

* Remove unnecessary types.NewDuration cast.

* Update docs for mfaVerificationInterval.

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2024-08-21 23:58:03 +00:00
Paul GottschlingandhugoShaka e272c842bd Auto-generate operator CRD docs (#44107)
* Auto-generate operator CRD docs

We already pull JSON schema data from Teleport protobuf message
definitions in order to generate CRD manifests. Extract a shared library
from code within the existing protoc plugin for generating CRDs. This
way, we can use the library to generate docs for our CRDs with a
separate plugin, and don't need to complicate the interface for using
the existing plugin.

- Organize `integrations/crdgen` into `lib` and `cmd` directories,
  turning `lib` into a package.
- Edit the `generateSchema` signature to include a function that formats
  a CRD into a document, injecting separate functions for formatting the
  CRD as YAML and as a docs page.
- Add Makefile targets for building the docs plugin and generating CRD
  docs.

To display the resulting reference pages in the docs, this change
configures `docs/config.json` to generate the Reference section of the
sidebar from the docs directory. This requires moving the Helm reference
includes directory into `docs/pages/includes`.

* Respond to hugoShaka feedback

- Do not display the `status` field.
- Indicate that enum fields can take an integer or a string. This is
  consistent with our comment conventions, which describe both the
  integer and the string values for each enum option.

* Sort CRD reference page sections

Also handle duplicate page sections by including the names of parent
properties within section headings.

* Fix crdgen Makefile targets

- bring test data and hack out of `lib/`
- fix broken debug builds
- add crd-docs checks to the `crds-up-to-date` target
- trigger proto lint on CRD and CRD doc changes
- removed stale gitkeep in `docs/pages/includes/crd-docs/.gitkeep`
- split crdgen formatting logic in another file for readability
- update license header years on new files

* fixup! Fix crdgen Makefile targets

* lint files due to false positive 'generated' comment

* fixup! lint files due to false positive 'generated' comment

* Incorporate rosstimothy feedback

Remove an unnecessary package.

Also regenerate the CRD docs.

* fix debug builds and gitignore

* fixup! fix debug builds and gitignore

* Respond to rosstimothy feedback

Fix integrations/operator/crdgen/Makefile

* Fix spelling

* Fix flaky propertyTable test

Compare the unsorted slice elements, since sorting takes place on the
containing VersionSection.

---------

Co-authored-by: hugoShaka <hugo.hervieux@goteleport.com>
2024-08-09 14:01:43 +00:00