Commit Graph

13 Commits

Author SHA1 Message Date
Samantha Frank 082142867d
sfe/unpause: Test that identifiers appear on confirmation (#8087)
#8075 fixed a rendering issue caused by #8066, now test that
identifier(s) are always rendered as expected.
2025-03-28 13:12:05 -04:00
Phil Porada d3669ebde9
sfe: Fix broken unpause form (#8075)
Fix incorrect struct member name cause broken unpause form caused by
https://github.com/letsencrypt/boulder/pull/8066. Add the `text/html` 
Content-Type header to all rendered templates.
2025-03-21 14:47:08 -07:00
James Renken edc3c7fa6d
Shorten "identifier(s)" in variable names & function arguments (#8066)
For consistency, and to prevent confusion with the `identifier` package,
use "ident(s)" instead.

Part of #7311
2025-03-14 10:59:38 -07:00
Samantha Frank 1fbaf9f8a9
sfe: Replace text/template with html/template (#8026) 2025-02-26 17:44:03 -05:00
Aaron Gable da7865cb10
Add go1.23.0 to CI (#7665)
Begin testing on go1.23. To facilitate this, also update /x/net,
golangci-lint, staticcheck, and pebble-challtestsrv to versions which
support go1.23. As a result of these updates, also fix a handful of new
lint findings, mostly regarding passing non-static (i.e. potentially
user-controlled) format strings into Sprintf-style functions.

Additionally, delete one VA unittest that was duplicating the checks
performed by a different VA unittest, but with a context timeout bug
that caused it to break when go1.23 subtly changed DialContext behavior.
2024-08-23 14:56:53 -07:00
Samantha Frank 9e286918f8
SFE: Rebrand Self-Service to Portal (#7662) 2024-08-12 16:10:34 -04:00
Samantha Frank c13591ab82
SFE: Call RA.UnpauseAccount and handle result (#7638)
Call `RA.UnpauseAccount` for valid unpause form submissions.

Determine and display the appropriate outcome to the Subscriber based on
the count returned by `RA.UnpauseAccount`:
- If the count is zero, display the "Account already unpaused" message.
- If the count equals the max number of identifiers allowed in a single
request, display a page explaining the need to visit the unpause URL
again.
- Otherwise, display the "Successfully unpaused all N identifiers"
message.

Apply per-request timeout from the SFE configuration.

Part of https://github.com/letsencrypt/boulder/issues/7406
2024-07-31 14:46:46 -04:00
Samantha Frank 36a617a55b
SFE: Improve UX when the JWT is malformed or expired (#7637)
Currently, the SFE displays "An error occurred while unpausing your
account" in scenarios where it's not correct or helpful.

- Return a helpful message when a Subscriber attempts to access the
unpause form but fails to copy the entire link
- Return a helpful message when a Subscriber attempts to unpause using
an expired JWT
- Some small cleanups that make the code a little more mistake-proof.

Part of https://github.com/letsencrypt/boulder/issues/7406
2024-07-31 10:57:59 -04:00
Aaron Gable e54c5bb85e
RA: pass through unpause requests to SA (#7630)
Have the RA's UnpauseAccount gRPC method forward the requested account
ID to the SA's corresponding method, and in turn forward the SA's count
of unpaused identifiers back to the caller in the response.

Changing the response message from emptypb.Empty to a new
rapb.UnpauseAccountResponse is safe, because message names are not
transmitted on the wire, only message field numbers.

While we're here, drastically simplify the wfe_test and sfe_test Mock
RAs, so they don't have to implement methods that aren't actually used
by the tests.

Fixes https://github.com/letsencrypt/boulder/issues/7536
2024-07-25 16:34:02 -04:00
Samantha Frank 92b6a16030
SFE: Add more Let's Encrypt branding to the web UI (#7609)
Rework the Self-Service Unpause Portal's UI:
- Use Let's Encrypt logo and colors
- Use Let's Encrypt favicon
- Modify the layout to have a visually separate header and footer

Part of #7499
Part of #7619
2024-07-25 16:16:19 -04:00
Samantha Frank 986c78a2b4
WFE: Reject new orders containing paused identifiers (#7599)
Part of #7406
Fixes #7475
2024-07-25 13:46:40 -04:00
Phil Porada fa3b0106e5
sfe: HTTP route handler improvements (#7585)
Improve the SFE route handler by using go1.22
[HandleFunc](https://go.dev/blog/routing-enhancements) "VERB /path" and
removing manual HTTP method acceptance code. Addresses comments from the
original SFE PR
[here](https://github.com/letsencrypt/boulder/pull/7500#pullrequestreview-2167485782).

Fixes https://github.com/letsencrypt/boulder/issues/7584
Fixes https://github.com/letsencrypt/boulder/issues/7499
2024-07-12 13:09:29 -04:00
Phil Porada 30c6e592f7
sfe: Implement self-service frontend for account pausing/unpausing (#7500)
Adds a new boulder component named `sfe` aka the Self-service FrontEnd
which is dedicated to non-ACME related Subscriber functions. This change
implements one such function which is a web interface and handlers for
account unpausing.

When paused, an ACME client receives a log line URL with a JWT parameter
from the WFE. For the observant Subscriber, manually clicking the link
opens their web browser and displays a page with a pre-filled HTML form.
Upon clicking the form button, the SFE sends an HTTP POST back to itself
and either validates the JWT and issues an RA gRPC request to unpause
the account, or returns an HTML error page.

The SFE and WFE should share a 32 byte seed value e.g. the output of
`openssl rand -hex 16` which will be used as a go-jose symmetric signer
using the HS256 algorithm. The SFE will check various [RFC
7519](https://datatracker.ietf.org/doc/html/rfc7519) claims on the JWT
such as the `iss`, `aud`, `nbf`, `exp`, `iat`, and a custom `apiVersion`
claim.

The SFE should not yet be relied upon or deployed to staging/production
environments. It is very much a work in progress, but this change is big
enough as-is.

Related to https://github.com/letsencrypt/boulder/issues/7406
Part of https://github.com/letsencrypt/boulder/issues/7499
2024-07-10 10:52:33 -04:00