WFE: Add custom balancer implementation which routes nonce redemption RPCs by prefix#6618
Merged
beautifulentropy merged 39 commits intomainfrom Feb 3, 2023
Merged
WFE: Add custom balancer implementation which routes nonce redemption RPCs by prefix#6618beautifulentropy merged 39 commits intomainfrom
beautifulentropy merged 39 commits intomainfrom
Conversation
a01c34f to
c5bd7ee
Compare
144b6ae to
df2894a
Compare
ad90676 to
175ae0d
Compare
aarongable
reviewed
Jan 27, 2023
jsha
previously approved these changes
Feb 3, 2023
Contributor
jsha
left a comment
There was a problem hiding this comment.
Thanks for all the changes! Look great.
pgporada
reviewed
Feb 3, 2023
aarongable
reviewed
Feb 3, 2023
Contributor
aarongable
left a comment
There was a problem hiding this comment.
LGTM with just a few comment nits!
aarongable
approved these changes
Feb 3, 2023
Member
Author
|
@jsha can you re-ack when you get a chance? |
jsha
approved these changes
Feb 3, 2023
beautifulentropy
added a commit
that referenced
this pull request
Jul 28, 2023
…efixes (#7004) Fix an issue related to the custom gRPC Picker implementation introduced in #6618. When a nonce contained a prefix not associated with a known backend, the Picker would continuously rebuild, re-resolve DNS, and eventually throw a 500 "Server Error" at RPC timeout. The Picker now promptly returns a 400 "Bad Nonce" error as expected, in response the requesting client should retry their request with a fresh nonce. Additionally: - WFE unit tests use derived nonces when `"BOULDER_CONFIG_DIR" == "test/config-next"`. - `Balancer.Build()` in "noncebalancer" forces a rebuild until non-zero backends are available. This matches the [balancer/roundrobin](https://github.com/grpc/grpc-go/blob/d524b409462c601ef3f05a7e1fba19755a337c77/balancer/roundrobin/roundrobin.go#L49-L53) implementation. - Nonces with no matching backend increment "jose_errors" with label `"type": "JWSInvalidNonce"` and "nonce_no_backend_found". - Nonces of incorrect length are now rejected at the WFE and increment "jose_errors" with label `"type": "JWSMalformedNonce"` instead of `"type": "JWSInvalidNonce"`. - Nonces not encoded as base64url are now rejected at the WFE and increment "jose_errors" with label `"type": "JWSMalformedNonce"` instead of `"type": "JWSInvalidNonce"`. Fixes #6969 Part of #6974
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assign nonce prefixes for each nonce-service by taking the first eight characters of the the base64url encoded HMAC-SHA256 hash of the RPC listening address using a provided key. The provided key must be same across all boulder-wfe and nonce-service instances.
grpc-goload balancer implementation (nonce) which can route nonce redemption RPC messages by matching the prefix to the derived prefix of the nonce-service instance which created it.round_robin).srvRPC resolver to accept a comma separated list of targets to be resolved.-prefixflag.Fixes #6404