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: allow POST-as-GET to dir. and newNonce endpoints #292

Merged
merged 2 commits into from
Dec 3, 2019

Conversation

cpu
Copy link
Contributor

@cpu cpu commented Nov 29, 2019

RFC 8555 §6.3 says the server's directory and newNonce endpoints should support POST-as-GET as well as GET.

This PR adopts a fix from eggsampler's Pebble fork. Thanks @eggsampler !

Along the way to avoid the ire of the linter I replaced the numerous occurrences of "GET", "POST", and "HEAD" with the correct exported http package constants.

Resolves #291

Daniel added 2 commits November 29, 2019 11:59
RFC 8555 §6.3[0] says the server's `directory` and `newNonce` endpoints
should support POST-as-GET as well as GET.

This commit adopts a fix from eggsampler's Pebble fork[1]. Thanks!

[0]: https://tools.ietf.org/html/rfc8555#section-6.3

[1]: eggsampler@ce1b722
@cpu cpu requested a review from jsha November 29, 2019 17:03
@cpu cpu self-assigned this Nov 29, 2019
Copy link
Contributor

@jsha jsha left a comment

Choose a reason for hiding this comment

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

There's a weird high-level thing: Since you have to fetch the directory before you can create an account, it's impossible to POST-as-GET the directory, since you don't have an account URL yet. In practice this probably means no client will implement POST-as-GET for the directory, since the client minimally needs support for GETting the directory and there's no reason to switch over to POST-as-GET for subsequent runs. But I think it's still good to comply with the letter of the spec here.

wfe/wfe.go Show resolved Hide resolved
wfe/wfe.go Show resolved Hide resolved
@cpu
Copy link
Contributor Author

cpu commented Dec 3, 2019

there's no reason to switch over to POST-as-GET for subsequent runs.

Agreed, but the spec says what it says. All of the POST-as-GET stuff is jank and this is just another weird artifact of changing the spec with minimal input at the very end of the process. ¯\_(ツ)_/¯

@cpu cpu merged commit aa85303 into master Dec 3, 2019
@cpu cpu deleted the cpu-pag-dir-and-nonce branch December 3, 2019 18:06
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.

POST-as-GET for directory and newNonce endpoints
2 participants