Commit Graph
638 Commits
Author SHA1 Message Date
Tiago Silva e06fc88e98 Extend Teleport RBAC to support Kubernetes Verbs (#27096)
* Extend Teleport RBAC to suport Kubernetes Verbs

This PR extends Teleport per-Resource RBAC to support Kubernetes verbs
restriction. With this change it's possible to restrict certain actions
allowed by the underlying `kubernetes_users` and `kubernetes_resources`.

Supported verbs:
- `get`
- `create`
- `update`
- `patch`
- `delete`
- `list`
- `watch`
- `deletecollection`

Fixes #27095

* address timr's comments

* assign wildcard to verbs for role <7

* address marco's reviews
2023-07-06 15:39:11 +00:00
Michael Wilson 6140bdc7cd Introduce Access List internal object. (#28479)
* Introduce Access List internal object.

The Access List internal object has been introduced. This object will be used
for backend storage and JSON/YAML unmarshaling.

This PR introduces a few concepts:

* Access List is intended to be created with a builder.
* Access List is a regular struct instead of an interface.
* There are common objects, which are largely copies of their current protobuf
  counterparts, that also have builders.
* These common builders can be integrated with regular resource builders, like
  the access list builder.

* Linting fixes.

* More linting.

* Remove builder.

* Modify to match most recent proto updates.

* Move IsValidLabelKey back to common.

* Tuning of function named returns, add in tests for IsValidLabelKey, expand IsValidLabelKey comment.

* SetKind/SetVersion at the end of CheckAndSetDefaults.

* Remove pointers from AccessList/Header objects.

* Move SetKind/SetVersion back to beginning of CheckAndSetDefaults.
2023-07-06 13:30:42 +00:00
Marco André Dinis 37243f8fa4 Script to configure IAM for the DeployService (#28436)
* Script to configure IAM for the DeployService

* use any instead of interface{}

* fix test typo
2023-07-04 15:10:00 +00:00
Alan Parra 52bba4ffa2 fix: Use correct sync defaults and validation (#28540)
* fix: Use correct sync defaults and validation

* Update generated protos
2023-06-30 20:21:06 +00:00
Tiago Silva a5df89e2f6 Extend Per Kube resource RBAC (#26244)
* Generalize Kubernetes Resource RBAC

This PR generalizes the work introduced by #19613 to other resources
existent in the Kubernetes API.

It allows restricting access to different Kubernetes resources using a
single `kubernetes_group`.

`kubernetes_resource.kind` supports `*` and the following resources:
  * Deployments
  * Statefulset
  * Secrets
  * Configmap
  * DaemonSet
  * Job
  * CronJob
  * Namespace
  * Services
  * Nodes
  * ReplicaSets
  * Roles
  * RoleBindings
  * ClusterRoles
  * ClusterRoleBindings
  * PersistentVolumes
  * PersistentVolumeClaims
  * Ingress
  * Certificates
  * ServiceAccounts

Part of #20811

* address zac's feedback
2023-06-29 17:08:52 +00:00
Brian Joerger f7bd643652 * Enable headless authentication event watch. (#28234)
* Add WatchPendingHeadlessAuthentications rpc.
2023-06-28 18:03:53 +00:00
Brian Joerger ea0a2933ac Add username to headless authentication backend key. (#28222) 2023-06-27 16:40:08 +00:00
Trent ClarkeandMarco André Dinis 10dd64681a Adds automatic approver user for use with access plugins (#27829)
* Adds automatic approver user for use with access plugins

Adds an internal user `@teleport-access-approval-bot` with the associated
role `@teleport-access-approver`. This new role has grants the right to
approve any and all role access requests, and both the user and role
resources are automatically created on startup if not already present.

While the `@teleport-access-approval-bot` should under no circumstances
be allowed to log into the cluster or appear in UI user listings of any
kind (except as the approver in an access request), this PR does not
implement any or the requisite filtering or enforcement. This is coming
in a future PR.

* Don't crash when building OSS

* fix test fixup

* Adds labels to the Preset approval bot user

Also ads basic update functionality for preset users, and tests
for same.

* typo fix

* Commentary

* linter appeasement

* Update tests

* Update docs

* Post-merge cleanup

* Update lib/auth/init_test.go

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

* Address review feedback

* Filter out user in WebUI and plumb Teleport user through

---------

Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
2023-06-24 00:25:05 +00:00
Marco André Dinis 48a113bb93 InstallScripts: pin teleport version using ServerVersion (#28149)
* InstallScripts: pin teleport version using ServerVersion

When Automatic Upgrades are enabled and the current installation is an
enterprise build, it will install teleport using:
- stable/cloud repo channel (yum, apt)
- pin the version to the one present at:
  https://updates.releases.teleport.dev/v1/stable/cloud/version

* improve comments
2023-06-23 15:45:36 +00:00
STeve (Xin) Huang 274db4a3f9 Support assume_role_arn for database dynamic resources (#28039)
* Support assume_role_arn for database dynamic resources

* remove DatabaseResourceMatchers

* fix loop and add more tests
2023-06-23 14:25:01 +00:00
Alex McGrath e2b76bb04f Add option to allow for host users not to be deleted (#26892)
* Add option to allow for host users not to be deleted

This adds a new role option called create_host_users_mode which allows
for it to be configured to not delete users when a session ends. The
old `create_host_user` option will be deprecated with this.

If the deprecated option is set, the new mode option will default to
dropping users as is the current behavior.

* add generated protos

* use combined output for commands, dont set CreateHostUser

* fix tests

* ci fixes

* add godocs to HostUserMode constants, fix tests

* remain -> keep

* Use an enum instead of a string

* fix merge errors

* Add tests & resolve comments

* Resolve issues

* fmt
2023-06-23 13:35:57 +00:00
Trent ClarkeandRoman Tkachenko a7252794d4 Changes to PagerDuty plugin to support running as a hosted plugin (#28021)
* Changes to PagerDuty plugin to support running as a hosted plugin

The major structural change is to provide a new PagerDuty app constructor
that allows the auth server to inject a Teleport client, rather than the
plugin automaticaly creating a GRPC client on startup.

Other changes include:
 - Added more PagerDuty API types
 - Extra logging
 - Small refactors here & there

* Update integrations/access/pagerduty/app.go

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

* Shorten PagerDuty typenames

* Address review feedback

- Moved API URL to plugin parameters
- Removed obsolete settings loader

* Address @marcoandredinis' review feedback

---------

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2023-06-21 13:31:10 +00:00
Alex McGrath 0760bc9776 Allow setting max_session_ttl from clusterauth preferences (#26824)
Document `default_session_ttl` in the reference.
2023-06-21 10:39:34 +00:00
3a0a7f87e2 Add reviewer and requester roles. (#27673)
* Add reviewer and requester roles.

Reviewer and requester roles have been added to allow for easy defaults for
reviewing and requesting applications and user groups for the Okta service.

* Update comments, add in requester/reviewer references all over docs.

* Update constants.go

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

* Better names in resource-requests.mdx, no options for reviewer/requester presets.

* Add dbreviewer to cspell.json.

* Update init_test.go to handle the new number of presets.

* Remove access review/request role creation from resource-requests.mdx.

* Improve wording.

* Only add reviewer/requester/group access if in enterprise.

* Docs updates.

* Remove errant scoped block.

* Tune access controls getting started.

* Prevent customer roles from being overwritten by new defaults.

* Apply suggestions from code review

Co-authored-by: Nic Klaassen <nic@goteleport.com>

* Doc updates, function name updates, bootstrap label behavior changes.

* Adjust TeleportManagedLabel comment to sound less dire.

* Remove unnecessary references to reviewer/requester in the docs.

* Apply suggestions from code review

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

* Docs tweaks, removal of unnecessary login setting.

* Use internal resource type as discussed offline.

* Update api/types/constants.go

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

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Nic Klaassen <nic@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2023-06-20 17:21:16 +00:00
Mike Jensen 3f6e26ae07 Fuzzing test improvements (#28066)
* Remove lib/fuzz

These fuzz targets are already configured elsewhere.  oss-fuzz targets are configured in `fuzz/oss-fuzz-build.sh`

* aws_test.go: Add FuzzParseSigV4

This adds (and enables in oss-fuzz) a new fuzz test case (and seed) for aws.go's ParseSigV4

* api/types/fuzz_test.go: Add fuzzing seeds

* api/utils/aws/fuzz_test.go: Add basic seeds to get broad coverage

* api/utils/azure/fuzz_test.go: Add seeds and enable in oss-fuzz

* lib/utils/parse/fuzz_test.go: Add fuzzing seeds

* Add opensearch fuzzing to oss-fuzz

* lib/srv/db/redis/connection/fuzz_test.go: Add fuzzing seeds

* lib/kube/proxy/fuzz_test.go: Add fuzzing seeds

* lib/srv/regular/fuzz_test.go: Add Fuzzing Seeds

* lib/utils/fuzz_test.go: Add fuzzing seeds
2023-06-20 16:14:15 +00:00
Marco André Dinis 782c385ef9 AWS OIDC Integration: Deploy DB Service in a single click (#27035)
* AWS OIDC Integration: Deploy DB Service in a single click

This PR adds a new AWS OIDC Integration action: deploy database service

This uses Amazon ECS to deploy a Database and a Discovery Service in a
single click.
Please read `lib/integrations/awsoidc.DeployDBService` for more
information.

* set discovery group to uuid

* add agent matcher labels

* add tags to indicate ownership

* create deployment mode

* allow for dot named clusters

* rename service and taskdefinition to include deployment mode

* add ECS service dashboard url to the response

* change ownership tags

* remove delete service api call

* fix json indent in comment and iam token name
2023-06-20 11:07:25 +00:00
Alan Parra 52e357f1cc Add a delete confirmation step to SyncInventory (#27906)
* Change SyncInventory streams to track missing devices

* Update generated protos

* Convert new device profile fields

* Update fileconf.go example
2023-06-16 17:55:57 +00:00
Michael Wilson 4bc2c04e63 Add mapping between user groups and applications. (#27812)
* Add mapping between user groups and applications.

Within Okta, user groups can assign permission to many applications and
applications can belong to many user groups. This commit establishes that
mapping so that the Okta service can perform more user friendly access
requests by adding all applications from a user group to the access request
and additionally allowing application access requests to request associated
user groups as well.

* Adjust NewUserGroup to take a spec.
2023-06-16 17:52:31 +00:00
Krzysztof Skrzętnicki 1b69fbcbed OpenSearch AWS autodiscovery (#27537)
* OpenSearch AWS autodiscovery

* Normalize description, check err.

* Fix tests.
2023-06-16 12:56:53 +00:00
Alan Parra eb65bddc46 Omit empty fields from DeviceCredential resources (#27821)
* Set "omitempty" in optional credential fields

* Update generated protos

* Use "" as the value for DEVICE_ATTESTATION_TYPE_UNSPECIFIED
2023-06-14 19:56:30 +00:00
Sakshyam Shah 6280532ffe fix: update equality nil check in settings.Jamf (#27814)
* fix: update equality nil check

* add tests
2023-06-14 03:47:48 +00:00
Sakshyam Shah 0a0033be23 fix: set jamf plugin default checks to include PluginStaticCredentialsRef (#27616)
* fix: set jamf plugin default checks to include PluginStaticCredentialsRef

* add labels check. move apiendpoint check to default checks

* check if setting is not nil
2023-06-13 15:19:18 +00:00
Michael WilsonandMichael 1b3201a97c Add the notion of friendly names to access request details. (#27495)
* At the notion of friendly names to access request details.

Access request details can now return friendly names. This will help display
access request resources in a way that allows easier reviewing of Okta apps
and user groups, where the names are not human readable.

* Use friendly name for nodes, tune variable names.

* Add in DetailsID helper function for use by the enterprise UI.

* Request apps instead of app servers, remove DetailsID as its no longer needed.

* Push friendly name into app and usergroup UI objects.

* Fix apps test.

* Linting.

* [Connect] Add FriendlyName to AccessRequest (#27694)

---------

Co-authored-by: Michael <michael.myers@goteleport.com>
2023-06-13 14:02:16 +00:00
Tiago Silva 5bf67192e2 Introduce version v7 to Role resources (#26583)
This PR introduces a new role version - `v7` - to support other
Kubernetes resources such as `Deployments`, `Statefulsets`... while
keeping compatibility with previous role versions.

This PR adds the following validations:
- `v6`, `v5`, `v4`: `kubernetes_resources` can only include `kind: pod`
  resources
- `v7`: `kubernetes_resources` can include wildcards or other
  resourceces (to be introduced by #26244.

It also adds a role version downgrade (v13 clients connecting to v14
auth server) where we downgrade the role's version and remove unsuported
kubernetes_resources from the resource list.

Part of #20811
2023-06-13 08:21:42 +00:00
Noah Stride 87ab3ffe37 Add Proto types for storing TPM Platform Attestation in Collected Data (#27680)
* Add types for storing Platform Attestation

* Add to/from resource conversion

* Use bytes for nonce field

* Tidy up usage of pointers

* Ensure tests cover multiple entries

* Adjust comments as per PR review
2023-06-12 16:13:26 +00:00
Lisa Kim 0b2cef80bd Add opsgenie static credentials check and test (#27655)
* Pass down form value name field to react selectable input

* Add opsgenie static validation check and test
2023-06-09 18:35:45 +00:00
rosstimothy 553eb02bdf Fix moderated session presence checking (#25988)
* Fix moderated session presence checking

Addresses all of the issues that were preventing presence checking during
moderated sessions from working as described in
[#18092](https://github.com/gravitational/teleport/issues/18092#issuecomment-1540900859).

Closes #18092

* make presence test clearer

* fix presence checking on the web ui

* Refactor web socket message handling

A single message processing loop handles retrieving the envelope
and passing it off to individual message handlers. This allows all
messages to be processed outside of `Read` which was dependent on
the terminal being active to process any messages.

The webauthn challenge response was also moved from a raw message
to a webauthn message. By sending it as a raw message it made
presence checking fail because the response has a `t` in it which
caused the session to be killed during moderated sessions.

* enforce mfa ceremony when joining and cluster wide mfa is enabled

* fix conflicts with master

* moderated tests

* Add moderated session tests for the UI

* Add moderated session integration test

* fix lints

* clean up presence test

* refactor envelope handling

* fix build

* fix: revert test debug timeout

* fix: use local context in tests

* simplify closing streams

* generalize waitForOutput to work with an io.Reader

* fix error handling in stream close

* unexport PresenceOptions

* Improve waitForOutput to match against output in successive reads
2023-06-08 20:27:13 +00:00
Nic Klaassen caf629af1e feat: extend label expression syntax (#27312)
This commit adds the new function `labels_matching` to the label
expression syntax. It accepts a Teleport-style glob or regular
expression, and returns the aggregate of all values for keys matching
that expression.

Since it is now more likely for users to want to compare two slices,
I've also added the `contains_any` and `contains_all` functions to
complement the existing `contains` function.

This commit also adds the `email.local` function that is already
available in role templates and should be useful.

Some examples are included in the new test cases.
2023-06-08 15:43:11 +00:00
Nic Klaassen 1b2c6f0bab back compat improvements for label expressions (#27244)
- downgrade roles with label expressions for older clients
- add teleport.internal/downgraded label to downgraded roles
- block UpsertRole if inventory contains servers without label expression support
2023-06-07 23:29:42 +00:00
Nic Klaassen 441e5eb734 feat: partial label expression support (#26638)
* feat: partial label expression support

This commit implements support for label expressions (RFD 116) with the
exception that user traits can not yet be used in the expressions.
The user traits will be made available to the expressions in a following
PR.

* explicitly compare role condition with Allow

* add comment on label matcher templating

* reuse labelMatchersUnset loop

* improve debug messages
2023-06-07 22:49:28 +00:00
Marco André Dinis 0c28f8749c Move Cloud Matchers to proto (#27162)
* Move Cloud Matchers to proto

As described in RFD0125, we are going to create a new resource:
DiscoveryConfig

This new resource will contain the Cloud Matchers as spec fields:
- AWSMatcher
- AzureMatcher
- GCPMatcher

To define grpc methods that use this new resource, we must create all
the matchers types as part of the proto definition.

This PR moves those definitions into types.pb.go and removes them from
`lib/services.{AWS,Azure,GCP}Matcher`.

This should have no side effect in business logic given that we re-use
the same field names everywhere.

* remove most of gogo tags

* Revert "remove most of gogo tags"

This reverts commit 5ecf8d0cec.

* fix typos
2023-06-06 19:02:58 +00:00
Sakshyam Shah 796b2d29a0 device trust marshalers (#24963)
* feat: device resource in tctl get all

* check for device resource but ignore in favour of enterprise resource migration

* add firstStart indicator in auth service config. Tests

* remove device bootstrap from this PR

* multiple updates:
- remove resource marshaler, this will be added to e repo instead
- remove device resource checks in oss (not needed as resource marshaler now added to e). tests removed

* move device marshalers to service package

* run fix-imports, fix test

* remove device case from itemsFromResource
2023-06-06 17:29:49 +00:00
Gabriel Corado a200271ac5 Support authenticating with AWS IAM role for MongoDB Atlas (#26439)
* feat: support authenticating with AWS IAM for MongoDB Atlas

* chore(lint): fix errors

* test(tsh): add missing database field

* refactor(mongodb): check for error on each authenticator branch

* refactor(mongodb): update log messages and atlas check

* refactor(auth): use IsRoleARN helper instead of IsARN

* chore(db): remove unused line

* chore(mongodb): split authenticator func

* refactor(db): rename get atlas token function

* tests(db): reuse already existent auth property

* chore(mongodb): add docs reference

* refactor(db): support role chaining

* feat(types): "require" iam role for atlas users

* refactor(db): use external id only on the first session

* refactor(services): add new database matcher for regular users and aws

* chore(db): rename functions to be more assertive

* chore(types): fix lint

* test(db): remove duplicated test

The test being removed here is covered by `TestMongoDBAtlas`
(lib/srv/db/auth_test.go).
2023-06-06 14:57:27 +00:00
Tiago SilvaandZac Bergquist f2a9311f4d Extend host lock enforcement to other built in roles besides Node (#27018)
This PR extends Teleport support for applying `tctl lock
--server-id=<host_id>` for other builtin roles besides `RoleNode`.

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-06-05 17:08:18 +00:00
Tiago Silva 04774100cc Add endpoints to export AuditEvents as unstructured data (#27026)
This PR adds a new gRPC service `AuditLogService` that allows clients to
request audit log events as unstructured data. Data is returned as
`structpb.Struct` representation which is convertible to JSON.

Unstructured data allows clients to receive audit events without
prior knowledge of their proto wire representation if their end goal is to
export the events as JSON to an upstream service. It allows clients
whose version is older than Auth's version to receive events that their
proto version doesn't support. Exporters can continue operating without
losing events or having to upgrade them each time Auth is upgraded.

Part of https://github.com/gravitational/teleport-plugins/pull/821
Part of https://github.com/gravitational/teleport/issues/23388
2023-06-02 14:49:42 +00:00
Michael Wilson 4ec3b4fd4a Add static credentials reference to plugin credentials. (#27179)
* Add static credentials reference to plugin credentials.

To support static plugin credentials, the plugin credentials have been given
a reference to static credentials that takes a set of labels. The additional
gRPC and backend work will be added in a follow on PR.

* Add static credentials to the plugin service.

* Correct misnumbered field in credentials ref.

* Okta requires static credentials.

* Update plugin tests.
2023-06-01 17:06:57 +00:00
Michael WilsonandSakshyam Shah bb4212c95d Introduce the Plugin Static Credentials object. (#27121)
* Introduce the Plugin Static Credentials object.

The Plugin Static Credentials object has been introduced to support storing
static credentials for plugins. The backend supporting the plugin static
credentials has been introduced as well.

Related RFD: https://github.com/gravitational/teleport/pull/26599

* Use MatchLabels instead of a custom rolled one, use named arguments for plugin static credentials interface, add type to error message.

* Remove ok references from credentials objects.

* Use protojson instead of jsonpb.

* Rename header unmarshal function.

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

Co-authored-by: Sakshyam Shah <sshah@goteleport.com>

* Update api/types/plugin_static_credentials.go

Co-authored-by: Sakshyam Shah <sshah@goteleport.com>

* Use OAuth instead of Oauth, rename functions.

* Correct initialism.

* Use protojson instead of jsonpb, add an explanatory comment in MessageWithHeader.

---------

Co-authored-by: Sakshyam Shah <sshah@goteleport.com>
2023-05-31 15:11:36 +00:00
Edward DowlingandRoman Tkachenko f07b291d44 Add opsgenie plugin (#25995)
* Move opsgenie client code to integrations/access

* Add initial opsgenie bot skeleton and stubs

* Add opsgenie check and set default to pluginv1

* Fix check and set defaults for opsgenie plugin config

* Fill out bot stubs for opsgenie bot

* Add loadOpsgenieConfig to integrations

* Swap to using bearer token for opsgenie plugin

* Fix formating in opsgenie bot

* Reorder imports to fix lint errors

* Add config field to plugins to allow for different recipient logic

Allows bots that use schedules as recipients to determine their own
logic for defaulting etc

* Add notimplemented err for check health for opsgenie bots

* Add check health to opsgenie client and bot

* Rename recipientsAreSchedules to usersAsRecipients

* Add pluginBearertokencredentials checkAndSetdefaults

* Add resolveAnnotations to reqdata and use schedules from that

* Update integrations/access/opsgenie/bot.go

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

* Prevent default schedules being processed if annotations are set

* Remove loadOpsgenieConfig

* Rename opsgneie addr field

* Add more verbose error messages to opsgenie client

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

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

* Update integrations/access/opsgenie/bot.go

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

* Fix error message for recipients field in opsgenie bot

* Change apiEndpoint field name

* Remove check for unused field from opsgenie config

* Remove usersAsRecipients flag

* Reserve addr and change change field number of api_endpoint

* Update integrations/access/opsgenie/client.go

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

* Rename reqAnnotationresponderskey to reqannotationscheduleskey

* Remove unused check and set defaults

* Rename REqAnnotationScheduleskey

* Use types.Labels alias where possible

* Simplify loop in opsgenie bot to satisfy linter

---------

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2023-05-31 12:40:55 +00:00
Rafał Cieślak 5771694678 Expand Go docs for label prefixes (#27076)
* Expand docs for label prefixes

* Move const group with hidden and internal closer to dev
2023-05-30 09:22:59 +00:00
Noah Stride f330bd0bee Device Trust: TPM Enrollment support EKCerts (#27070)
* Send EKCert if one is present

* Consistent naming

* Add configuration types for EKCertAllowedCAs

* Add fileconfig support for EKAllowedCAs

* Add test cases for fileconf loading and parsing

* Rename helper functions for consistency

* Correct GoDoc format

* Add source URL for pem file
2023-05-29 18:42:41 +00:00
Alex McGrath c644142698 Lint the discovery script templates (#27002)
* lint discovery scripts

* fix tests
2023-05-28 22:50:35 +00:00
Michael Wilson 658080afcd Add new role defaults to allow requesting and reviewing user groups. (#26644)
* Add new role defaults to allow requesting and reviewing user groups.

User groups are now default requestable by the access role and default
reviewable by the editor role. This will make the onboarding experience
for the Okta service much easier, as there will be no need to set up
new roles to support it.

A new role called group_access has also been added to support it, which
allows read access to all groups.

* Tweak group access name, add in IsEmpty functions, add in tests for AddRoleDefaults.

* Only inject access request/access review conditions if the build type is enterprise.

* Add in tests for enterprise role logic.

* GCI.
2023-05-26 21:13:26 +00:00
rosstimothy 2f78bf4b7c Extend AccessCapabilities (#26968)
`tsh login` was fetching each role for a user during login to perform
calculations required to determine if auto access requests were
required. To reduce some of the login latency this logic was moved
to `proto.AuthService/GetAccessCapabilities` so that only a single
RPC to Auth is required instead of one per role.
2023-05-26 18:09:06 +00:00
Edoardo Spadolini 571477fe5a protobuf changes in preparation for buf breaking (#26792)
* Use WIRE_JSON in buf breaking

* Add some field reservations for backwards compat
2023-05-26 13:53:07 +00:00
Michael Wilson 8db86033bc Search user groups by description. (#26858)
User groups are now searchable by description, which will make searching by
human readable strings possible.
2023-05-26 13:30:33 +00:00
Nic Klaassen 0412303956 feat: label expression protobuf types (#26633)
This commit adds the protobuf types for label expressions, as described
in RFD 116.
2023-05-25 22:13:16 +00:00
Alex McGrath eab8880079 Add a watcher for agentless EC2 nodes (#25477)
Resolve comments

Remove the agentless watcher and re-use the existing ec2 watcher

Fix getMostRecentRotationForCAs logic

use the clustername from conn.ClientIdentity

get instances once initially and then only from channels

After or Equal last rotation when fetching nodes

resolve comments

Remove the ca rotation watcher and rely on the timer

Resolve comments

resolve comments
2023-05-25 10:12:34 +00:00
Justinas Stankevičius e46275eedc Stop using TokenPath for API key in Assist (#26671) 2023-05-24 20:31:56 +00:00
Alan Parra 288d821fc7 Add MDM and TPM fields to device resources (#26809)
* Add MDM and TPM fields to device resources

* Update generated protos

* Add new fields to device/resource conversions

* Test conversions for all enum values

* s/ResourceEnrollStatusToString/ResourceDeviceEnrollStatusToString/g
2023-05-24 14:10:02 +00:00
Michael Wilson fe6e04461a Introduce group and app name Okta import rule regexes. (#26561)
* Introduce group and app name Okta import rule regexes.

Okta import rules now support regex name matching. This will allow for
matching any group or application which conforms to a given regex, which
will make generating import rule matches less verbose as users won't have
to list out groups and applications by ID.

Validation of regexes happens at create and update time. This is to avoid
compilation of regexes every time an Okta Import Rule unmarshaled. The Okta
service will compile these regexes as needed.

* Use multiple regexes instead of just one.
2023-05-23 18:29:22 +00:00