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

wfe: Use separate UpdateRegistrationContact & UpdateRegistrationKey methods #7827

Merged
merged 8 commits into from
Dec 13, 2024

Conversation

jprenken
Copy link
Contributor

Fixes #7716
Part of #5554

wfe2/wfe.go Outdated Show resolved Hide resolved
jprenken added a commit that referenced this pull request Dec 7, 2024
Early drafts of the ACME spec said that clients should retrieve their existing account information by POSTing the empty JSON object `{}` to their account URL. This instruction was removed in the final version of ACME, replaced by the concept of POST-as-GET, which uses a wholly empty body to accomplish the same goal. However, Boulder has continued to incidentally support this behavior: when we receive an empty JSON object, our `updateAccount` code in the RA applies their desired diff (none) on top of their current account, writes it back to the database, and returns the updated account object...which hasn't actually changed. This behavior is also half-tested by `TestEmptyAccount`, but that test is actually testing that the MockRA implements the same behavior as the real RA; it's not truly testing the WFE's behavior.

This PR changes the WFE to explicitly treat receiving the empty JSON object as a request to retrieve the account data unchanged, rather than implicitly relying on internal details of the RA's account-update logic, which are expected to change in #7827.

---------

Co-authored-by: Jacob Hoffman-Andrews <[email protected]>
@jprenken jprenken marked this pull request as ready for review December 10, 2024 03:12
@jprenken jprenken requested a review from a team as a code owner December 10, 2024 03:12
@jprenken jprenken requested a review from aarongable December 10, 2024 03:12
@beautifulentropy beautifulentropy merged commit 62f1a26 into main Dec 13, 2024
12 checks passed
@beautifulentropy beautifulentropy deleted the updatereg-2 branch December 13, 2024 16:42
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.

sa: ClearEmail method needs to observe LockCol
3 participants