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

enterprise: Default Lease Count Quota #24382

Merged
merged 7 commits into from
Dec 8, 2023
Merged

enterprise: Default Lease Count Quota #24382

merged 7 commits into from
Dec 8, 2023

Conversation

mpalmi
Copy link
Contributor

@mpalmi mpalmi commented Dec 5, 2023

Summary

This PR contains the CE portion of Default Lease Count Quotas, as defined in the RFC.

This PR resolves VAULT-20142.

Implementation

One note-worthy implementation requirement is the need for an automatic default quota that can be modified or deleted. To support this requirement, we check the version store during early unseal for empty version history. N.B. version history is populated at the end of early unseal, and until then it will be empty IF AND ONLY IF this is a new install of Vault.

Using this check, we can persist a quota during early unseal. This workflow allows us to support deleting or modifying the Default global quota after first unseal without it being overwritten on restart.

We don't need to worry about populating the new quota in memory, since it will happen later during the unseal process (along with the rest of the quotas).

Testing

This PR contains unit testing for the IsNewInstall logic.

All further testing of the new functionality will take place on a separate PR in the Enterprise repo.

Documentation

There are some minor documentation updates to clarify quota precedence and to introduce the concept of a Default quota.

A separate PR will be submitted to provide more context around Good Quota Creation ™️ and other helpful customer-facing context.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Dec 5, 2023
@mpalmi mpalmi changed the title Default lcq enterprise: Default Lease Count Quotas Dec 5, 2023
Copy link

github-actions bot commented Dec 5, 2023

CI Results:
All Go tests succeeded! ✅

This commit introduces the plumbing for Default Lease Count Quotas on
new installs of Vault Enterprise.
@mpalmi mpalmi added this to the 1.16.0-rc1 milestone Dec 7, 2023
@mpalmi mpalmi marked this pull request as ready for review December 7, 2023 22:02
@mpalmi mpalmi requested a review from a team as a code owner December 7, 2023 22:02
@mpalmi mpalmi requested a review from a team December 7, 2023 22:02
Copy link

github-actions bot commented Dec 7, 2023

Build Results:
All builds succeeded! ✅

@mpalmi mpalmi changed the title enterprise: Default Lease Count Quotas enterprise: Default Lease Count Quota Dec 8, 2023
Copy link
Collaborator

@raskchanky raskchanky left a comment

Choose a reason for hiding this comment

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

Looks great! Just one tiny nit/question about the changelog, which is definitely not a blocker.

```release-note:feature
**Default Lease Count Quota**: Apply a new global default lease count quota of 300k leases for all
new installs of Vault.
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: given that lease count quotas are an enterprise only feature, does it make more sense to have the changelog be on the enterprise PR?

@mpalmi mpalmi merged commit 309294a into main Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants