Commit Graph

17 Commits

Author SHA1 Message Date
orangepizza 5678a62fe0
currectly triggers BadSignatureAlgorithmProblem at JWS parse time (#492)
Pebble didn't have badSignatureAlgorithm error, while RFC8555 section
6.2 mandates it.

jws parse time check for bad algorithm is needed because same as
jose.parsesigned refuese to parse without algolist(which is good thing)
so error already thrown at that time and we need to catch this type of
error there.

see related boulder PR
https://github.com/letsencrypt/boulder/pull/8091

---------

Co-authored-by: Aaron Gable <aaron@aarongable.com>
2025-05-07 12:08:05 -04:00
alexzorin d5fa73840e
Add subproblems (#383)
- Add subproblem support (rfc8555#section-6.7.1)
- Use subproblems when rejecting identifiers in newOrder
- Block "blocked-domain.example" in the default configuration
2023-01-19 13:16:39 -08:00
Maartje Eyskens abe2768b4c
Add a blocklist for Order identifiers (#331)
Adds a new config value, `BlockedDomains`, which is a list of strings
representing domains for which Pebble should not issue certificates.
Adding a blocked domain such as "example.com" prevents issuance
for all subdomains of that name (e.g. "foo.example.com") as well.
If an order is rejected due to one of its names matching this blocklist,
the request will return a `rejectedIdentifier` error. This mirrors the
functionality of Boulder's Policy Authority.

Also slightly refactors the frontend's order verification code to split
domain-specific (as opposed to generic or ip-specific) checks into
their own helper function.
2020-11-18 08:52:24 -08:00
Josh Van Leeuwen 35691f87bc WIP: Adds external account binding support (#288)
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>

This PR adds basic support for External Account Binding (EAB) as defined in the
[ACME protocol](https://tools.ietf.org/html/rfc8555#section-7.3.4).

The pebble config takes an extra argument `requireExternalBinding` which will
require new account ACME request to contain the `externalAccountBinding` object
to be present. Pebble will then verify the contents of the object as per the
spec.

The Pebble config takes an optional object of `externalAccountBindings`
containing a string map to 
KIDs to MAC symmetric keys. These are stored statically in memory.

An extra config example has been made to show both options available
(test/config/pebble-config-external-account-bindings.json).

This has been tested using https://github.com/go-acme/lego. The following
command will successfully create a new account with Pebble using one of the keys
defined in the example config.

```
lego --server https://localhost:14000/dir --domains foo.com  --email \
  joshua.vanleeuwen@jetstack.io --http --kid kid-1 --hmac \
  zWNDZM6eQGHWpSRTPal5eIUYFTu7EajVIoguysqZ9wG44nMEtx3MUAsUDkMTQ12W --eab run
```

**The keys in the example config are public and should never be used in
production**
2019-12-04 18:00:40 -08:00
Florian Wernli 746c32eb26 wfe: reply with badCSR if the key is already used for an account (#285) (#286) 2019-11-01 15:50:15 -07:00
Daniel McCarney 074a53b40c
WFE: Implement orderNotReady and badPublicKey err types. (#211)
* WFE: Implement orderNotReady err
* WFE: Implement badPublicKey err
* Travis: Use vendored deps during go vet
2019-02-22 12:09:54 -05:00
Felix Fontein 011d5f132b malformedRequest -> malformed (#172)
The error is called `urn:ietf:params:acme:error:malformed`, not `urn:ietf:params:acme:error:malformedRequest` according to [the table in Section 6.5 of draft-15 (and earlier ones as well)](https://tools.ietf.org/html/draft-ietf-acme-acme-15#section-6.7).

See also ietf-wg-acme/acme#454.
2018-10-09 10:33:50 -04:00
Felix Fontein 6a3664d554 Support draft-14 alreadyRevoked error 2018-09-11 12:09:55 -04:00
David Calavera 185968a065 Add certificate revocation call to the WFE. (#130)
Adds an endpoint to the API to revoke certificates.
There are some caveats to consider:

1. It doesn't verify account ownership.
2. It doesn't verify the certificate issuer.
3. It validates the reason, but it doesn't do anything with it after.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2018-05-30 12:02:05 -07:00
Daniel McCarney 97c54057d1
Enforce JWS Content-Type header per ACME draft-10. (#97)
This commit updates the WFE `verifyPOST` function to enforce that POSTs
with JWS bodies include the correct Content-Type header. If the header
is missing, or incorrect, an HTTP 415 response with a malformed problem
is returned.
2018-03-07 17:45:11 -05:00
Daniel McCarney e90b88062a Remove proactive issuance and add order finalization. (#47)
This commit implements https://github.com/ietf-wg-acme/acme/pull/342 - replacing proactive issuance and CSR as part of new-order with an explicit order finalization step that delivers the CSR.

This is largely a port of the work done to add order finalization to the WIP ACMEv2 support in Boulder:
https://github.com/letsencrypt/boulder/pull/3169 

I haven't tested this end-to-end yet - There are likely bugs lurking :-)
2017-12-05 14:57:09 -08:00
Daniel McCarney 130988737e Add support for "only-return-existing" on new-account. (#32)
The later ACME draft specifies that one can retrieve account information for a given public key by signing a JWS request to the new-account endpoint that contains "only-return-existing: true". In such a case if the server can't find an existing account it should *not* create one but instead return an error. This commit adds this behaviour to Pebble.
2017-07-07 11:36:11 -07:00
Daniel McCarney 9ef0ec2ff4 Add support for "accountDoesNotExist" error type. (#31)
Recent drafts define an explicit "accountDoesNotExist" error type for cases where the account indicated by a request can't be located. This commit updates Pebble to return this error type where appropriate.
2017-07-07 11:29:51 -07:00
Daniel McCarney 0b7713bc70 Verify contact scheme & email addresses (#30)
This commit adds a `verifyContacts` method to the WFE that checks a new account's contact array to validate the contacts use the `mailto:` protocol and are generally well-formed. This adds support for testing
the "invalidContact" and "unsupportedContact" error types from the latest ACME drafts.
2017-07-07 11:07:12 -07:00
Daniel McCarney eb092043e2 Support HTTP-01 challenge validation. (#8)
This commit adds initial support for HTTP-01 challenge validation. No
other challenge types are implemented at this time.

The implementation is largely a pared down version of what Boulder does
presently. For simplicities sake there are a number of important
differences that make Pebble *absolutely* unappropriate for production
uses:
  1) The validation is performed in the same goroutine as the WFE's HTTP
     handler instead of in a separate go routine. It might be worth
     revamping this in the near future.
  2) There is no read limit on the HTTP request body and timeouts are
     not as strict
  3) The validity of both pending and valid authzs is hardcoded at 1h.

As compared to Boulder the Pebble challenge design chooses to use
a separate endpoint (e.g. `/chalZ/9999` for chal 9999) instead of
referring to challenges subindexed from authorizations (e.g.
`/authZ/9999/1` for the first challenge of authz 9999). I believe this
is still within compliance with the overall specification and will
further exercise clients to not expect Boulder's choices to be
universal. The pebble client is updated to allow specifying a URL
to POST in addition to a directory endpoint to allow POSTing these
separate non-directory defined challenge URLs.
2017-03-13 10:15:27 -07:00
Daniel McCarney 83f1970e46 Adds `/new-reg` support (#3)
This PR adds support for ACME-04 style `/new-reg`. Most notably it:

1. Enforces the ToS differently than prior drafts
2. Keeps registrations in a simple map structure identified by the SPKI hash

There's no `regPath` handler for updating/viewing registrations at this time.
2016-12-09 09:09:23 -08:00
Daniel 680f31e59d
Adds nonce support to WFE. 2016-12-06 14:44:37 -05:00