-
Notifications
You must be signed in to change notification settings - Fork 139
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
ACMEAccountService fixes/enhancements #4625
ACMEAccountService fixes/enhancements #4625
Conversation
frasertweedale
commented
Nov 28, 2023
•
edited
Loading
edited
ACMEAccountService currently throws an uncaught exception if decode the account object payload fails. This results in the server responding 500 Internal Server Error. Respond with status 400 and a proper problem document instead.
Some ACME clients POST-as-GET the account resource, expecting to receive the account object (for an existing account). In particular, mod_md does this and certificate renewal fails when it cannot read or verify the account information. The ACME protocol does not explicitly require this behaviour. But on the other hand, it is not surprising that clients assume they can do it, and it arguably is surprising if an ACME server does not provide it. So let's implement it. The change itself is trivial: when payload is empty, POST-as-GET is implied (RFC 8555 section 6.3). In this case, return the ACMEAccount object (which we already have at hand) unchanged.
Kudos, SonarCloud Quality Gate passed! |
e2046ef
to
ed31277
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Reading the rfc this behaviour seems expected.
@edewata: should we backport this to other branches.
There is a KRA failure but I do not see links with the changes in this PR so I would accept and investigate that problem in separate PR |
The KRA failure disappeared after I restarted the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch looks good. Once it's merged to master branch this patch will be included in the next build in Fedora 40, RHEL 9.4/10, and RHCS 10.6. About backporting, I don't think this is needed in older RHCS versions and IIUC ACME will remain a tech preview in RHEL 8. But if IPA needs it in older RHEL versions, we can certainly backport the patch and create a new build, just file a RHEL Jira ticket for that.
@frasertweedale @edewata Thanks! |