Commit Graph
5 Commits
Author SHA1 Message Date
rosstimothy 86b8ce5049 Convert lib/resourceusage to use slog (#50311) 2024-12-17 13:30:33 +00:00
Zac Bergquist 44a6bb1933 Use pkg slices from the standard library (#35905)
Prefer the stdlib version of the experimental package.
Includes a depguard update to prevent future regressions,
as well as an e-ref update to appease depguard.

Generated with:

    $ gofmt -w -r '"golang.org/x/exp/slices" -> "slices"' . && \
        make fix-imports
2023-12-19 23:06:53 +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
rosstimothy d5a796c056 Enable testify lint (#34222)
Updates our golangci-lint configuration to enable testifylint and
fixes all issues found.

Bump e ref to include gravitational/teleport.e#2567
2023-11-06 20:38:38 +00:00
Justinas Stankevičius 96f3df96b1 Enable limited Access Requests feature for the Team plan (#29866)
* Add access request monthly limit to Features

* Add a method to retrieve usage of Access Requests

* Verify access request limit when creating

* Remove AccessRequestsFeature.Enabled

Feature is always enabled now, the flag serves no purpose

* Expose usage of access requests in auth server

* Reimplement access request usage using audit log

* Disallow unauthenticated access to resource usage

* Tidy proto structures

* Start enforcing access request limit in auth

* Run GCI

* Add a license header to usage_test.go

* Add missing godoc

* Restructure usage proto per PR comments

* Construct proto.AccessRequestUsage in getARMU

* Reduce log level when encountering an unexpected event

* Simplify return

* Add godoc to GetResourcesUsage in client

* Fix merge mess-ups

* Count all requests, no matter their review state

* Factor out GetAccessRequestMonthlyUsage

* Move out resource usage to its own service

* Validate the limit after dry run is done

Unbreak UI when the limit is up

* Fix imports

* Remove Limit

SearchEvents will default to defaults.EventsIterationLimit

* Rename the service proto

* Add godocs to the gRPC service

* Move resource usage to a dedicated package

* Define single GetUsage rpc for all resource types

* Additions for limited access requests UI rework

* Add a test for GetAccessRequestMonthlyUsage

* Address lint

* Run GCI

* Add licenses where missing

* Expect CTA_UNSPEICIFED rather than `undefined`

* Expect CTA_UNSPECIFIED instead of undefined
2023-08-16 17:20:34 +00:00