-
Notifications
You must be signed in to change notification settings - Fork 171
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
Support per-shard signing keys #2330
Support per-shard signing keys #2330
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2330 +/- ##
===========================================
- Coverage 66.46% 49.91% -16.55%
===========================================
Files 92 192 +100
Lines 9258 24732 +15474
===========================================
+ Hits 6153 12346 +6193
- Misses 2359 11288 +8929
- Partials 746 1098 +352
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Ready for review. I'm going to keep playing around with making CodeQL happy but I might just dismiss the alert, it's a FP. (Edit: Dismissed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple comments; i want to think through the rollout implications of this in an environment where you have multiple instances of rekor running in parallel where they each might see a different signing config concurrently.
tl;dr - I see no issues. Walking through a few examples: Adding missing signing configurations to prodNote that the active shard configuration is created dynamically, it is not specified in When no signing config in Rolling out a new shardI've reviewed the sharding procedure and there should be no issue. The only change is when we create an active tree, the sharding config for the
Rolling out a new shard without spinning Rekor down to 1 instanceThis would cause issues outside of signing, so this is moot. While some instances continue to write to the old tree, new instances would write to the new tree. As new instances start up, they would have different tree lengths of inactive shards, which would lead to incorrect calculations on global log indices. For the signing config, there would be no issue. Inactive shards would be specified to use the old signing key, while the new shard would use the KMS key passed as a server arg. Updating a signing config without shardingThis would never happen, you can't rotate the key of an active or inactive tree without breaking verification. Footnotes
|
This change enables key rotation with a per-shard signing key configuration. The LogRanges structure now holds both active and inactive shards, with the LogRange structure containing a signer, encoded public key and log ID based on the public key. This change is backwards compatible. If no signing configuration is specified, the active shard signing configuration is used for all shards. Minor change: Standardized log ID vs tree ID, where the former is the pubkey hash and the latter is the ID for the Trillian tree. Signed-off-by: Hayden Blauzvern <[email protected]>
Signed-off-by: Hayden Blauzvern <[email protected]>
Signed-off-by: Hayden Blauzvern <[email protected]>
Signed-off-by: Hayden Blauzvern <[email protected]>
Signed-off-by: Hayden Blauzvern <[email protected]>
Signed-off-by: Hayden Blauzvern <[email protected]>
Signed-off-by: Hayden Blauzvern <[email protected]>
Co-authored-by: Bob Callaway <[email protected]> Signed-off-by: Hayden B <[email protected]>
1f4f831
to
54e84b0
Compare
This change enables key rotation with a per-shard
signing key configuration. The LogRanges structure
now holds both active and inactive shards, with the
LogRange structure containing a signer, encoded
public key and log ID based on the public key.
This change is backwards compatible. If no signing
configuration is specified, the active shard
signing configuration is used for all shards.
Minor change: Standardized log ID vs tree ID, where
the former is the pubkey hash and the latter is the
ID for the Trillian tree.
Signed-off-by: Hayden Blauzvern [email protected]