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

Add feature flag to disable pending authz reuse #7836

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aarongable
Copy link
Contributor

@aarongable aarongable commented Nov 21, 2024

Pending authz reuse is a nice-to-have feature because it allows us to create fewer rows in the authz database table when creating new orders. However, stats show that less than 2% of authorizations that we attach to new orders are reused pending authzs. And as we move towards using a more streamlined database schema to store our orders, authorizations, and validation attempts, disabling pending authz reuse will greatly simplify our database schema and code.

CPS Compliance Review: our CPS does not speak to whether or not we reuse pending authorizations for new orders.

Part of #7715

Copy link
Contributor

@aarongable, this PR adds one or more new feature flags: NoPendingAuthzReuse. As such, this PR must be accompanied by a review of the Let's Encrypt CP/CPS to ensure that our behavior both before and after this flag is flipped is compliant with that document.

Please conduct such a review, then add your findings to the PR description in a paragraph beginning with "CPS Compliance Review:".

Copy link
Member

@beautifulentropy beautifulentropy 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! I think we should consider some unit coverage for RegistrationAuthorityImpl.NewOrder with this flag enabled.

@jsha
Copy link
Contributor

jsha commented Nov 22, 2024

One good strategy for unittest coverage might be: locally, comment out the flag check such that the new code (GetValidAuthorizationsRequest) runs unconditionally, run the RA test and see what fails, then fix it / adjust it to run with and without the flag.

@aarongable
Copy link
Contributor Author

Yeah, I already did that, and the result is that precisely one test fails -- one that is expecting authz reuse and no longer gets it. We don't actually have any tests currently that cover the distinction between pending and valid authz reuse. So I'm attempting a larger rewrite and unification of the NewOrder tests to see if that can put us in a better state.

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.

4 participants