Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

authz: Compute providers on the fly#64012

Merged
eseliger merged 1 commit into
mainfrom
es/07-23-authzcomputeprovidersonthefly
Jul 31, 2024
Merged

authz: Compute providers on the fly#64012
eseliger merged 1 commit into
mainfrom
es/07-23-authzcomputeprovidersonthefly

Conversation

@eseliger

@eseliger eseliger commented Jul 23, 2024

Copy link
Copy Markdown
Member

Previously, we would store authz providers globally and refresh them every now and then.
However, creating the providers is fairly cheap (1.3ms in a local trace) so we should not keep them in memory and remember to not forget to start the watcher routine.

This will help for multi-tenant Sourcegraph in that providers are now computed for the context in question, and not held globally. Keeping potentially 100k authz providers in memory will not scale.

Test plan: Still works, local Jaeger traces are quite acceptable.

@cla-bot cla-bot Bot added the cla-signed label Jul 23, 2024

eseliger commented Jul 23, 2024

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @eseliger and the rest of your teammates on Graphite Graphite

@github-actions github-actions Bot added team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all labels Jul 23, 2024
@eseliger eseliger force-pushed the es/no-authz-everywhere branch from 56a265c to 70d5438 Compare July 24, 2024 13:53
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch 2 times, most recently from 0f2223d to 88e14a5 Compare July 24, 2024 14:06
@eseliger eseliger force-pushed the es/no-authz-everywhere branch from 70d5438 to 235c970 Compare July 24, 2024 20:38
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch from 88e14a5 to e8fbddf Compare July 24, 2024 20:38
@eseliger eseliger force-pushed the es/no-authz-everywhere branch from 235c970 to 20e7396 Compare July 28, 2024 14:44
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch from e8fbddf to 2f13f50 Compare July 28, 2024 14:44
@eseliger eseliger marked this pull request as ready for review July 29, 2024 21:53
@eseliger eseliger requested a review from a team July 29, 2024 21:53
@eseliger eseliger force-pushed the es/no-authz-everywhere branch from 20e7396 to 89f2377 Compare July 30, 2024 00:46
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch from 2f13f50 to bb95aa9 Compare July 30, 2024 00:47
@eseliger eseliger force-pushed the es/no-authz-everywhere branch from 89f2377 to e4136ae Compare July 30, 2024 17:21
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch from bb95aa9 to 13b3a9c Compare July 30, 2024 17:21
@eseliger eseliger changed the base branch from es/no-authz-everywhere to graphite-base/64012 July 30, 2024 23:23
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch from 13b3a9c to 980aa69 Compare July 30, 2024 23:23
@eseliger eseliger changed the base branch from graphite-base/64012 to main July 30, 2024 23:24
Previously, we would store authz providers globally and refresh them every now and then.
However, creating the providers is fairly cheap (1.3ms in a local trace) so we should not keep them in memory and remember to not forget to start the watcher routine.

This will help for multi-tenant Sourcegraph in that providers are now computed for the context in question, and not held globally. Keeping potentially 100k authz providers in memory will not scale.

Test plan:

Still works, local Jaeger traces are quite acceptable.
@eseliger eseliger force-pushed the es/07-23-authzcomputeprovidersonthefly branch from 980aa69 to 2e603ee Compare July 31, 2024 00:46
@eseliger eseliger merged commit 38b79fb into main Jul 31, 2024

Copy link
Copy Markdown
Member Author

Merge activity

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

Labels

cla-signed team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants