Skip to content

Remove jargon-y problem type for failed validations #6392

Closed

Description

@jsha

Here's an example error from a failed domain validation. This is what gets output when you run with -q.

Failed authorization procedure. example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.com/.well-known/acme-challenge/fa9WJlwFo6j78ZkpZ64Qy9LQ0yv801y50WeDog-V_C8: q%!(EXTRA string=<!doctype html>

The whole first part of that error message is both generic and jargony. If the user googles the first part of that message, they will get advice for some random domain validation failure probably unrelated to their own.

Instead, I propose to simplify and output:

Failed validation for example.com (http-01): Invalid response from http://example.com/.well-known/acme-challenge/fa9WJlwFo6j78ZkpZ64Qy9LQ0yv801y50WeDog-V_C8: q%!(EXTRA string=<!doctype html>

This brings the relevant information much closer to the beginning of the error and cuts out all but the most important information.

Activity

  1. schoen commented on Sep 24, 2018

    @schoen
    Contributor

    I think I agree with reordering the messages, but I also think that we have some users who do want the ACME error message in the output, so I'd suggest not removing that information entirely.

  2. jsha commented on Sep 24, 2018

    @jsha
    ContributorAuthor

    The proposal is to keep the ACME error message, but elide the error type (urn:acme:error:unauthorized), which is typically uninformative, and more importantly to elide Certbot's own interpretation of the type (:: The client lacks sufficient authorization ), which is always uninformative.

    In general, Certbot has a pattern where it has a default description associated with every error type, copied from the spec. For instance, The client lacks sufficient authorization is associated with :unauthorized. But these descriptions generally don't add much value, especially when the error detail is usually much more informative.

  3. schoen commented on Sep 25, 2018

    @schoen
    Contributor

    Well, we have someone on the forum who definitely wants to keep the error type—as part of an effort to make Certbot's output more machine-readable. (However, maybe we should be more systematic about that if we're going to accept it as a good reason.)

  4. stale commented on Jun 7, 2019

    @stale

    To help us better see what issues are still affecting our users, this issue has been automatically marked as stale. If you still have this issue with an up-to-date version of Certbot and are interested in seeing it resolved, please add a comment letting us know. If there is no further activity, this issue will be automatically closed.

  5. jsha commented on Jun 10, 2019

    @jsha
    ContributorAuthor

    I still think we should remove urn:acme:error:unauthorized ::. Most people don't know, or need to know, what urn means, and unauthorized is way less meaningful than "failed validation."

  6. changed the title [-]Improve error message for failed validations[/-] [+]Remove jargon-y problem type for failed validations[/+] on Jun 10, 2019
  7. cpu commented on Jun 10, 2019

    @cpu
    Contributor

    I still think we should remove urn:acme:error:unauthorized ::

    and the RFC 8555 namespace equiv, urn:ietf:params:acme:unauthorized ::

  8. stale commented on Jun 9, 2020

    @stale

    We've made a lot of changes to Certbot since this issue was opened. If you still have this issue with an up-to-date version of Certbot, can you please add a comment letting us know? This helps us to better see what issues are still affecting our users. If there is no activity in the next 30 days, this issue will be automatically closed.

  9. jsha commented on Jun 9, 2020

    @jsha
    ContributorAuthor

    I've come around and think we should leave in urn:ietf:params:acme:unauthorized (but maybe put it on a line above or below). But I definitely think we should remove The client lacks sufficient authorization. Context: That's the description of the unauthorized error type in RFC 8555: https://tools.ietf.org/html/rfc8555#page-17. But when we wrote RFC 8555 we never intended that "Description" column to be a user-facing description of the error. That's what the "Detail" field of ProblemDetails is for. Right now Certbot (and acme.py) automatically insert a generic description based on the problem Type - I think we should remove that.

  10. alexzorin commented on Aug 27, 2020

    @alexzorin
    Collaborator

    Took a look at this in the context of #8233. Certbot no longer seems to use that error text for failed validations.

    With -q, details of failed challenges are not included:

    Challenge failed for domain example.com
    Attempting to renew cert (example.com) from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: Some challenges have failed.. Skipping.
    All renewal attempts failed. The following certs could not be renewed:
      /etc/letsencrypt/live/example.com/fullchain.pem (failure)
    1 renew failure(s), 0 parse failure(s)
    

    Interactively, the prefix-free problem type is still there, on its own line:

    IMPORTANT NOTES:
    - The following errors were reported by the server:
    
      Domain: example.com
      Type:   unauthorized
      Detail: Invalid response from
      http://example.com/.well-known/acme-challenge/aV5nON5jFVub31Zz4Lne59ZNXQKZhH2xdZTG8llmY1k
      [2606:2800:220:1:248:1893:25c8:1946]: "<!doctype
      html>\n<html>\n<head>\n    <title>Example Domain</title>\n\n
      <meta charset=\"utf-8\" />\n    <meta http-equiv=\"Content-type"
    
      To fix these errors, please make sure that your domain name was
      entered correctly and the DNS A/AAAA record(s) for that domain
      contain(s) the right IP address.
    
  11. jsha commented on Aug 27, 2020

    @jsha
    ContributorAuthor

    Excellent, thanks for looking into that! I am satisfied with the current output.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions