Commit Graph
101 Commits
Author SHA1 Message Date
Zac Bergquist 8cd1c429f5 Fix up some poor wording (#40832)
Closes #40294
Closes #39172
2024-04-23 22:01:41 +00:00
Noah Stride 8f391fe781 Switch tbot to use slog.Logger from logrus (#40606)
* Switch `tbot` to use `slog.Logger` from logrus

* Pick up a few spots I forgot to convert

* Fix tctl logging

* Avoid using Context-less variants of logger

* Convert logpoints in tool/tbot to use context based loggers

* Fix use of multiline string

* Move tbot log initialization before first logging message

* Switch "err" to "error" in log attributes

* Use `NewPackageLogger`
2024-04-22 12:47:58 +00:00
Noah Stride c8f13946a8 Fix tpm joining protobuf oneof (#40514)
* Fix tpm joining protobuf oneof

* See if Buf will allow me to reuse the indexes outside of oneof

* Regen protos

* Tactical renaming

* Update CRDs
2024-04-12 19:16:44 +00:00
Noah Stride 0590d724c5 Add Protos for TPM Joining (#40307)
* Add protos for TPM joining

* Add `*proto.UnimplementedJoinServiceServer` to `JoinServiceGRPCServer`

* Update CRDs
2024-04-09 12:26:27 +00:00
Sakshyam Shah bdba1a65c2 remove saml_idp_service_provider_labels and saml_idp_service_provider_labels_expression (#40047)
* reserve 40, 41 tag numbers for RoleConditions

* remove GetSAMLIdPServiceProviderLabels and SetSAMLIdPServiceProviderLabels

* remove SAMLIdPServiceProviderLabels from label matchers and rolev6 test

* run make -C integrations/operator manifests
2024-03-29 20:22:48 +00:00
Hugo Shaka 81c512f711 Improve CRD display in kubectl (#39985)
* add support for additional CR columns

* re-render CRDs

* lint
2024-03-28 21:34:09 +00:00
Hugo ShakaandRoman Tkachenko 3afa6b5d1d Document creating SSH servers via IaC (#39726)
* document creating SSH servers via IAC

* add links and index page

* Apply suggestions from code review

Co-authored-by: Roman Tkachenko <roman@goteleport.com>

* address feedback + fix Var XML tags

* test tctl flow and fill tctl command outputs

* fix kubernetes and terraform documentation

* make docs linter happy

---------

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2024-03-28 21:28:02 +00:00
Hugo Shaka e77e5e080b Allow the operator chart to deploy CRDs separately (#39382) 2024-03-27 20:37:20 +00:00
Hugo Shaka 7ffd399a3c Document enum possible values in protobuf messages (#39542)
* Document enums for the generators

* regenerate protobuf and CRDs

* render CRDs
2024-03-21 19:02:19 +00:00
Trent Clarke bf92fc5f26 Removes AccessList Membership & Ownership fields from protobuf (#39481)
Following on from #39222; removes and reserves the obsolete AccessList
membership and ownership fields from the API protobuf messages.
2024-03-19 07:58:07 +00:00
Trent Clarke 1ba6e939df Removes the entire notion of a DynamicAccessList from Teleport (#39222)
* Removes the entire notion of a DynamicAccessList from Teleport

Insurmountable security issues were found with the notion of dynamic
AccessList ownership and membership, so the entire concept is being
removed.

This PR removes all internal usage of the Dynamic access list
concept. The corresponding protobuf updates are coming in a later
PR.

Changelog: Removed Dynamic AccessList

* Fix API tests

* More API test fixes

* Fix integrations tests
2024-03-14 07:51:11 +00:00
Hugo ShakaandNoah Stride 29e1e5bc14 Refactor operator to support several types of resources + propagate labels (#38992)
* Refactor operator resource reconciler to support resource153 + add label propagation

I initially just wanted to add label propagation (which is required for
OpenSSH and OpenSSHEICE servers).

However I ran into an issue: not all Teleport resources implement the
`ResourceWithLabels` interface.  Basically we have 4 cases:
- resources implementing `ResourceWithLabels` (e.g. User, Role, ...)
- resources implementing `ResourceWithOrigin` but not
  `ResourceWithLabels` (e.g. GitHub connector, ProvisionToken, ...)
- resources that have been tweaked to implement only the operator
  `TeleportResource` interface (`LoginRule`)
- resources implementing `Resource153`

To support all those resoucres, we can either:
- edit each resource so they expose the same methods (e.g.
  ProvisionToken exposes `GetLabels` instead of `GetStaticLabels`)
- wrap each ressource in a wrapper that implements the operator
  TeleportResource interface
- add multiple reconcilers, one for each resource kind

I don't think it's sane for the operator to force changes on Teleport
resources. Especially as those are known to be non consistent. I also
don't want the operator to maintain a copy of each resource, this is not
viable on the long term.

For those reasons I chose the 3rd approach and built 3 reconcilers. Then
I deducplicated the code to end up with a generic reconciler that can be
tuned by passing an adapter. The adapter is an empty struct that has all
the methods to extract the information the operator requires from the
resource.

The resulting PR is large and heavily uses generics but the amount of
logical changes is quite low (the only diff is that we now copy labels).
I can walk you through the PR if needed.

With this PR, the operator supports properly any resource implementing
`types.Resource153`, this will be useful to add `TeleportBotV1` support.

* Update integrations/operator/controllers/reconcilers/base.go

Co-authored-by: Noah Stride <noah.stride@goteleport.com>

* use structured logging

---------

Co-authored-by: Noah Stride <noah.stride@goteleport.com>
2024-03-07 21:17:13 +00:00
Sakshyam Shah bf50fba4a4 Add saml_idp_service_provider label and label expression to RoleConditions (#39039)
* SAMLIdPServiceProviderLabels and SAMLIdPServiceProviderLabelsExpression proto def

* GetSAMLIdPServiceProviderLabels and SetSAMLIdPServiceProviderLabels funcs

* add KindSAMLIdPServiceProvider to labellabel and Set/GetLabelMatchers

* add to SAMLIdPServiceProviderLabels  CheckAndSetDefaults, tests

* remove default SAMLIdPServiceProviderLabels wildcard value. Merge checkAndSetDefault test

* run make -C integrations/operator manifests

* rerun make -C integrations/operator manifests

* update e-ref to current master
2024-03-07 16:14:12 +00:00
Michael Wilson 0b526b50fe Ignore the status field in access list operator tests. (#38776)
The operator tests will now skip the access list status field.
2024-02-29 17:36:24 +00:00
Michael Wilson 12c3f50fc5 Introduce a member count method to access lists. (#38650)
The access list interface now supports counting members without unmarshaling.
This method has been added to the generic backend service as well. This will
allow for quicker counts when necessary. This method has been added to the
cache.

Additionally, a status field as per RFD-153 has been added to access lists
that will house the new optional member count field.
2024-02-28 20:02:52 +00:00
Hugo ShakaandMarco André Dinis 288f87af1b integrations/operator: Add openSSH and openSSHEICE servers (#37651)
* integrations/operator: Add openSSH and openSSHEICE servers

* lint

* Update integrations/operator/controllers/resources/openssheiceserverv2_controller.go

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

* rename Openssh to OpenSSH and fix comments

* hide cmdlabels

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
2024-02-20 23:07:26 +00:00
Noah StrideandMarco André Dinis 86c09b4959 Machine ID: Add Role/RBAC support for Workload Identity (#38174)
* Workload ID RBAC changes

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

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

* Validate IPSANs CIDRs are good

* Improve regex matching for SPIFFE conditions

* Remove unused globMatch function

* Prefer using utils.MatchString

* make grpc

* Update the charts

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
2024-02-15 16:38:13 +00:00
Krzysztof SkrzętnickiandSTeve Huang bc1ba9c23c Add DatabasePermissions field to role (#37797)
* Add DatabasePermissions field to role.

* Change error wording in a minor way

* Update api/types/role.go

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>

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

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>

* Update autogenerated files

* Guard against wildcards in `spec.allow.db_permissions`

---------

Co-authored-by: STeve (Xin) Huang <xin.huang@goteleport.com>
2024-02-07 20:03:11 +00:00
Hugo Shaka f95d1d9092 integrations/operator: Fix the operator deleting unowned resources (#37655)
* integrations/operator: Fix the operator deleting unowned resources

* Update integrations/operator/controllers/resources/teleport_reconciler.go

* add license
2024-02-03 02:09:51 +00:00
21209affb7 Document operator changes in v15 (#37294)
* Document operator changes in v15

* Apply suggestions from code review

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* address feedback

* make docs linter happy

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2024-01-26 20:09:20 +00:00
Hugo Shaka 3ffb95f984 fix operator role controller (#37275) 2024-01-25 19:42:25 +00:00
Hugo Shaka 9b45ebd1d4 Add role v6 and role v7 controllers (#36840)
* Add role v6 and role v7 controllers

* lint
2024-01-25 15:12:58 +00:00
Hugo Shaka fb97a39bde integrations/operator: add ignore and keep flags for CRs (#37182)
* integrations/operator: add ignore and keep flags for CRs

* lint + address feedback
2024-01-24 22:32:27 +00:00
Hugo Shaka 34403d2b10 Add TeleportRoleV6 and TeleportRoleV7 api types (#36834) 2024-01-24 18:35:12 +00:00
Mike Jensen 09a33d86d6 Remove account lockout from failed recovery attempts (#35325)
* Remove account lockout from failed recovery attempts

This account lockout looks to be unecessary and potentially problematic.  Recovery codes and recovery through MFA are not possible to brute force.

In addition the potential to lockout an account from being able to use a recovery method could result in them being unable to unlock their account from other potential abuse cases (for example an attacker locking the account from failed password attempts).

As discussed in the RFD (https://github.com/gravitational/teleport/pull/35533) this includes the removal of all the API used for this locking mechanism.

* accountrecovery: Update `WithLock` function names

* accountrecovery: Combine verifyRecoveryCode and verifyRecoveryCodeWithRecord into one function

* Further GRPC cleanup after PR feedback

* Apply PR Feedback
2024-01-24 18:17:52 +00:00
Hugo Shaka 3618fb9b36 integrations/operator: bring back TeleportRole support through the v6 API (#37166) 2024-01-24 15:32:18 +00:00
Hugo Shaka 7b02cada13 integrations/operator: support multiple versions of the same resource in crdgen (#36715)
The commit contains the following changes:

- add multi-version support by creating new kinds. This is currently done via an override to maintain compatibility. At some point, we might migrate unversioned kinds (TeleportRole) to versioned kinds (TeleportRoleV5) and remove the override
- unify all resource statuses in a single struct. This simplifies the CRD building because we are not trying to guess which package is correct anymore when parsing go's AST
- update crdgen snapshots

This PR does not update the base CRDs in the operator or the Hlem chart. This will happen in the next PR, adding go types and controller support.

Note for reviewers: the changeset might seem large, but the changes are split into commits that are much more reviewable. You only need to review the first two commits.
2024-01-24 01:33:29 +00:00
Hugo Shaka ac7dff07ff Move role controller to standard Teleport controller (#36836) 2024-01-22 19:45:43 +00:00
Hugo Shaka b16513bc67 operator: fix access lists step by step mutation tests (#36897) 2024-01-18 23:57:26 +00:00
Hugo ShakaandMarco André Dinis 70d58148eb Document always setting the resource version in Terraform (#36774)
* Document resource version in proto files

This will be useful when generating documentation from proto for the TF
provider. With this change, we will display which version value should
be set.

This change is required so we can make version mandatory in TF.

* docs: always set version when using the TF provider

* docs: re-generate the TF reference, with the version updates

* Apply suggestions from code review

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

* re-generate grpc client

* fix typos

* re-generate CRDs

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
2024-01-18 16:49:05 +00:00
Hugo Shaka 4dfc23442f integrations/operator: use unstructured objects for all controllers (#36142)
This commit prepares everything for us to switch to a single reconciler for all resources. Part of https://github.com/gravitational/teleport/issues/21416

This commit does the following changes:
- setup controllers for the unstructured objects instead of the structured ones (like `Role` was doing). This is due to the bad behaviour of `utils.Strings` of serializing as a single string if the list contains a single element.
- use a single scheme for everything instead of multiple ones. We suffered from drifts between main and tests in the past.
- fetch the GVK for the unstructure objects from the scheme. This operation can fail and now a bunch of builder/init functions can return errors
- Introduce a new `Reconciler` interface to hide the controller internals
- unify how controllers are started in main and tests. This is not directly related to the PR goal (preparing the ground for a unified controller) but I was drawn into this when I made the constructors return errors.
2024-01-17 15:43:26 +00:00
Hugo Shaka 6bdf0edc68 integrations/operator: bump controller-tools (#36748)
* bump controller-tools

* Re-generate api types and CRDs
2024-01-16 20:00:29 +00:00
dependabot[bot]andAlan Parra 5bde97c7e3 Bump the go group with 12 updates (#36713)
* Bump the go group with 12 updates

Bumps the go group with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/ClickHouse/ch-go](https://github.com/ClickHouse/ch-go) | `0.61.0` | `0.61.1` |
| [github.com/andybalholm/brotli](https://github.com/andybalholm/brotli) | `1.0.6` | `1.1.0` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.49.16` | `1.49.21` |
| [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) | `1.142.1` | `1.144.0` |
| [github.com/aws/aws-sdk-go-v2/service/ecs](https://github.com/aws/aws-sdk-go-v2) | `1.36.0` | `1.37.0` |
| [github.com/jackc/pgtype](https://github.com/jackc/pgtype) | `1.14.0` | `1.14.1` |
| [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) | `5.5.1` | `5.5.2` |
| [github.com/prometheus/common](https://github.com/prometheus/common) | `0.45.0` | `0.46.0` |
| [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) | `1.17.10` | `1.18.1` |
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client) | `0.155.0` | `0.156.0` |
| [k8s.io/klog/v2](https://github.com/kubernetes/klog) | `2.110.1` | `2.120.0` |
| [sigs.k8s.io/controller-tools](https://github.com/kubernetes-sigs/controller-tools) | `0.13.0` | `0.14.0` |


Updates `github.com/ClickHouse/ch-go` from 0.61.0 to 0.61.1
- [Release notes](https://github.com/ClickHouse/ch-go/releases)
- [Commits](https://github.com/ClickHouse/ch-go/compare/v0.61.0...v0.61.1)

Updates `github.com/andybalholm/brotli` from 1.0.6 to 1.1.0
- [Commits](https://github.com/andybalholm/brotli/compare/v1.0.6...v1.1.0)

Updates `github.com/aws/aws-sdk-go` from 1.49.16 to 1.49.21
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.49.16...v1.49.21)

Updates `github.com/aws/aws-sdk-go-v2/service/ec2` from 1.142.1 to 1.144.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/ec2/v1.142.1...service/ec2/v1.144.0)

Updates `github.com/aws/aws-sdk-go-v2/service/ecs` from 1.36.0 to 1.37.0
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.37.0/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.36.0...service/s3/v1.37.0)

Updates `github.com/jackc/pgtype` from 1.14.0 to 1.14.1
- [Changelog](https://github.com/jackc/pgtype/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgtype/compare/v1.14.0...v1.14.1)

Updates `github.com/jackc/pgx/v5` from 5.5.1 to 5.5.2
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.5.1...v5.5.2)

Updates `github.com/prometheus/common` from 0.45.0 to 0.46.0
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.45.0...v0.46.0)

Updates `github.com/sashabaranov/go-openai` from 1.17.10 to 1.18.1
- [Release notes](https://github.com/sashabaranov/go-openai/releases)
- [Commits](https://github.com/sashabaranov/go-openai/compare/v1.17.10...v1.18.1)

Updates `google.golang.org/api` from 0.155.0 to 0.156.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.155.0...v0.156.0)

Updates `k8s.io/klog/v2` from 2.110.1 to 2.120.0
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.110.1...v2.120.0)

Updates `sigs.k8s.io/controller-tools` from 0.13.0 to 0.14.0
- [Release notes](https://github.com/kubernetes-sigs/controller-tools/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-tools/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-tools/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: github.com/ClickHouse/ch-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/andybalholm/brotli
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ec2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/aws/aws-sdk-go-v2/service/ecs
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/jackc/pgtype
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: github.com/sashabaranov/go-openai
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
- dependency-name: sigs.k8s.io/controller-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run `make -C integrations/operator manifests`

* Run `make -C integrations/operator/crdgen/ update-snapshot`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-01-16 16:25:26 +00:00
Andrew Burke 840af310db Convert insecure-drop to drop for unsupported clients (#35803)
This change converts the insecure-drop host user creation mode
to drop for clients that don't support it.
2024-01-11 01:06:18 +00:00
Michael Wilson 5331c2e48b Add role grants for access list owners. (#35974)
* Add role grants for access list owners.

Access list owners can now have their own individual role grants.

* Update operator CRDs.

* Update access list reference with owner grants.

* gRPC update.

* Fix tests.
2024-01-09 20:39:15 +00:00
Hugo Shaka c9b1ab013a Use cmp and cmpots properly in operator tests (#36215)
This commit creates a standard set of compare options for all tests that
handles the common use cases:
- ignore ID, labels and other dynamic metadata
- apply sane time comparison by default
- equates nil maps and empty maps (caused by proto serialization)

This solves a couple of comparison issues I faced in another PR.
2024-01-03 14:59:35 +00:00
Hugo Shaka 000682aaac bump kube envtest version (#35948) 2023-12-21 00:07:59 +00:00
Zac Bergquist 44a6bb1933 Use pkg slices from the standard library (#35905)
Prefer the stdlib version of the experimental package.
Includes a depguard update to prevent future regressions,
as well as an e-ref update to appease depguard.

Generated with:

    $ gofmt -w -r '"golang.org/x/exp/slices" -> "slices"' . && \
        make fix-imports
2023-12-19 23:06:53 +00:00
d653229ab9 Add support for include_enterprise_slug for the github join method (#35860)
* Add support for `include_enterprise_slug` in `github` joining

* Correct assertiosn in github validator token test

* Remove `want` in TestIDTokenValidator_Validate

* Fix missing `should` in docs

Co-authored-by: Krzysztof Skrzętnicki <krzysztof.skrzetnicki@goteleport.com>

* Fix spelling of customize in docs

* Update operator CRDs

* Regen protos

* Apply suggestions from code review

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

* Try both under same header

* Try H4

* Remove spurious period

* Use bold rather than heading

---------

Co-authored-by: Krzysztof Skrzętnicki <krzysztof.skrzetnicki@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2023-12-19 13:55:23 +00:00
Hugo Shaka 619f900e1c integrations/operator: Add AccessList support (#31771)
* integrations/operator: add support for access lists

* fixup! integrations/operator: add support for access lists
2023-12-18 19:36:39 +00:00
Hugo Shaka 856bb39ea9 Add a version server in the proxy + use it in agent chart (#35150)
This PR adds an embedded [version server](https://goteleport.com/docs/architecture/agent-update-management/#version-server-and-source-of-truth) in the proxy to address: https://github.com/gravitational/cloud/issues/6773

The version server can be configured through `teleport.yaml`:

```yaml
proxy_service:
  enabled: "yes"
  automatic_upgrades_channels:
    stable/cloud:
      forward_url: https://updates.releases.teleport.dev/v1/stable/cloud
    preview/cloud:
      static_version: v12.5.4
```

The forwarded call results are cached for a minute.
2023-12-12 01:03:45 +00:00
Andrew Burke 56e6ace218 Remove drop host user creation mode (#35524)
This change removes the drop host user creation mode.
2023-12-11 19:07:29 +00:00
Andrew Burke 68ec7c41a0 Add insecure drop mode (#35175)
This change adds the insecure-drop mode for host user creation, which is the
same as drop but does not create a home directory.
2023-12-05 23:38:29 +00:00
rosstimothy 85c29d1cf4 Implement and use UpsertOIDCConnectorV2 (#35144)
While the api client already had support for the new upsert method
it was unimplemented server side and would always fallback to the
legacy UpsertOIDCConnector RPC. This implements the RPC handler
and updates the signature of UpsertOIDCConnector to return the
upserted connector in the same manner that Create and Update do.
2023-12-01 19:22:41 +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
rosstimothy 88bb9cfd96 Implement and use UpsertSAMLConnectorV2 (#35208)
While the api client already had support for the new upsert method
it was unimplemented server side and would always fallback to the
legacy UpsertSAMLConnector RPC. This implements the RPC handler
and updates the signature of UpsertSAMLConnector to return the
upserted connector in the same manner that Create and Update do.
2023-11-30 19:09:44 +00:00
rosstimothy b2bc325703 Implement and use UpsertGithubConnectorV2 (#35132)
While the api client already had support for the new upsert method
it was unimplemented server side and would always fallback to the
legeacy UpsertGithubConnector RPC. This implements the RPC handler
and updates the signature of UpsertGithubConnector to return the
upserted connector in the same manner that Create and Update do.
2023-11-30 15:01:40 +00:00
Cam Hutchison b7a951bea4 operator: Fix GHA Dockerfile with new/old paths (#35187)
Fix the operator `Dockerfile.gha` to copy the correct paths from the
context for the build. These paths changed pretty much at the same time
as `Dockerfile.gha` was added - just an overlap in development - in
commit f31a90d4a4, which modified the
original `Dockerfile` on which `Dockerfile.gha` is based.
2023-11-30 09:37:17 +00:00
Hugo ShakaandTiago Silva f31a90d4a4 integrations/operator: Standalone operator with reusable client (#34482)
* Standalone operator using tbot

* Update integrations/operator/embeddedtbot/bot.go

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

* make teleportClient private

* lint

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2023-11-23 17:23:18 +00:00
Cam Hutchison 18ddc39019 operator: Add Dockerfile for use with GitHub Actions (#34875)
Add a new `Dockerfile.gha` alongside the existing `Dockerfile` that can
build the operator container image without any build args. The build
args it had could be determined from inside the Dockerfile, so doing
this removes the need to pass them in. This in turn makes it simpler to
call from CI and to build locally.

In particular, `GOLANG_VERSION` and `PROTOC_VERSION` are taken from
`build.assets/versions.mk`, and `COMPILER_NAME` is determined from the
predefined `$TARGETARCH` arg.

Once Drone no longer builds the operator on any branch, this
`Dockerfile` will replace the previous one, with the `Makefile` updated
to remove the build args. It is done this way as previous changes to the
build of the operator were not backported to v12 and v13, complicating
backporting changes to existing files.
2023-11-23 00:46:17 +00:00