25 Commits

Author SHA1 Message Date
Kevin 61a403fab9 Remove unused parameter from access plugin NewApp (#66539) 2026-05-11 18:25:26 +00:00
rosstimothy 02a1b0b537 Inject modules into the auth server (#62858)
Contributes to https://github.com/gravitational/teleport/issues/62799.
2026-04-09 20:54:27 +00:00
rosstimothy 6590c944b6 Inject modules into keygen (#62843)
Contributes to #62799.
2026-01-16 18:52:50 +00:00
Kevin 4713ff1c89 Refactor access list test cleanup (#61058) 2025-11-05 20:03:07 +00:00
Kevin d3782a8737 Fix slack plugin crashing if access lists feature is not supported (#60486)
* Modified access list app reminders to gracefully return if NotImplemented

* Added test coverage for slack plugin crash fix

* Update log output

* Remove unused code
2025-10-27 23:28:25 +00:00
rosstimothy 8f56697f76 Migrate all tests to use lib/auth/authtest helpers (#57030)
Removes the auth test helpers in lib/auth/helpers.go and
lib/auth/helpers_mfa.go and converts all tests to use the
equivalent helpers from the authtest package.

The e reference was also updated to include https://github.com/gravitational/teleport.e/pull/6932.

Updates https://github.com/gravitational/teleport/issues/51023.
2025-07-24 18:27:14 +00:00
Pawel Kopiczko f0b69e596f Ensure access_list.spec.type immutability (#56689)
* Ensure access_list.spec.type immutability

* Add coverage for DeprecatedDynamic
2025-07-21 16:16:00 +00:00
Pawel Kopiczko e3f5403309 AccessList: Restore (deprecated) "dynamic" type for compatibility (#56879) 2025-07-17 15:16:52 +00:00
rosstimothy 2afdce29c5 Introduce modulestest package (#56721)
The new package is meant to house a test friendly implementation
of modules.Modules. Due to the pervasive and global nature of
modules, this package also contains a copy of of
modules.SetTestModules. In a perfect world this function wouldn't
be needed and modules would be injected where required, however,
that would take considerable effort. The existing test modules
are temporarily left in place until the enterprise tests can be
updated to use modulestest.
2025-07-14 21:55:07 +00:00
Pawel Kopiczko 6dac0f5b2a AccessList.Spec.Type: Rename ImplicitDynamic -> Default ; Remove Dynamic (#56657) 2025-07-10 14:48:15 +00:00
Pawel Kopiczko ac82294e91 Disable notifications for non-dynamic Access Lists (#56399)
* Disable notifications for non-dynamic Access Lists

* Add godoc and use AccessList.IsReviewable
2025-07-03 21:03:54 +00:00
Zac Bergquist e4b45109a0 Modernize integrations (#55876)
$ go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test -fix
2025-06-18 17:39:13 +00:00
Alan Parra 108d736eec chore: Bump github.com/jonboulle/clockwork to v0.5.0 (#51434)
* Update e/ reference

* chore: Bump github.com/jonboulle/clockwork to v0.5.0

* Rewrite clockwork.FakeClock to *clockwork.FakeClock

* Fix lib/srv/app/gcp/handler_test.go

* Add a linter exception for FakeClock.BlockUntil

* Change AppTestOptions.Clock to clockwork.Clock
2025-01-24 15:22:13 +00:00
rosstimothy cca83feb66 Convert integrations to use slog (#50921) 2025-01-10 16:08:42 +00:00
Edoardo Spadolini a92e49fc74 Use thread-local RNGs for jitters (#48860)
* Use math/rand/v2's thread-local RNG for jitters

* Replace NewJitter() with DefaultJitter

* Replace NewFullJitter() with FullJitter

* Replace NewHalfJitter() with HalfJitter

* Replace NewSeventhJitter() with SeventhJitter

* Inline jitters in lib/utils/diagnostics/latency

* Replace var jitters in lib/utils with proxy functions

* Replace utils.HalfJitter with retryutils.HalfJitter

* Replace utils.FullJitter with retryutils.FullJitter

* Replace utils.SeventhJitter with retryutils.SeventhJitter

* Replace sharded jitters with thread-local ones

* Remove NewSeventhJitter reference in integrations
2024-11-13 16:35:09 +00:00
Alex McGrath fa97b8f90d feat: Allow including Access Lists as nested members and owners (#38738)
- Recursively check for accesslist membership

- Allow adding/removing/listing included access lists in acl commands

- Add a recursive test

- Use dynamic access lists structure from RFD

- Resolve proto changes

- Exclude 'list' members from Access List memberCount

- Calc Access List member count with members of type 'list' excluded,
  return seperately to front end

- Update examples/integrations

- Update crd docs

- Update tf docs

- Perform calculation of inherited roles/traits to AccessList service in
  order to utilize cache and minimize number of requests.

- Grant Okta integration RO for Access Lists

- Update AccessListMember-* events

- Include count for inherited grants

- Include MembershipKind of affected member(s)

- Emit inherited grants / members' MembershipKind for AccessListMember-*
  events

- Update notified owners for Access Requests

- Ensure dynamic owners are notified for Access Requests

- Ensure dynamic owners are notified via Slack integration

- Optionally pass an AbortSignal to `fetchAccessLists` in Web UI

- Replace usages of `services.IsAccessListOwner/IsAccessListMember` with
  equivelant funcs from `Hierarchy`

- Remove final references to AccessListMembershipChecker

- Don't allow ACL deletion when member/owner in other lists

- Guard Access List deletion behind membership/ownership checks for List

- Expose Hierarchy func to recursively get all members

- Tidy UserLoginStateGenerator logic involving ACL Membership/Ownership

Co-authored-by: Maxim Dietz <maxim.dietz@goteleport.com>
2024-11-01 22:07:36 +00:00
Bernard Kim e9f296fc0f Implement auto-approvals for datadog (#47475)
* Implement auto-approvals for datadog

* Address feedback

- Use standard teleport.dev/schedules annotation
- Link Datadog API docs

* Check annotations before api calls
2024-10-16 02:16:58 +00:00
Lisa Kim cdc35489b1 Batch access list review reminders and provide link (slack) (#43782)
* Batch access list review reminder (slack)

* Address CRs

* Address CR 2

* Fix lint
2024-07-10 18:54:24 +00:00
Hugo Shaka 90392ca700 Make access plugin tests work with mandatory 2fa (#41412)
* Make access plugin tests work with mandatory 2fa

* fix Access List reminder tests

* lint
2024-05-10 15:13:42 +00:00
Hugo Shaka a24216e166 Prepare teleport access plugin enterprise test suite (#40479)
* Make AuthHelper support enterprise

* Split access OSS and Enterprise tets suites

* fix slack tests

* fix race in accesslist reminder tests

* fixup! fix race in accesslist reminder tests
2024-04-11 21:37:11 +00:00
Michael Wilson bc696e3923 Fix the access list reminder pagination loop. (#36228)
* Fix the access list reminder pagination loop.

On error in the access list reminder pagination loop, the loop now breaks
instead of continuing, which is the intended behavior. A test has been added
to exercise this. This test will time out with the previous behavior. A light
refactoring has been done to make it easier to mock the ListAccessLists
response.

Users running their own Slack plugins (outside of cloud) were running into an
issue here due to the plugin user not having permissions to read access lists.
On cloud tenants, the plugins should have this access, so the impact there is
minimal.

Additionally, the docs have been updated to include the access list
permissions.

* Test fixes.

* Tests are more consistent.

* Update docs/pages/includes/plugins/rbac-with-friendly-name.mdx

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

* Add in initial duration/trigger.

* Output migration instructions, add jitter back in.

* Don't return error when no recipients.

* Tune the error return.

---------

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2024-01-08 15:55:08 +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
Michael Wilson 2dbb2b4d4b Access list app in plugin ceases to run when endpoints not implemented. (#34669)
When access list endpoints are not implemented, the access list app in the
access plugins will cease to run. This could happen if the integration is
being run against an open source server.
2023-11-16 20:39:31 +00:00
Michael Wilson f1c3fae146 Add Slack access list reminders. (#34461)
* Add Slack access list reminders.

Access list review reminders will now be sent to owners via Slack every week
until the access list is reviewed. Some small modifications were made to the
access list application to support partial success. Additionally, some changes
were made to the way access applications are instantiated to maintain
compatibility with enterprise.

* Tweak error returns, debug statements.

* Notify once per day after the next audit date has passed, remove access list name from slack notifications.

* Fix for day notifications.
2023-11-16 15:34:45 +00:00
Michael Wilson 30490419f7 Introduce scaffolding for access list Slack notification. (#33415)
* Introduce scaffolding for access list Slack notification.

The initial scaffolding for notification of the need for reviews for access
lists has been introduced. This is not expected to do anything just yet, but
will do so in a follow on PR.

This has additionally separated the plugin data from the dynamic access core,
as it no longer is tightly coupled to access requests. No effort was made to
refactor the existing plugin data backend logic.

* Ensure that the context is cancelled on process termination.

* Remove debug hour addition.

* Correct notification date calcs, add test for notifications.

* Expire the access list after two weeks, use a single map instead of multiple plugin data keys.

* Run GCI.

* Tune tests, retry period is now a duration.

* Get rid of gocron, use intervals, test using intervals.

* GCI.

* Renames, test tweaks.

* Refactor access plugins.

* GCI.

* Adjust tests, remove generics, plugin data uses JSON marshal instead of custom marshaling.

* Move recipient back to common.

* Missed a few recipients imports.

* Tweaks to logic, auto registration of apps, commenting and cleanup.
2023-11-09 17:14:20 +00:00