Skip to content

EAB with pebble 2.5.x #455

Closed
Closed

Description

@icing

Pebble before 2.5 used to support HS256 with EAB. Now, only RS256 and EC seem supported. Is there any description how to use an RSA key for EAB with pebble?

I'd prefer continue using HS256 in my test suite for Apache since that seems to be in use at several CAs still. I appreciated that you want to be on the bleeding edge here, but for testing purposes this seem to be a step back.

Activity

  1. pgporada commented on Apr 8, 2024

    @pgporada
    Member

    When testing with certbot main and latest pebble running in docker with the EAB config, I get the reported failure. (Technically you'll need to volume mount - ./test/config:/test/config to work around the container not having the EAB config inside it.)

    $ certbot_test certonly --standalone -d test.example.com --eab-kid zWNDZM6eQGHWpSRTPal5eIUYFTu7EajVIoguysqZ9wG44nMEtx3MUAsUDkMTQ12W --eab-hmac-key phil
    
    https://localhost:14000 "POST /sign-me-up HTTP/1.1" 400 240
    Received response:
    HTTP 400
    Cache-Control: public, max-age=0, no-cache
    Content-Type: application/problem+json; charset=utf-8
    Link: <https://localhost:14000/dir>;rel="index"
    Replay-Nonce: V-GoNIeXrRUXYE7jD52Fhw
    Date: Mon, 08 Apr 2024 16:54:33 GMT
    Content-Length: 240
    
    {
       "type": "urn:ietf:params:acme:error:malformed",
       "detail": "failed to decode external account binding: go-jose/go-jose: unexpected signature algorithm \"HS256\"; expected [\"RS256\" \"ES256\" \"ES384\" \"ES512\"]",
       "status": 400
    }
    
  2. mcpherrinm commented on Apr 8, 2024

    @mcpherrinm
    Contributor

    That seems like my fault during the go-jose v4 upgrade with supported algorithms. It should be straightforward to fix. I’m out today but I can do that this week.

  3. mcpherrinm commented on Apr 9, 2024

    @mcpherrinm
    Contributor

    RFC 8555 says about EAB in 7.3.4: The "alg" field MUST indicate a MAC-based algorithm, so the current set of algorithms in Pebble (ES*, RS*) is straightforwardly incorrect

  4. buchdag commented on May 1, 2024

    @buchdag
    Contributor

    Hi.

    Is there a planned fix for this, or instruction on how to generate and use suitable keys ?

  5. mcpherrinm commented on May 1, 2024

    @mcpherrinm
    Contributor

    yes, but there’s several other higher priority things we’re working on elsewhere. It’ll get fixed soon.

  6. buchdag commented on May 1, 2024

    @buchdag
    Contributor

    I guess that mean the fix is a bit more involved than adding jose.HS256 to goodJWSSignatureAlgorithms then (ie not fixable by someone with limited knowledge about JWS like me).

    Would you happen to know ressources that explain how to generate new kid with a supported algorithm ?

  7. mcpherrinm commented on May 1, 2024

    @mcpherrinm
    Contributor

    It's not quite that simple, but not much more complicated either.

    Fix PR opened - #459

    The big thing I need is a test still, as this functionality was clearly broken.

  8. mcpherrinm commented on May 1, 2024

    @mcpherrinm
    Contributor

    OK, writing an integration test was actually not that bad, so it's done now :)

    We'll tag a new release with this fix, too.

  9. buchdag commented on May 1, 2024

    @buchdag
    Contributor

    Thanks for the fast fix @mcpherrinm 🙏

  10. added a commit that references this issue on May 3, 2024
    e87ace7
  11. buchdag commented on May 14, 2024

    @buchdag
    Contributor

    @mcpherrinm do you think a new tagged release that include the fix could be possible ?

  12. mcpherrinm commented on May 14, 2024

    @mcpherrinm
    Contributor

    Yes, we will tag a new release soon. There’s a few other changes in progress I’d like to get in, such as the ARI PR, and a few docker container changes. That should all be done in the next week or two.

  13. mcpherrinm commented on May 23, 2024

    @mcpherrinm
    Contributor

    I pushed a v2.5.2 tag now. We will do another release with ARI etc later.

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