Skip to content

Improve logging in golang acme library #12

Closed

Description

@munnerz

The WaitAuthorization function in golang.org/x/crypto/acme/acme.go hides a lot of useful error messages when it decodes into a wireAuthz structure.

For example, the full response on a failed request for a DNS authorisation is:

{
  "type": "dns-01",
  "status": "invalid",
  "error": {
    "type": "urn:acme:error:unauthorized",
    "detail": "Correct value not found for DNS challenge",
    "status": 403
  },
  "uri": "https://acme-staging.api.letsencrypt.org/acme/challenge/challengeuid",
  "token": "challengetoken",
  "keyAuthorization": "challengekey"
}

whereas the actual function returns the error message acme: authorization error for :.

For now, I think we'll need to fork and vendor the library ourselves. I'd like to look into upstreaming a fix for this however.

Activity

  1. added this to the milestone on Aug 6, 2017
  2. removed this from the milestone on Oct 13, 2017
  3. notdsk commented on May 18, 2018

    @notdsk

    What is the status of this? As an end user, it seems unreasonable to have to start plucking with vendor software to find out what is truly wrong with my configuration. I'm at my wits end and acme: authorization error for : is not helping!

  4. munnerz commented on Jun 5, 2018

    @munnerz
    MemberAuthor

    This should now be fixed in v0.3 @notdsk.

    Error responses are now bubbled up into the status field of the Certificate resource when an order fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions