Commit Graph
27 Commits
Author SHA1 Message Date
Michelle Bergquist 6e1189da89 Use cloud anonymization key (#46819)
- When present, is used to anonymize events
2024-10-30 03:11:23 +00:00
matheus 6204578b68 Add LicenseAutoUpdate entitlement (#46959)
* Add LicenseAutoUpdate entitlement

* Update tests
2024-10-01 11:42:31 +00:00
Trent Clarke 736c86f88f Update AccessList Entitlement Enforcement to handle infinite limit (#44318)
* Update AccessList Entitlement Enforcement to handle infinite limit

The AccessList service was not correctly handling a zero-value limit
(i.e. an infinite limit) when checking to see if creating an
AccessList would breach the cluster Access List entitlement.

This patch:
 * Adds a centralized implementation of a limit check, so that we
   only have to get the calculation right once.
 * Tests for same
 * Updates the AccessList limit check to use the new limit check
 * Adds table-driven tests to exercise the limit check in various
   scenarios, replacing several almost identical tests.

* Review feedback
2024-07-18 06:40:46 +00:00
Michelle Bergquist c97533ed22 Surface entitlements to auth (#42932) 2024-07-09 16:04:48 +00:00
Michelle Bergquist 70b95e385d Surface Cloud Entitlements (#42394)
- Cloud entitlements are now available on Features
- Legacy logic applies if entitlements are not present
2024-06-28 00:22:13 +00:00
Alex McGrath 72f4a10366 Log information about second_factors removal at startup (#41416)
* Log information on second_factors removal at startup

* include upgrade instructions as a usermessage

* resolve comments
2024-06-05 20:56:07 +00:00
Alex McGrath 65459e872e Remove support for disabling second factor authentication (#40956)
* dont allow disabling second factor

* update docs for 2fa change

* add environmental variable to work around disabled 2fa

* check if its cloud

* update todos

* add a test

* introduce insecure test mode

* fixes for tests
2024-05-10 11:57:34 +00:00
rosstimothy 9734fcbdbd Convert SetSessionRecordingConfig usages to new Create/Update/Upsert API (#39249)
Migrates callers off the deprecated API and onto the new API so
that SessionRecordingConfig can be protected via optimistic locking
when appropriate.
2024-03-15 19:55:57 +00:00
rosstimothy 20888bf130 Convert SetAuthPreferences usages to new Create/Update/Upsert API (#38895)
Migrates callers off the deprecated API and onto the new API so that
AuthPreferences can be protected via optimistic locking when appropriate.
2024-03-14 22:05:20 +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
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Jim Bishopp 22e043c430 Add TestModules (#10369)
Allows tests to set fake values to be returned from modules.GetModules()
2022-02-15 21:54:40 +00:00
Brian Joerger 9b8b9d6d0c rollback - Upgrade api version. (#7751) 2021-07-30 15:34:19 -07:00
Brian Joerger c040aca4c1 Upgrade api version. (#7609) 2021-07-28 13:51:21 -07:00
Brian Joerger 917df5ad02 gRPC conversions - Auth Preference (#7220) 2021-06-18 12:30:56 -05:00
Andrej Tokarčík a92dcc3df4 Introduce modules.ValidateResource for Cloud-specific validation (#7092) 2021-06-07 10:31:55 -07:00
Sasha Klizhentas 013f9680c9 OSS RBAC
Implements RFD #7

https://github.com/gravitational/teleport/blob/master/rfd/0007-rbac-oss.md

OSS users can use roles. Some FedRamp related role options
are limited to enterprise.

All users are migrated to a new role "ossuser".

This role is a limited access role downgrading all users
from OSS role "admin".

All trusted clusters are mapped to "ossuser" as well.

Github connector maps teams to generated roles.

For transition period, format `tctl users add alice` works
alongside with `tctl users add alice --roles=admin`, but prints
a warning.
2021-02-17 17:04:03 -08:00
a-palchikov c7f494b3eb Test flakes: make tests reentrant (#5343)
* Make tests reentrant.
* Address review comments
* Bump e to release
2021-02-03 13:49:28 +01:00
Russell Jones bf0d76da84 Added support for admin user and token management.
Updated default admin rule in Enterprise to include KindUser: RW and
KindToken: RW permissions to allow admins to perform user and token
management.
2020-11-05 10:49:59 -08:00
Andrew Lytvynov 483153b4ec Plumb github username to TraitsFromLogins
This lets TraitsFromLogins to use that username for extra traits. No
changes in community edition, this will be used in enterprise.
2020-07-01 18:17:46 +00:00
Andrew Lytvynov 3f9b14b5f7 Add internal.kubernetes_users to kubernetes_users on admin role
With OSS version and without using the github connector (only local
auth), logged in user won't have any `kubernetes_groups`. Without
usernames too, user can login but can't use kubectl.
2020-04-24 16:23:18 +00:00
Alexander Klizhentas 73ecb48232 Adds support for kubernetes_users, extend interpolation (#3404) (#3418)
This commit fixes #3369, refs #3374

It adds support for kuberenetes_users section in roles,
allowing Teleport proxy to impersonate user identities.

It also extends variable interpolation syntax by adding
suffix and prefix to variables and function `email.local`:

Example:

```yaml
kind: role
version: v3
metadata:
  name: admin
spec:
  allow:
    # extract email local part from the email claim
    logins: ['{{email.local(external.email)}}']

    # impersonate a kubernetes user with IAM prefix
    kubernetes_users: ['IAM#{{external.email}}']

  # the deny section uses the identical format as the 'allow' section.
  # the deny rules always override allow rules.
  deny: {}
```

Some notes on email.local behavior:

* This is the only function supported in the template variables for now
* In case if the email.local will encounter invalid email address,
it will interpolate to empty value, will be removed from resulting
output.

Changes in impersonation behavior:

* By default, if no kubernetes_users is set, which is a majority of cases,
  user will impersonate themselves, which is the backwards-compatible behavior.

* As long as at least one `kubernetes_users` is set, the forwarder will start
  limiting the list of users allowed by the client to impersonate.

* If the users' role set does not include actual user name, it will be rejected,
  otherwise there will be no way to exclude the user from the list).

* If the `kuberentes_users` role set includes only one user
  (quite frequently that's the real intent), teleport will default to it,
  otherwise it will refuse to select.

  This will enable the use case when `kubernetes_users` has just one field to
  link the user identity with the IAM role, for example `IAM#{{external.email}}`

* Previous versions of the forwarding proxy were denying all external
impersonation headers, this commit allows 'Impesrsonate-User' and
'Impersonate-Group' header values that are allowed by role set.

* Previous versions of the forwarding proxy ignored 'Deny' section of the roles
when applied to impersonation, this commit fixes that - roles with deny
kubernetes_users and kubernetes_groups section will not allow
impersonation of those users and groups.
2020-03-07 16:32:37 -08:00
Russell Jones 09241c635e Added support for FedRAMP/FIPS 140-2.
Added "--fips" flag to "teleport start" command which can start
Enterprise in FedRAMP/FIPS 140-2 mode.

In FIPS mode, Teleport configures the TLS and SSH servers with FIPS
compliant cryptographic algorithms. In FIPS mode, if non-compliant
algorithms are chosen, Teleport will fail to start. In addition,
Teleport checks if the binary was compiled against an approved
cryptographic module (BoringCrypto) and fails to start if it was not.
If a client, like tsh, tries to use non-FIPS encryption, like NaCl,
those requests are also rejected.
2019-05-07 12:51:02 -07:00
Sasha Klizhentas dce45f1c4d Additional licensing hooks 2018-08-10 11:12:05 -07:00
Sasha Klizhentas 43cb9559a5 Add OSS support for kubernetes groups
* Add k8s-groups flag for tctl users add
* Add kubernetes_groups field in github connector
2018-08-06 17:21:21 -07:00
Roman Tkachenko c0cf7df7c9 Github connector 2017-12-14 13:41:38 -08:00
Roman Tkachenko 96a249de14 Rename plugins to modules 2017-10-16 16:55:39 -07:00