Skip to content

Conversation

jgallagher
Copy link
Contributor

@jgallagher jgallagher commented Jun 9, 2022

The primary change in this PR is that trust quorum shares are now created by RSS and sent to sleds as part of the SledAgentRequests distributed during rack setup instead of being generated ahead of time and installed by thing-flinger. Ancillary changes:

Closes #513 (complete) and #517 (no longer relevant).

@smklein
Copy link
Collaborator

smklein commented Jun 9, 2022

image

Love to see this!

Comment on lines +19 to +21
// 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.
Copy link
Collaborator

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

Comment on lines 273 to 305
// 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
};
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 4995b81

Copy link
Contributor

@andrewjstone andrewjstone left a comment

Choose a reason for hiding this comment

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

🚀 Bye-Bye SPDM!

@jgallagher jgallagher enabled auto-merge (squash) June 9, 2022 17:29
@jgallagher jgallagher merged commit c451365 into main Jun 9, 2022
@jgallagher jgallagher deleted the rss-share-creation branch June 9, 2022 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove key-share file reading when trust-quorum keys are dynamically generated
3 participants