Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-37833: Add basic quota support #695

Merged
merged 1 commit into from
Mar 1, 2023
Merged

DM-37833: Add basic quota support #695

merged 1 commit into from
Mar 1, 2023

Conversation

rra
Copy link
Member

@rra rra commented Feb 13, 2023

Support configuring default and per-group quotas in the Gafaelfawr settings, calculate the user's total quotas when user information is requested, and include that in the token user information model. Also reorder settings in gafaelfawr.config to match between settings and the frozen configuration and hopefully be a bit more readable.

Includes a bit of reformatting in the test suite that I noticed while updating the tests for quota handling.

Copy link
Member

@jonathansick jonathansick left a comment

Choose a reason for hiding this comment

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

This looks good. The only hang-up I initially had was with the idea of "service names" and figuring out what name that actually was (a phalanx name? a URL path prefix?), and then from SQR-073 I realized it was the name of the Gafaelfawr ingress. In the end it makes sense, but I wonder if we'd want to replace "service names" with "ingress names" in the docs/comments to make it clearer? Say a service (in the sense of "App") employs two different ingresses, then it will have two different entries in the quota.

The 15 minute window is also a bit of a weird unit, but SQR-075 clarified that too.

@rra
Copy link
Member Author

rra commented Mar 1, 2023

The intent is that if the same service has multiple ingresses, they would all use the same service name, so that they would all count towards the same quota (unless, of course, we wanted to divide the service into multiple quotas, which Gafaelfawr represents by treating it as multiple services).

This service name is the same as the service name used with delegated tokens, which is recorded in the database entry for the delegated token as service as a record of which service the token was delegated to. Basically, there's a nascent identity management system for services here that isn't really fleshed out. Maybe I need to write a clear description of what this is. Normally, it's going to correspond to a Phalanx application name, although since it's the granularity of a quota, it's possible that we will need multiple services per application if they have to be quotaed differently.

Support configuring default and per-group quotas in the
Gafaelfawr settings, calculate the user's total quotas when
user information is requested, and include that in the token
user information model.
@rra rra enabled auto-merge March 1, 2023 22:07
@rra rra merged commit a06b1f4 into main Mar 1, 2023
@rra rra deleted the tickets/DM-37833 branch March 1, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants