-
Notifications
You must be signed in to change notification settings - Fork 54
Generate and distribute trust quorum shares during rack setup #1182
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
Conversation
// TODO-cleanup This is currently optional because we don't do trust quorum | ||
// shares for single-node deployments (i.e., most dev/test environments), | ||
// but eventually this should be required. |
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.
Thanks for including this - I think it's important we make progress on multi-node, but not breaking single-node seems critical too
sled-agent/src/rack_setup/service.rs
Outdated
// Create a rack secret, unless we're in the single-sled case. | ||
let mut rack_secret_shares = if bootstrap_addrs.len() > 1 { | ||
let total_shares = bootstrap_addrs.len(); | ||
if config.rack_secret_threshold > 1 { | ||
let secret = RackSecret::new(); | ||
let (shares, verifier) = secret | ||
.split(config.rack_secret_threshold, total_shares) | ||
.map_err(SetupServiceError::SplitRackSecret)?; | ||
|
||
// Sanity check that `split` returned the expected number of | ||
// shares (one per bootstrap agent) | ||
assert_eq!(shares.len(), total_shares); | ||
|
||
Some(shares.into_iter().map(move |share| ShareDistribution { | ||
threshold: config.rack_secret_threshold, | ||
total_shares, | ||
verifier: verifier.clone(), | ||
share, | ||
})) | ||
} else { | ||
warn!( | ||
self.log, | ||
concat!( | ||
"Skipping rack secret creation due to config", | ||
" (despite discovery of {} bootstrap agents)" | ||
), | ||
total_shares, | ||
); | ||
None | ||
} | ||
} else { | ||
None | ||
}; |
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.
WDYT about splitting this into a separate function so we can add a test?
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.
Seems perfectly reasonable; will do.
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.
Done in 4995b81
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.
🚀 Bye-Bye SPDM!
The primary change in this PR is that trust quorum shares are now created by RSS and sent to sleds as part of the
SledAgentRequest
s distributed during rack setup instead of being generated ahead of time and installed bything-flinger
. Ancillary changes:Closes #513 (complete) and #517 (no longer relevant).