Commit Graph
1002 Commits
Author SHA1 Message Date
Yassine Bounekhla f2c8833cea implement listing notifications for a user with matching (#39942) 2024-05-15 19:26:58 +00:00
Marco Dinis c90bf7e9a4 AWS OIDC App Access: add PublicAddr to App (#41543)
* AWS OIDC App Access: add PublicAddr to App

This PR adds a missing field to the App created to handle the AWS App
Access when using the AWS OIDC credentials
The PublicAddr is required and was not being set.

* fix identation
2024-05-15 07:11:50 +00:00
Trent Clarke fbd0091b9b SCIM only okta (#41125)
* Changes required for implementing a standalone (i.e. without Okta Sync compatibility) SCIM service in teleport.e.

Includes:

 * `tctl plugins delete` and `tctl plugins create scim` tooling
 * Moving some constants from teleport.e to OSS
 * Protobuf message types for standalone SCIM settings
 * UI updates for rendering SCIM users

Changelog: Added plugin management tooling to tctl

* Adds validation to SCIM settigs

* Linter fixup

* linter appeasement
2024-05-14 08:36:11 +00:00
Marco Dinis 5bebcfba49 EC2 AutoDiscover Script mode with Integration (#40959)
This PR adds auto-discover support for EC2 installation when using the
Script enroll mode with Integration credentials.

This mode uses SSM commands to install teleport on the target host.
Previsouly, integration credentials would only allow the EICE mode.
From now on, we can use integration credentials to run the SSM commands
on the target node.
2024-05-09 15:05:36 +00:00
Marco Dinis 4b91d15e45 Enroll Mode for EC2 AutoDiscovery types (#40937)
We have two enroll modes for EC2 instances:
- script
- eice

Currently, if an Integration exists we always use the EICE mode.
However, we might want to use the Integration credentials to run the SSM
commands and install teleport on the target instance.

This PR adds a new knob in the DiscoveryConfig that allows us to
configure the enrollment mode when an integration is configured.
2024-05-09 14:19:14 +00:00
Gavin Frazar 12c113bc84 add GCP Spanner (#40859) 2024-05-07 22:21:27 +00:00
Jakub NyckowskiandTiago Silva bc53a8235c Add Crown Jewel resource (#40914)
* Update labels datatype in Teleport crownjewel proto

This commit modifies the labels from a map to repeated TeleportLabel in CrownJewel proto, and accordingly updates the getter function in proto generated code. The newly introduced TeleportLabel type contains a Key and repeated values for improved flexibility.

Clean up

Update and restructure CrownJewel service proto

The code modifications include renaming and restructuring several types and altering various functions in the CrownJewel service proto. Major changes involve renaming DeleteCrownJewel

Rename 'kind' to 'kinds' in crownjewel API

This commit changes the 'kind' field to 'kinds' in the crownjewel API to better reflect its purpose of holding multiple resource types. Changes are made across several files - 'crownjewel.go', 'crownjewel.pb.go' and 'crownjewel.proto'.

After rebase fixes

Remove CrownJewel type from several files

This commit represents the removal of the CrownJewel type from several files. CrownJewel type references are deleted in certain Go files, and imports of CrownJewel in multiple files are being adjusted. The specifics of why this type is removed is not evident from the diffs, but the deletions will affect the related functionalities.

Add CrownJewel update functionality

This update enables the 'UpdateCrownJewel' functionality. If a 'CrownJewel' resource already exists, it can now be updated instead of returning an error. This enhances flexibility when dealing with resource management. It also introduces the ARN field into the 'AWSMatcher' service.

Update CrownJewel service with pagination and improve matchers

This update adds pagination to the CrownJewel service for more efficient data handling. It also improves the matching capabilities with the inclusion of Teleport and AWS matchers and allows for selective querying with these matchers. Additionally, it includes various changes to structure and naming for better clarity and ease of use.

Refactor CrownJewel protos to use ResourceHeader

This refactoring replaces the previous structure of CrownJewel proto's fields Kind, Sub_kind, Version, and Metadata with a single object called Header (ResourceHeader). It simplifies the code structure and harmonizes it with other protos. Now, Header contains the essential attributes that were previously distributed across multiple separate fields.

Add GetCrownJewels method to cache and accessgraph

The function GetCrownJewels has been added to the cache and the accessgraph. It retrieves all CrownJewel instances from the cache. Additionally, CrownJewel retrieval functionality has been removed from auth server and existing usages have been refactored.

Implement Crown Jewel creation feature

Updated the method `createCrownJewel` in the resources command to handle Crown Jewel creation. Introduced a new gRPC service `crownjewelv1` to handle client-server interactions for Crown Jewel objects. Crown Jewel expiry configuration has now also been enabled.

Add missing files

I have no words...

Update authentication and event handling

Refactored the argument from 'auth.ClientI' to '*auth.Client' in 'createCrownJewel' function in 'resource_command.go'. Removed unused import 'durationpb' in 'auth_with_roles.go'. Added a new event code 'AccessGraphAccessPathChangedCode' in 'codes.go' and 'AccessGraphAccessPathChanged' in 'api.go' for better monitoring and logging of access path changes.

Add access path changed event and relevant changes.

 update api

add grpc

update api

add cache support

add protos

* Fixes after rebase

* Refactor Crown Jewel resource methods

Updated API methods related to the Crown Jewel resource to improve clarity and consistency. Renamed `GetCrownJewels` to `ListCrownJewels`, added pagination parameters, and ensured uniform handling of the Crown Jewel resource across different parts of the codebase. Updated relevant comments for better code understanding.

* Removed CrownJewel converter, updated CrownJewel references

This commit removes the CrownJewel converter and updates references from the old CrownJewel type to the new protobuf-defined CrownJewel type, streamlining the codebase. The commit also disables CrownJewel deletion since it is not supported yet. Some minor errors were fixed regarding CrownJewel resource names.

* Implement Crown Jewel deletion functionality

The crown jewel deletion feature has been enabled by uncommenting and simplifying the code block. Now, the delete action is directly performed on the specific 'crown jewel' mentioned based on its name. The previously unsupported action returns an informative success message after the deletion.

* Refactored function 'allCombinations' and added authorization checks

Moved 'allCombinations' function into 'utils' package, renamed it to 'Combinations', and updated its references in 'dbobjectimportrulev1' and 'dbobjectv1' tests. Additionally, introduced admin authorization checks to 'CreateCrownJewels', 'UpdateCrownJewels', and 'DeleteCrownJewels'. Created corresponding tests for these changes.

* Add CrownJewel service to cache tests

The CrownJewel service has been added to the cache test file. The service creation is implemented and assigned to new fields in multiple methods within the cache tests. A new test function `TestCrownJewel` has also been added to validate CRUD operations for the service.

* Add access path changed event and update Crown Jewel tests

Added a new event code for when an access path changes in the access graph, and introduced new API calls to handle these situations. Also, updated crown jewel related tests and fixed copyright year in several files.

* Update protobuf import path

The protobuf import path was updated from "github.com/golang/protobuf/proto" to "google.golang.org/protobuf/proto" to ensure correct use and to prevent potential issues, while maintaining functionality in crown_jewels.go.

* Refactor CrownJewel and AccessGraph services

This commit optimizes the ListCrownJewelsResponse in the CrownJewel service by directly assigning the response instead of using an extra loop. Additionally, the EventsStream in the AccessGraph service and related tests have been updated to EventsStreamV2, reflecting the implementation of new versions of these methods.

* Add CrownJewel resource in access controls and tests

In both the cache test and access control files, CrownJewel resource has been included. This provides the system's ability to manage and test CrownJewel resources. Additionally, it allows the handling of CrownJewel resources in client events.

* Simplify implementation

* Update copyright dates and add license headers

Updated the copyright dates in several files to reflect the new year. Additionally, license headers have been added to some files where they were previously missing, ensuring the proper copyrights and GPL notice are visible.

* Refactor CrownJewel codebase for better readability

Fixed various typographical errors in CrownJewel's related functions and removed a TODO comment. Improved function and function calls' names that were incorrectly referring to different modules, making the code easier to read and understand across different CrownJewel services.

* Add validation for Teleport and AWS matchers in service

The validation has been added for Teleport and AWS matchers in the service layer to ensure that essential details are not missed when setting matchers. This includes checks to ensure that kinds and labels for Teleport, and types and tags for AWS matchers are properly set.

* gci

* Add CrownJewel update functionality and refactor related services

This commit adds the ability to update a CrownJewel resource within the ResourceCommand. It also includes refactoring of related services, condensed code logic, and improved utilization of existing methods for marshaling/unmarshaling CrownJewel. Specific changes in service.go and crown_jewels.go files have reduced code redundancy and enhanced the code structure.

* Relocate and update crown_jewels_test file

This commit moves the crown_jewels_test from the local to the services library and adds test cases for unmarshalling Crown Jewels data. Also, import statements for labelv1 and utils were introduced to support these changes.

* Update crown jewels test with AWS matchers

Revised the crown jewels test file by including AWS matchers section in the CrownJewel object. The change ensures to specifically match AWS infrastructure following certain parameters, thus enhancing the specificity and flexibility of our matchers. Apart from this, minor reordering of objects has also been done for better code organization.

* Added upsertCrownJewel function and related proto message

The commit adds the UpsertCrownJewel function in the service.go file, which enables upsert operations on crown jewel resources. Alongside, the UpsertCrownJewelRequest proto message is added to the crownjewel_service.pb.go file to handle such requests.

* Refactor CrownJewelsClient to use upsert

This change refactors the CrownJewelsClient to use the upsert method when the force flag is on. The code has been streamlined by eliminating the need for 'already exist' error checking and separate create and update methods.

* Add GetCrownJewel functionality and refactor validation

A GetCrownJewel function has been added to the Service, which retrieves a specific CrownJewel resource. Also, the CrownJewel validation process has been refactored, moving the validateCrownJewel function from service.go into the crownjewel library and renaming it to ValidateCrownJewel. These changes improve modularity and code organization.

* Add VerbCreate check and test for CrownJewel validation

The checkAccessToKind function now also checks for the VerbCreate permission. Additionally, a new test file, object_test.go, was added to validate the functionality of the CrownJewel object. This includes various validation checks such as "NilCrownJewel", "ValidCrownJewel", "MissingMatchers", among others.

* Refactor CrownJewel resource handling and validation

The codebase was updated to improve CrownJewel resources handling. This includes modifications to list, get, create, update, upsert, and delete functions in several files. Additionally, a validation function has been implemented for CrownJewel objects, ensuring required fields are present. Depreciated logger service has also been removed.

* Add cache implementation to CrownJewel service

The CrownJewel service has been enhanced by integrating it with cache. The main changes include adding "Cache" as part of ServiceConfig and using cache to fetch crown jewels instead of directly using the backend services. The cache interface with the methods "ListCrownJewels" and "GetCrownJewel" has been added to handle these operations.

* Add Cache to service configuration in crownjewelv1 tests

In this commit, we added the Cache field to the service configuration used in the tests for the crownjewelv1 service. This ensures that the service configuration used in the tests matches the expected real-world configuration.

* Update CrownJewelsService to use ConditionalUpdateResource

This commit changes the CrownJewelsService's `UpdateCrownJewel` method to use the `ConditionalUpdateResource` method instead of the `UpdateResource` method. This change will provide a more appropriate update strategy for the specific needs of the CrownJewelsService.

* Replace 'Cache' with 'Reader' in crownjewel service & remove DeleteAllCrownJewelsRequest

The 'Cache' in crownjewel service has been replaced with 'Reader' to improve code readability and to match with its functionality. Also, the DeleteAllCrownJewelsRequest functionality was removed as it posed a high risk potential for data loss and it wasn

* Update tests for Crown Jewel service

This commit updates the test suite of the Crown Jewel service. An object is fetched from the backend before updating its expiry time, ensuring the revision is populated. In addition, a new test is introduced to handle the scenario where the revision is missing when updating a Crown Jewel.

* Refactor protobuf marshaling with utils

This commit replaces the usage of the `protojson` method for marshaling and unmarshaling protobuf objects in `crown_jewel.go` with the `FastMarshal` and `FastUnmarshal` methods from `utils`.
protojson is failing to unmarshal resources.

* Update CrownJewel test and serialization methods

Updated the test condition in crown_jewels_test.go to use Proto.Equal for object comparisons. Also, swapped out the FastMarshal and FastUnmarshal methods with protojson's Marshal and Unmarshal in the CrownJewels service.

* Add missing license

---------

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2024-05-07 15:48:24 +00:00
Andrew LeFevre cdb227b59c add the new/changed SAML connector to create and update audit events (#40062) 2024-05-02 17:51:05 +00:00
Michael 80f314a550 Add DisableIncludeRequestableRequests to UIConfig (#41064) 2024-05-02 16:53:13 +00:00
Justinas Stankevičius 5a22d66e2e Entra ID reconciler: directory reconciler prerequisites (#40778)
* Add Entra ID resource origin

* Ignore ID and Revision from `header` in cmp

* Add e_imports for MS Graph SDK
2024-05-02 16:47:29 +00:00
Marco André Dinis dcb5e435b5 API for creating AppServer that uses AWS OIDC Integration (#40581)
* API for creating AppServer that uses AWS OIDC Integration

This PR adds two new APIs:
- web api endpoint
- `tctl create` for AppServers

This allows the client to create AppServer which use the integration
credentials.

This also updates the `editor` role so that they are able to upsert the
AppServer.

* return ui.App after creation

* improve comment
2024-05-02 15:28:16 +00:00
Justinas Stankevičius 68886bb8ef Entra ID integration boilerplate (#40998)
* Add e imports for MS Graph SDK

* Add ability to sign Entra ID OIDC JWTs, rework KID handling

- Synthesize Key IDs for our JWT keys. For backwards compatibility, also
  include the same keys with an empty `kid` in JWKS.
- Sign AWS OIDC tokens with a `kid=""` header claim,
  rather than omitting the `kid` claim altogether.
  See comment for details.

* Add validation for Entra ID plugin

* Fix typo in assertion function name

* Update the OIDC JWKS test to expect the same key twice

* Add Entra ID plugin type constant

* go mod tidy

* Fix expected JWKS size in integration test

* Add basic tests for KeyID

* Move Azure auth settings from Plugin to Integration

* Address review comments

* Add a unit test to ensure KeyID compatibility

* Add license header to token_generator.go

* Rename validation function per new conventions
2024-05-02 13:44:32 +00:00
Zac Bergquist a4e8cc27d0 auth: require a semaphore in order to complete uploads (#40926)
Having multiple auth servers attempt to complete uploads against the
same shared backend results in racy behavior. This code is focused
on cleanup and is not performance sensitive, so we leverage a
semaphore to make sure only one auth server is attempting to complete
uploads at any point in time.

This new behavior can be disabled with an environment variable,
which will provide an escape hatch in case we we encounter
problems with it.
2024-05-01 16:18:37 +00:00
Andrew LeFevre 06b15b28fb add lock target to lock deletion audit events (#40057) 2024-04-30 22:56:49 +00:00
Alan Parra 72780dce68 fix: Forbid SSO users from logging in using passwordless (#41062)
* Save the WebAuthn UserHandle in the mock Key

* Simplify passwordless tests

* fix: Forbid SSO users from logging in using passwordless

* Rename tests to TestPasswordlessProhibitedForSSO
2024-04-30 19:07:57 +00:00
Justinas Stankevičius 07254a5def Entra ID integration: add proto definitions (#40997) 2024-04-30 16:42:51 +00:00
Alan Parra 15354e196e fix: Enforce allow_passwordless server-side (#41023) 2024-04-30 14:39:19 +00:00
Krzysztof Skrzętnicki f11b8a7331 Add usage events for database autoprovisioning (#39841) 2024-04-30 14:30:04 +00:00
Michael d129b1d3c7 Include requiresRequest flag for searchAsRoles requests (#40328) 2024-04-29 17:21:43 +00:00
Grzegorz Zdunek 1f574976b5 Fix roles filtering (#40994) 2024-04-29 13:29:37 +00:00
Jakub Nyckowski f0a16af531 Introduce Access Graph EventsStreamV2 (#40807)
* Introduce Access Graph EventsStreamV2

A new GRPC method EventsStreamV2 is introduced. The new method allows returning responses from the Access Graph.
The new API is required by crown jewel implementation. The new API will be used to emit audit events from the access graph.

* Add new fields to Event protobuf for better tracking

Added two new fields, AffectedResourceName and AffectedResourceSource, to the Event protobuf. These additions allow for a more detailed and efficient tracking of changes and their sources, improving overall monitoring and event handling.

* Add AccessPathChanged event and update service file

A new proto file, events.proto, has been added to define the AccessPathChanged event, detailing changes in access paths. The access_graph_service.proto has been updated to use this new event instead of the legacy one. The relevant changes are also reflected in the generated Go file, access_graph_service.pb.go.

* Missing files
2024-04-26 17:37:29 +00:00
Tiago Silva 9e01397c27 Add Gitlab Plugin boilerplate code (#40713)
This PR introduces the proto and compiled proto changes required to
implement an Access Graph Gitlab plugin.

Part of https://github.com/gravitational/access-graph/issues/635

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-24 17:09:08 +00:00
Alan Parra 80140bebbd Issue cert.create events during device authentication (#40848)
* Add DeviceExtensions to the events.Identity proto

* Update generated protos

* Issue cert.create events during device authentication
2024-04-24 14:19:21 +00:00
Marek Smoliński 3d4f24a173 Allow for Okta Assignments with empty targets (#40517)
* Allow for Okta Assigments with empty targets

* Rebuild
2024-04-24 12:07:34 +00:00
Zac Bergquist 8cd1c429f5 Fix up some poor wording (#40832)
Closes #40294
Closes #39172
2024-04-23 22:01:41 +00:00
Nic Klaassen ef0f92d010 fix: prevent deleting AWS OIDC integration used by EAS (#40630)
* fix: prevent deleting AWS OIDC integration used by EAS

The External Audit Storage feature for Teleport Cloud depends on an AWS
OIDC integration to exist in order to get credentials for the customer
AWS account.
It's currently possible for a customer to delete the AWS OIDC
integration referenced by the EAS configuration, leading to the EAS
integration breaking and the Auth service crashing the next time it's
started up.

This commit prevents deleting an AWS OIDC integration currently
referenced by and EAS integration, and prevents creating an EAS
integration referencing an unknown AWS OIDC integration.

* use PreDeleteCheck instead of calling EAS service

* reorder tests and add missing cleanup

* create integrations svc on the fly

* switch to AtomicWrite

* set revision of returned resources

* deprecate gRPC DeleteAllIntegrations and use more general cacheMode
2024-04-23 21:22:16 +00:00
Noah StrideandAlan Parra 038bff1d64 Add clientside elements of TPM joining (#40647)
* Add clientside elements of TPM joining

* Update lib/auth/register.go

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Update api/client/joinservice.go

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Update lib/auth/register.go

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Tidy up RegisterUsingTPMMethod method

* Add default case

* Rename CheckAndSetDefaults to validate

* Add basic success test for JoinServiceClient_RegisterUsingTPMMethod

* Add final touches to client joinservice test

* Add license header to joinservice_test.go

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-04-23 11:19:15 +00:00
Tiago Silva 4c337d1a7f Add AccessGraphPlugin system role (#40714)
This PR introduces the `AccessGraphPlugin` system role used by Access
Graph plugins to access the Auth server API and Access Graph api.

Part of https://github.com/gravitational/access-graph/issues/635

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-23 09:43:45 +00:00
Brian Joerger 19f85b1343 Don't let users watch Web Sessions with secrets (#39588)
* Don't watch web sessions with secrets by default; Deny users from watching web session secrets.

* Add backwards compatibility logic for old proxies

Fallback to web session permissions for users watching with secrets

Fix uncaught merge conflict

* CopyWithoutSecrets without proto.Clone to avoid gogoproto issue.

* Revert WebSession.CopyWithoutSecrets rename and instead add special case in fanoutv2.go since WebSessions can not implement ResourceWithSecrets without affecting upstream consumers negatively.

* Address slice iteration comment.
2024-04-22 22:45:05 +00:00
STeve (Xin) Huang 26bdf3d0b7 Fix an issue tsh db ls shows one entry per db server instead of db name (#40784) 2024-04-22 20:21:40 +00:00
Grzegorz Zdunek 22a3389152 Correctly filter out system roles (#40545)
* Correctly filter out system roles

* Move `SkipSystemRoles` check above `SearchKeywords` check

* Add tests
2024-04-22 10:04:26 +00:00
Tiago Silva ec57cd5a67 Uniform equal function names to IsEqual (#40441)
* Uniform equal function names to `IsEqual`

Our API doesn't define any naming or characteristics for object
comparison functions like `IsEqual`. Checks rely on using
`services.CompareResources` that has some coverage but doesn't cover all
resources otherwise it fallsback to expensive `cmp.Equal` comparison.

This PR moves the `IsEqual` interface to `api` so we can ensure objects
satisfy the same interface required by `services.CompareResources`.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* handle review comments

* keep  equal

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-19 09:22:43 +00:00
Alan Parra 8b8773e7fa Update web_session_id description in DeviceMetadata (#40637)
* Update web_session_id description in DeviceMetadata

* Update generated protos
2024-04-18 07:06:06 +00:00
Marco André Dinis 851b0d8fdf DiscoveryService: prevent EICE Node duplication (#40220)
* DiscoveryService: exclusive worker per Discovery Group

This PR ensures only one DiscoveryService is running per DiscoveryGroup.
It does so using a SemaphoreLock.

This should prevent any duplicate API calls and also prevent duplicate
resources on Teleport side.

* improve eice server name and releaseGroupLockFn init

* review pt2

* improve error handling

* re-organize lock acquire

* improve eice node name handling

* simplify lock on discovery group

* Remove lock logic and rely on node name to prevent dups

* improve test comment

* change comment about skipping nodes
2024-04-15 13:24:33 +00:00
Trent Clarke 2be9025558 Fix overwritten ACL member values during Sync & SCIM push (#40454)
* Fix overwritten member values

* test fixup

* refactor for readability

* Addess review feedback

* Preserve "AddedBy"

* Make preserving metadata the default behaviour

* fix cache tests

* Replace custom validation with calls to `CheckAndSetDefaults()`

* Commentary on metadata preservation

* Test Fixup
2024-04-15 06:48:52 +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
Tiago Silva 502879a5fe DiscoveryConfig: Update status after each run (#40267)
* DiscoveryConfig: Update status after each run

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add unit tests

* drop method by reducing interface area

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-10 17:18:58 +00:00
Bartosz Leper 06fce3f449 Keep track of whether the user has a real password set (#39576)
* Keep track of whether the user has a real password set

* lint

* Some comments

* Fix TestCreateResources

* Fix e/ link

* Review

* Review

* Review

* Use early return on error in DeletePassword

* Fix the broken teleterm test
2024-04-10 10:28:05 +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
Tiago Silva 71fbd21401 GoDerive: Generate Equal stubs for DiscoveryConfig object. (#40255)
This PR generates the stubs for `DiscoveryConfig.Equal` function based
on goderive code generation.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-08 14:51:39 +00:00
Tiago Silva 86fcaecb37 DiscoveryConfig: Implement UpdateDiscoveryConfigStatus handler (#40215)
* DiscoveryConfig: Implement `UpdateDiscoveryConfigStatus` handler

This PR implements
`/teleport.discoveryconfig.v1.DiscoveryConfigService/UpdateDiscoveryConfigStatus`
grpc method

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* fix name typo

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-04-08 14:13:09 +00:00
Andrew Burke d0a68fd824 Add automatic role access requests (#39003)
* Add automatic role requests

This change adds the optioin to automatically make a role access request
during tsh ssh instead of a resource access request.

* Speed up TestSSHAccessRequest
2024-04-05 19:40:35 +00:00
Michael Wilson a72d02d873 Introduce role friendly name labels and frontend utilities. (#40113)
* Introduce role friendly name labels and frontend utilities.

Role friendly name labels and frontend utilities have been introduced.

* Remove unneeded sort function.
2024-04-05 12:40:40 +00:00
Brian Joerger baf030253f Move types.NewWebSessionRequest to lib/auth/sessions.go. (#39742)
Move related methods to lib/auth/sessions.go.
2024-04-02 18:41:24 +00:00
Forrest 06ac626868 user filtering (#39844) 2024-04-01 21:19:55 +00:00
Alan Parra 07b029e6d4 Keep device extensions in renewed sessions (#39982)
* Add the HasDeviceExtensions field to WebSessionSpecV2

* Update generated protos

* Add GetHasDeviceExtensions to the WebSession interface

* Write HasDeviceExtensions on augmented sessions

* Make NewWebSessions private

* Keep device extensions in renewed sessions

* Add a DeviceWebToken TODO to ChangeUserAuthentication

* Explicitly state we don't revalidate the certs on renewal
2024-04-01 19:24:07 +00:00
Michael Wilson 49c540caf1 Introduce plugins cleanup command line function. (#40035)
* Introduce plugins cleanup command line function.

tctl can now explicitly issue a plugins cleanup command, which will allow
admins to remove any extra artifacts that a plugin may have left behind
after being deleted.

* Add in a dry run command, list resources.

* GCI.

* Code cleanup, use ResourceID instead of string.

* Only allow okta cleanup, default to dry-run on.
2024-04-01 18:00:08 +00:00
Brian Joerger 4690eeab10 Keep App Session secrets secret (#39853)
* Don't reveal app session secrets to users.

* Fix panic in WebSessionV2.WithoutSecrets.

* Use client's key for azure jwt tokens

Proxy verifies and signs jwt tokens

Ensure backwards compatibility

* Remove unused GetAppSession methods.

* Move azure jwt token resigning logic into the session transport's
rewriteRequest method with an improved Azure app check

Fix GetAppSession backward compatibility check

* Add test.

* Address lint comments.

* Address parseBearerToken comment.

* apply suggestion about indentation.
2024-03-29 23:31:31 +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
Brian Joerger bbf447fe0d Move NewWebSessionRequest to lib/auth; add TODO. (#39741) 2024-03-28 23:59:45 +00:00