You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now NewAuthorization in WFE will return 500 for a bogus name like "foo.zom," with the problem document indicating the identifier doesn't end in a public suffix. This should return 403 instead.
More generally we should figure out how backends can indicate to WFE the difference between forbidden and server failure. Right now everything is just returned as an error.
One good way to do this would be to define types that implement Error, e.g.
type NotFoundError int
type ForbiddenError int
func (*n NotFoundError) Error() string {
return "Not found"
}
In sendError we would to type assertions (er, ok = err.(NotFoundError); if ok {) to check if the error was one of these, and respond with the right error code. Otherwise we'd respond with 500. So any error that bubbles up that was not specifically tagged as an HTTP error would be a 500. We should monitor 500s and aim to never serve them: Any expected error case should be assigned a non-500 HTTP status code.
Nope, wtf is in the version of the PSL we are using. It looks like the demo server got rebooted recently so Boulder wasn't running, thus the 502. I just started it; try again?
Activity
[-]Fix HTTP status code for "doesn't end in public suffix"[/-][+]Fix HTTP status code for various errors[/+]jsha commentedon May 6, 2015
One good way to do this would be to define types that implement Error, e.g.
In sendError we would to type assertions (
er, ok = err.(NotFoundError); if ok {) to check if the error was one of these, and respond with the right error code. Otherwise we'd respond with 500. So any error that bubbles up that was not specifically tagged as an HTTP error would be a 500. We should monitor 500s and aim to never serve them: Any expected error case should be assigned a non-500 HTTP status code.diracdeltas commentedon May 7, 2015
Is this possibly related to the error I'm seeing in certbot/certbot#387 when asking for a cert for "foo.icann.wtf"? note that wtf is a valid ICANN suffix :). I am getting a 502 response when POSTing to https://www.letsencrypt-demo.org/acme/new-authz.
jsha commentedon May 7, 2015
Nope,
wtfis in the version of the PSL we are using. It looks like the demo server got rebooted recently so Boulder wasn't running, thus the 502. I just started it; try again?diracdeltas commentedon May 7, 2015
Works now, thanks.
kuba commentedon May 7, 2015
this is somewhat related to #128
jsha commentedon May 19, 2015
Actually, the necessary error types already exist in
core/util.go:So we should use those where appropriate.
bdaehlie commentedon Jun 1, 2015
I believe this is resolved now that pull request #272 has merged.