Skip to content

Add access lists, members, and reviews to cache.#36020

Merged
mdwn merged 3 commits intomasterfrom
mike.wilson/access-list-cache
Jan 5, 2024
Merged

Add access lists, members, and reviews to cache.#36020
mdwn merged 3 commits intomasterfrom
mike.wilson/access-list-cache

Conversation

@mdwn
Copy link
Copy Markdown
Contributor

@mdwn mdwn commented Dec 22, 2023

Access lists, members, and reviews have been added to the cache. To do this, I have created a simple backend that doesn't perform the validation that is performed by the main access list backend and only implements a subset of actions that are needed by the cache.

To support this, I've added in new gRPC methods:
ListAllAccessListMembers and ListAllAccessListReviews. These do not lock any access lists and additionally do not perform any implicit or dynamic members, but just simply return the full list of all members and reviews so that these endpoints can be used to populate the cache.

The general thought here that, since the order of cache events cannot be guaranteed, we'll rely on the auth server to perform the proper backend validation and use a simplified backend that simply sees if the items are present in the cache. If so, we'll return them.

I've had to update a few protos to support this. While I was here, I fixed a bug in the access list gRPC client where the call tolist of reviews was not supplying the access list name. Additionally, the user login state generator will now use the cached access list values.

changelog: Access lists and associated resources are now cached, which should significantly reduce the impact of access list calculation.

@mdwn mdwn force-pushed the mike.wilson/access-list-cache branch from 15a3ec5 to 217c0f4 Compare December 22, 2023 18:46
@mdwn mdwn marked this pull request as ready for review January 3, 2024 15:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 3, 2024

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@github-actions github-actions Bot requested a review from Tener January 3, 2024 15:24
Copy link
Copy Markdown
Contributor

@espadolini espadolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach of the "simple" version of the access list service; I'd consider moving it under lib/services/simple rather than having it in lib/cache/simple tho.

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from Tener January 3, 2024 17:17
Mike Wilson added 3 commits January 5, 2024 08:58
Access lists, members, and reviews have been added to the cache. To do this,
I have created a simple backend that doesn't perform the validation that is
performed by the main access list backend and only implements a subset of
actions that are needed by the cache.

To support this, I've added in new gRPC methods:
ListAllAccessListMembers and ListAllAccessListReviews. These do not lock
any access lists and additionally do not perform any implicit or dynamic
members, but just simply return the full list of all members and reviews
so that these endpoints can be used to populate the cache.

The general thought here that, since the order of cache events cannot be
guaranteed, we'll rely on the auth server to perform the proper backend
validation and use a simplified backend that simply sees if the items
are present in the cache. If so, we'll return them.

I've had to update a few protos to support this. While I was here, I
fixed a bug in the access list gRPC client where the call tolist of reviews
was not supplying the access list name. Additionally, the user login
state generator will now use the cached access list values.
@mdwn mdwn force-pushed the mike.wilson/access-list-cache branch from 956f445 to fad08f6 Compare January 5, 2024 14:00
@mdwn mdwn added this pull request to the merge queue Jan 5, 2024
Merged via the queue into master with commit 913cc67 Jan 5, 2024
@mdwn mdwn deleted the mike.wilson/access-list-cache branch January 5, 2024 15:07
@public-teleport-github-review-bot
Copy link
Copy Markdown

@mdwn See the table below for backport results.

Branch Result
branch/v13 Failed
branch/v14 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants