Commit Graph
492 Commits
Author SHA1 Message Date
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
Michael Wilson e732b8a755 Establish the Okta service role. (#23075)
This commit introduces the Okta service role, which will be necessary for
the Okta service to have appropriate access to the auth server endpoints.
2023-03-16 13:43:04 +00:00
Gavin Frazar 15fcc68677 Update database AWS metadata proto (#23099)
* add AssumeRoleARN for cross-account AWS
  https://github.com/gravitational/teleport/issues/15024
2023-03-15 22:28:31 +00:00
Brian Joerger 475388280d Headless Login: tsh implementation (#22751)
* * Implement tsh --headless

 * Implement tsh headless approve

* Add better headless authn state handling.

* Add godoc for new tsh field.
2023-03-15 18:05:02 +00:00
Andrew LeFevre de2e55bb69 connect to registered OpenSSH nodes with certs signed by OpenSSH CA (#21953)
To prevent users from being able to directly connect to registered
OpenSSH (Agentless) nodes, the OpenSSH CA was introduced. When
connecting to Agentless nodes, the Proxy will forward the connection
so the session can be recorded. The forwarding SSH server is configured
to authenticate to the target node with a certificate signed by OpenSSH
CA, which users do not have access to.
2023-03-14 16:58:16 +00:00
Justinas Stankevičius c056efe974 Hosted plugins: add plugin management UI prerequisites (#22831)
* Add GetType() to Plugin

* Add Plugins feature flag to web

* Run prettier

* Update e_imports.go with slack plugin subpackage

Respective enterprise changes imports a new subpackage,
which pulls new dependencies.
2023-03-14 12:44:22 +00:00
Jeff Pihach 1513294b7b Add CreatedBy and CreatedOn fields to locks. (#22667)
* Add CreatedBy and CreatedOn fields to locks.

* Move the setting of the CreatedBy and CreatedOn for locks to the server instead of the client.

* Add tests for the tctl resource lock import and for the tctl lock create command.

* Use clockwork for time in lock creation tests.

* Make fake clock optional and use the golang 0 date.

* Change CreatedOn to CreatedAt.

* Allow a custom time to be passed through as a fake clock.

* Actually accept a fake clock with useFakeClock.

* Pass Clock through as a configuration value when initializing Teleport for the tests.

* Test cleanup

* Set CreatedBy and CreatedAt values in test mocks.

* Fix failing test from enabling clock passthrough to auth.
2023-03-13 16:14:24 +00:00
Tiago Silva 674a3a1ec1 Removes deprecated KindKubeService objects (#22663)
This PR removes the `types.KindKubeService` objects that were
deprecated in Teleport 11.

Teleport 12 removed the double heartbeat and for Teleport 13 we can
safely drop the support of the old hearbeat based on `types.Server`
objects.

Clients older than Teleport 12 connecting to a Teleport 13 server will
fail since they cannot heartbeat using the old mechanism.
2023-03-13 10:55:39 +00:00
Brian Joerger a8e46a988c Add Headless Authn backend service. (#22553) 2023-03-07 18:56:11 +00:00
Alex McGrath 3953e69f17 Use the teleport-ent package on enterprise clusters in the discovery installer (#22464)
* Use the teleport-ent package on enterprise clusters in the installer

* Check for cloud when setting teleport package
2023-03-07 18:53:59 +00:00
Andrew LeFevre 6932a627c0 Make it easier to create registered openssh nodes with 'tctl' (#22615)
* make it easier to create registered openssh nodes with 'tctl'

Metadata.Name is set to a random UUID if it's unset, the requirement
to use '--force' when creating node resources is dropped, and more
checks for openssh node resources are added.

* added test coverage, renamed KindOpenSSHNode -> SubKindOpenSSHNode, added github.com/google/uuid to api/go.mod

* attempt to fix tests

* don't set node subkind if it's empty

* re-add test fix
2023-03-06 21:02:30 +00:00
Andrew LeFevre 948c1db915 preform RBAC checks before connecting to registered OpenSSH nodes (#21938)
The RBAC logic assumes that SSH connections to registered OpenSSH nodes
will always be proxied and terminated, which will come in a future PR.

Part of implementing #19261.
2023-03-03 17:29:53 +00:00
Ryan Clark c99a4d6191 Allow all alert severities to be acknowledged (#22461) 2023-03-03 09:55:03 +00:00
Michael Wilson 9bd0cc83c9 Add in SAML IdP service provider session metadata to auth attempts. (#22544)
* Add in SAML IdP service provider session metadata to auth attempts.

The SAML IdP auth attempt event now contains SAML IdP service provider,
which will allow the audit logs to display which service provider the user
is attempting to log into.

Additionally, a shortcut name has been added to the SAML IdP service provider
metadata to handle auth attempts where the service provider could not be found
given a shortcut name.

* Linting fix.

* Modify the auth attempt audit log entries.
2023-03-02 20:26:18 +00:00
Brian Joerger d02c6a28c0 Add HeadlessAuthentication protobuf type and Resource implementation. (#22350) 2023-03-02 18:35:21 +00:00
Andrew Burke e28d969fdc Add Azure auto-joining (#21087)
This change adds the ability for Azure virtual machines to automatically
join a Teleport cluster.
2023-03-01 22:18:43 +00:00
Michael Wilson 6973cd6527 SAML IdP audit events. (#22208)
* SAML IdP audit events.

SAML IdP audit events have been added. These events have been added to the UI
for proper rendering. Additionally, service provider events will be emitted
when managing service providers.

* Align the naming more with the existing events.

* Zac's feedback.

* Add in delete all event.

* Fix typo.

* Update story snapshot.

* Linting and test fixes.

* Audit auth failures.

* Removing the nopermissions test, as it's covered in the regular create test.
2023-03-01 20:01:40 +00:00
Michael Wilson 0fec21a1ef Initial Okta objects. (#22151)
To support the Okta integration, the initial Okta objects have been added.
2023-02-28 19:22:13 +00:00
MichaelandJeff Pihach d94fed7b0d Add static and dynamic web ui configuration options (#21945)
* Add UiConfig option to proxy service config

* Add uiConfig to GRV_CONFIG window object and use in terminal constructor

* Update configuration reference docs

* Remove extra structs and change property to scrollbackLines

* Update web/packages/teleport/src/config.ts

Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>

* Use a common struct and apply in applyProxyConfig

* Remove webclient dependency for fileconf

* Add missing doc comments

* Set individual properties of cfg.Proxy.UI

* Remove unneeded comment

* Add nolint rule

* Fix nolint

* Add test for UIConfig

* Cleanup tests

* Fix TestUIConfig context

* Allow dynamic config for web ui (#22097)

* Update protofiles

---------

Co-authored-by: Jeff Pihach <hatched@users.noreply.github.com>
2023-02-28 17:45:52 +00:00
Michael WilsonandAndrew Burke 437e93adbf Automatically parse entity ID from SAML SP during CLI creation. (#22101)
* Automatically parse entity ID from SAML SP during CLI creation.

When a SAML IdP service provider is created in the CLI, the entity ID will
be automatically parsed out of the entity descriptor and pushed into the
object before pushing the object to the backend.

Additionally, a small bug was found with the SAML IdP service provider get
logic and fixed.

* Update tool/tctl/common/collection.go

Co-authored-by: Andrew Burke <31974658+atburke@users.noreply.github.com>

* Update tool/tctl/common/resource_command_test.go

Co-authored-by: Andrew Burke <31974658+atburke@users.noreply.github.com>

* Bring back copy loop.

* Remove the SkipCheckAndSetDefault.

* Removing the check for the entity ID in the SP object.

* Restore missing comment.

* Parse entity ID as part of check and set defaults.

* Cleanup api go.mod/go.sum.

---------

Co-authored-by: Andrew Burke <31974658+atburke@users.noreply.github.com>
2023-02-27 20:58:22 +00:00
Brian Joerger 1dcc997189 Add headless auth preference logic. (#22148) 2023-02-27 18:25:51 +00:00
Forrest da5945e7fc preserve explicit local auth disable (#15454) 2023-02-24 03:23:31 +00:00
d89879c2f5 Add gRPC service definition for Plugin resources (#21750)
* Add plugin exchange service

* Add Plugin methods to auth

* Add gRPC-layer methods for Plugin

* Add RBAC presets for Plugin

* Test GetPlugin()/NoSecrets access

* Make error assertions more correct in role test

* Deny setting credentials if user can not read them

* gofmt

* Apply minor suggestions from code review

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Move dependency into an existing block in go.mod

* Improve error messages for failed type assertions

* DRY WithSecrets access checks for Plugins

* Run new tests in parallel

* Improve error assertions in auth_with_roles_test

* TestGetPluginWithSecrets: split cases to subtests

* Clean up test servers and clients

* Add proto for plugin service

* Remove Plugin methods from auth service

Moved to a dedicated service

* Remove plugin-related auth methods

Moved to a dedicated service in Enterprise

* Remove CreatePlugin test from auth_with_roles_test

Moved to a dedicated service in Enterprise

* Pass "backend getter" to local plugins service

This pattern is used in Enterprise to set up secondary services
before auth (and backend) are created.

* Rename InitialCredentials to BootstrapCredentials

* Add plugins service to genproto.sh

* Reformat generated proto

* Remove obsolete PluginExchangeService

The equivalent of this is now in Enterprise

* Add kube service to genproto.sh; regenerate

* Add ListPlugins to plugin backend service

* Reimplement GetPlugins on top of ListPlugins

This is a "convenience" implementation for the backend service layer.

* Replace GetPlugins with ListPlugins in gRPC schema

* Fix ListKubernetesResources unit test

* Simplify plugin pagination key to just the name

* Use existing constant for page size

* Make dummy clients return errors instead of panic

* Remove obsolete field

* Ensure go.mod is valid for corresponding e changes

* Fix passing mutex ref

* Move teleport-plugins import to e_imports

* Revert oauth change in go.mod

* Use limit+1 to look-ahead when paginating plugins

* Test plugin pagination with pageSize > numPlugins

* Add descriptive messages to gRPC dummy clients

* Plugin: add RW for editor; remove secrets from gRPC

* Make message more descriptive for dummy gRPC conn

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2023-02-23 14:32:41 +00:00
Hugo Shaka 8cec3828db operator: reconcile Users with standard Teleport reconciler (#21512)
* operator: reconcile Users through Teleport reconciler

* fixup! operator: reconcile Users through Teleport reconciler
2023-02-23 14:15:05 +00:00
Edoardo Spadolini 317833b9f2 Add new reporting license flag (#21928)
* Partially revert 09633dd47f

* Hide old features from String, add comments

* Add new reporting license flag

* Add testing

* add comment to LicenseV3/LicenseSpecV3

* Less ambiguous name for the new field

* Elaborate more on the unused flags
2023-02-22 15:43:58 +00:00
rosstimothy 920261cd1f Add DatabaseService KeepAlive type (#22042)
The DatabaseService was using the KeepAlive_Database type instead
of a new dedicated type. This caused the keepalive to fail because
the backend key that was created didn't actually exist which results
in #21454.

This adds the appropriate KeepAlive type and uses it in the appropriate
places.

Fixes #21454
2023-02-21 14:55:06 +00:00
0db64bbabe Fix Moderated session on leave pause action. (#21366)
* Fix Moderated session on leave pause action.

* Unpause when moderator rejoins session with onLeave=pause

This commite fixes a case when the moderator rejoins a paused session
but Teleport didn't resume the operations and the session was still
locked to everyone.

* Fix panic when re-joining SSH session.

* Update lib/kube/proxy/sess.go

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

* Update lib/kube/proxy/sess.go

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

* Fix typo

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

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
2023-02-17 14:11:59 +00:00
Jakub NyckowskiandEdoardo Spadolini cd584fdc70 Make NewlyAdded backport friendly. (#21446)
Current implementation of NewlyAdded() requires to keep different implementation on production branches. New implementation will allow to keep the same source code to be identical on all branches.

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-14 19:57:08 +00:00
Michael Wilson 4b570a55de Add SAML query functions to auth preferences. (#21692)
* Add SAML query functions to auth preferences and role.

Getter functions have been made for the new IdP configuration fields in the
AuthPreferences and RoleOptions.

* Remove role query, as we can access this in the  object.

* Make sure the IdP options section won't hit any nil pointer errors.
2023-02-14 17:31:43 +00:00
Michael WilsonandRoman Tkachenko 383ad7a5de SAML IdP session objects. (#21521)
* SAML IdP session objects.

The upcoming SAML IdP feature requires session storage in the backend. To
support that, the `WebSession` that has been adapted for app sessions and
Snowflake sessions has been adapted for SAML IdP sessions.

The SAML IdP will be encoding the session structure as JSON and packing it
into the new `data` field within the web session.

* Update api/types/session.go

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

* Use specific structure instead of a JSON blob.

* Update the create SAML session request.

* Make SAML session a pointer.

* Add in link to crewjam/saml object.

---------

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2023-02-13 19:52:33 +00:00
Alan Parra 8c84d0a766 Add device lock support (#21667)
* Add Device to LocketTarget proto

* Refactor LockTarget.Match

* Test lib/srv.ComputeLockTargets

* Test lib/services.LockTargetsFromTLSIdentity

* Test device lock during cert issuance

* Add device lock targets where applicable

* Add --device to `tctl lock`

* Fix godocs (unrelated)

* Review: Drop redundant comments
2023-02-13 14:46:11 +00:00
Edoardo Spadolini f622510dd0 Make UsageSessionStart report TCP app access separately (#21606)
* Make UsageSessionStart more selective and granular for app access

* Allow generic "app" kind for app.session.start

app.session.start is consistently emitted, just not consistently stored

* Avoid singling out aws app access

* Use the same check as app access
2023-02-13 10:13:18 +00:00
Gavin Frazar 5c752c4df8 Fixup teleport db configure create (#20968)
* add missing flags
* fix config generation bugs
* always wrap generated strings value in quotes
* parse and check generated config
* update tests for db agent config gen
2023-02-11 00:54:07 +00:00
Michael Wilsonandrosstimothy 70833b6b3f Initial user group object. (#20848)
* Initial group object.

The group object has been added to support the Okta appaccess integration
feature. Please see https://github.com/gravitational/teleport.e/pull/609
for more information.

The local service for handling backend management of the group objects has
been added as well. This will be expanded upon in a later PR.

* Rename group to usergroup.

* Linting fixes.

* Remove unnecessary functions.

* Add user groups to test parse shortcut.

* Apply suggestions from code review

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

* Update lib/services/local/usergroup_test.go

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

* Fix AsResources in usergroup.

* Apply suggestions from code review

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

* Update lib/services/local/usergroup.go

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

* Fix return in usergroup service.

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2023-02-10 16:21:17 +00:00
Michael WilsonandEdoardo Spadolini d29cc6e797 Extract entity ID when creating SAML service provider. (#21375)
* Extract entity ID when creating SAML service provider.

The entity ID will be parsed from the entity descriptor metadata when the
service provider's entity descriptor is set. The motivation of this PR is to
do the following:

* Extract the entity ID from the entity descriptor during the creation of the
  SAML IdP service provider.
* Prevent the creation of service providers in the backend that have an
  entity ID that does not match the entity ID represented in the entity
  descriptor.
* When reading or listing service providers, prevent the parsing of every
  entity descriptor during the listing.

The goal here is to make it performant to look up entity descriptors by their
entity ID without incurring the cost of parsing every single entity descriptor
to determine the entity ID.

* Feedback, eliminating the parsing from the object, pushing parsing verification into the local service.

* Fix up tests, e_imports.

* Fix comment in types.proto.

* Remove dead comment.

* Deduplicate entity ID in update as well.

* Small refactor to move parse out of lock.

* Remove XML parsing from type, fix grpcserver test, fix locking boundaries.

* Tim's and Edoardo's feedback.

* Fix cache test.

* Update lib/services/local/saml_idp_service_provider.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Expanding the comments on the EntityID field.

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-09 21:06:41 +00:00
Alan Parra 511dc199d8 Skip device authz when issuing App or Windows certs (#21344)
* Test device authorization during cert issuance

* Skip device validation when issuing App or Windows certs

* Add an early check for GenerateUserSingleUseCerts
2023-02-09 19:19:25 +00:00
Alan Parra c5bc3a4e0f Rename protoEqual and add a big warning (#21491)
Rename `protoEqual` to `protoKnownFieldsEqual` and add a warning about
its usage.

Manually ignoring `XXX_` fields in full comparisons runs the risk of
ignoring unknown fields, which in itself is a strong hint that we are
running outdated code. The recommended practice for scenarios where full
equality is not desirable is to code it as such, comparing the fields
that matter.

`proto.Equal` should be preferred in most scenarios.
2023-02-08 20:57:18 +00:00
Andrew Burke 732594f191 Add Azure join method (#20019) 2023-02-08 17:21:11 +00:00
Justinas Stankevičius 49dca5a706 Add service for "plugin" resources (#21210)
* Add Plugins service

* Add tests for local plugins service

* Remove validation calls from service

These are already invoked by MarshalPlugin

* Separate concerns of local Plugins service

Credentials will be exchanged by the auth server,
so there is no need to have proto.CreatePluginsRequest
in the service layer.

Proto types will be reintroduced in a later PR
covering the auth server changes.

* Rename method to better reflect purpose

* Run GCI
2023-02-07 15:34:20 +00:00
Roman Tkachenko ea5f334821 Fix operator build (#21362) 2023-02-07 01:15:55 +00:00
Tiago Silva 4d09eea9b0 Add gRPC Kubernetes Service (#21103)
This PR introduces a gRPC service to retrieve the pods available using the `search_as_roles` configured in the user's roles.

This gRPC service receives a TLS identity and manipulates it to access the Teleport Kubernetes Proxy and retrieve the pods available for a hypothetical user that has the `search_as_roles` defined for its roles.
The response does not leak the certificate nor the pod details other than `name`, `namespace` and `labels`.

```mermaid
sequenceDiagram
    participant User as User
    participant gRPC as grpc Server
    participant Auth as Auth Server
    participant KubeProxy as Kube Proxy
    participant KubeSVC as Kube Service
    User->>+gRPC: ListKubeResources(cluster,namespace)
    Note left of gRPC: Includes search_as_roles <br/> and preview_as_roles <br/>into identity!
    gRPC-->>+Auth: Sign cert with ProcessKubeCSR
    Auth-->>-gRPC: Signed certificate
    gRPC->>+KubeProxy: list pods "v1.../namespaces/{namespace}/pods"
    KubeProxy-->>+KubeSVC: list pods "v1.../namespaces/{namespace}/pods"
    KubeSVC-->>-KubeProxy: filtered response
    Note left of KubeSVC: Applies Pod RBAC filtering!
    KubeProxy-->>-gRPC: response
    gRPC->>-User:Return name, namespace and labels
```

Part of #21107 and #19573
2023-02-06 22:45:31 +00:00
Edoardo Spadolini 86df3aa981 Loop over the CA type list in collections (#21292)
* Loop over the CA type list in collections

Also adds a NewlyAdded method to CertAuthType to indicate the CA types
that have been added in the current major version, so that we can
ignore any related BadParameter error when handling those kinds of CAs
with potentially older versions of Teleport.

* Mention NewlyAdded in the CertAuthType description
2023-02-06 17:50:43 +00:00
STeve (Xin) Huang 704a514742 AWS IAM role matching for database users (#20610)
* Add database user matching logic for databases require AWS IAM role

* Fix UT

* fix lint/typo

* fix typo in error message

* reduce bool return
2023-02-03 18:33:56 +00:00
Marco André Dinis 97b2a33ff8 Add RBAC labels for Database Services access (#21093)
* Add RBAC labels for Databas Services access

This PR adds a new set of Labels that controls access to the
DatabaseService resource.

We changed the `RoleSet.checkAccess` to allow for checks in Resources
without Labels.
However adding complexity to this function is something that can bit us
in the future.
So, this PR reverts that change and adds a new set of labels.
Those labels will control whether the RoleSet has access to
DatabaseServices.

Given that this is a new condition that we add to the default `editor`
role, we had to create a migration/backfill for the roles that don't
have them.
This allow us to migrate the roles created previously and add this new
allow condition.

* remove preset for remote proxy and database labels

* Remove db_service_labels wildcard from editor preset role

* Fix early exit logic
2023-02-03 17:58:27 +00:00
42cb80c3e4 Adding in a new SAML IdP certificate authority. (#21159)
* Adding in a new SAML IdP certificate authority.

A new SAML IdP certificate authority has been added. It has been added to
initialization, the cache, and the certificate can be rotated.

* Update lib/services/authority.go

Co-authored-by: Sam Freiberg <sfreiberg@goteleport.com>

* Update api/types/trust.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Only validate private key if it's present.

---------

Co-authored-by: Sam Freiberg <sfreiberg@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-03 15:56:56 +00:00
Justinas StankevičiusandEdoardo Spadolini 6213ccf42d Add Plugin resource schema, methods (#20990)
* Add Plugin resource schema, methods

* Improve shebang of genproto.sh

Execute using bash, no matter where it actually lives

* Use Metadata.Expiry()

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Remove field reservations from PluginStatusCode

* Add plugin (un)marshaling

* Snake case fields of Plugin (and children)

* Ensure timestamp fields on Plugin are always UTC

https://github.com/gogo/protobuf/issues/519

* Rename credentials according to proto conventions

* Fold check for nil settings into the type switch

* Remove extraneous field checks

These are set in setStaticFields()

* Add missing godocs

---------

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-03 11:04:53 +00:00
Michael Wilson 7c4bba7414 Add IdP options to role and auth preferences. (#20999)
* Add IdP options to role and auth preferences.

Both role and auth preferences have IdP options added to them. At the auth
preferences level, if the SAML IdP option is set to false, the IdP will be
disabled globally. At the role level, it will control which roles allow
access to the IdP.

* Make SAML access by default.

* Fix tests.

* Fix config test.
2023-02-01 18:45:49 +00:00
Marco André Dinis 799219f07a Update grpc-generated files (#21056)
In a previous PR some grpc-generated files were not included in the
commit.
This PR is the result of running `make grpc`.
2023-02-01 10:46:21 +00:00
STeve (Xin) Huang 2111f51441 Support assumed roles for "tsh proxy aws" (#20568)
* Support assumed roles for "tsh proxy aws"

* fix typo for RenameHeader

* add error handler

* review comments

* enhance bad parameter

* fix typo

* Forbit requests by assumed role in endpoint url mode.

* fix host check
2023-01-30 21:21:43 +00:00
Michael Wilsonandrosstimothy 0caf51d6b6 Initial SAML IdP service provider object. (#20774)
* Initial SAML IdP service provider object.

The SAML IdP service provider object has been added to support the use of
Teleport as a SAML identity provider. Please see
https://github.com/gravitational/teleport.e/pull/668 for more information.

The local service for handling backend management of the SAML IdP
service provider objects has been added as well. This will be expanded upon
in a later PR.

* Fix imports.

* Copy paste error.

* Update api/types/saml_idp_service_provider.go

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

* Update api/types/saml_idp_service_provider.go

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

* Update lib/services/local/saml_idp_service_provider.go

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

* Use errAssertionFunc, paginate service provider resources.

* Marco's and Tim's feedback.

* Update proto comments.

* Update NewSAMLIdPServiceProvider comment.

* Fix linting, test issues.

* Remove unnecessary functions already given by ResourceHeader.

* Apply suggestions from code review

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

* Fixes, removal of explict getter for service provider.

* Remove unnecessary functions.

* Update api/types/saml_idp_service_provider.go

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

* Linting fix.

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2023-01-30 20:04:21 +00:00