Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sfe: Implement self-service frontend for account pausing/unpausing #7500

Merged
merged 34 commits into from
Jul 10, 2024

Conversation

pgporada
Copy link
Member

@pgporada pgporada commented May 22, 2024

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 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 #7406
Part of #7499

@pgporada pgporada changed the title ssfe: Implement self-service frontend for account pausing/unpausing May 24, 2024
@beautifulentropy beautifulentropy changed the title sfe: Implement self-service frontend for account pausing/unpausing May 28, 2024
Copy link
Contributor

@pgporada, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values.

@pgporada
Copy link
Member Author

The sfe and as a result the config changes are not yet ready to be deployed so I will not be filing that ticket.

@pgporada pgporada marked this pull request as ready for review June 10, 2024 19:44
@pgporada pgporada requested a review from a team as a code owner June 10, 2024 19:44
Copy link
Member

@beautifulentropy beautifulentropy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the SFE is looking great! I have a small set of comments while I continue my review.

cmd/sfe/main.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe_test.go Outdated Show resolved Hide resolved
sfe/sfe_test.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
cmd/sfe/main.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
cmd/sfe/main.go Outdated Show resolved Hide resolved
Copy link
Member

@beautifulentropy beautifulentropy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Just missing the render helper methods and I have one comment nit.

cmd/config.go Outdated Show resolved Hide resolved
@pgporada pgporada dismissed jsha’s stale review July 3, 2024 18:42

Comments have been addressed, please re-review this.

Copy link
Member

@beautifulentropy beautifulentropy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks fantastic. We have just one more ask that was agreed to when we met last week; include the names from the original error in the JWT claims.

cmd/config.go Show resolved Hide resolved
cmd/sfe/main.go Outdated Show resolved Hide resolved
cmd/sfe/main.go Outdated Show resolved Hide resolved
cmd/sfe/main.go Outdated Show resolved Hide resolved
sfe/pages/unpause-status.html Outdated Show resolved Hide resolved
sfe/sfe.go Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/sfe.go Outdated Show resolved Hide resolved
sfe/templates/layout.html Outdated Show resolved Hide resolved
pgporada added a commit that referenced this pull request Jul 9, 2024
Originating from a comment
[here](#7500 (comment)),
I've inlined the `setupWFE(..)` function into `main()`.
@pgporada pgporada requested a review from aarongable July 9, 2024 20:24
@pgporada pgporada dismissed beautifulentropy’s stale review July 9, 2024 20:45

All comments have been addressed.

Copy link
Contributor

@aarongable aarongable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with two last suggestions, which can be saved for a follow-up as long as we file bugs to track them.

sfe/sfe.go Show resolved Hide resolved
sfe/sfe.go Show resolved Hide resolved
@beautifulentropy beautifulentropy merged commit 30c6e59 into main Jul 10, 2024
12 checks passed
@beautifulentropy beautifulentropy deleted the self-service-frontend branch July 10, 2024 14:52
pgporada added a commit that referenced this pull request Jul 12, 2024
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](#7500 (review)).

Fixes #7584
Fixes #7499
aarongable pushed a commit that referenced this pull request Jul 16, 2024
Add SFE as an RPC client of SARO and RA in `test/config`. #7500 added
same in `test/config-next`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants