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

Use sprockets on the bootstrap network #6485

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Use sprockets on the bootstrap network #6485

merged 1 commit into from
Sep 20, 2024

Conversation

labbott
Copy link
Contributor

@labbott labbott commented Aug 29, 2024

Connect over the bootstrap network with sprockets tls

@labbott labbott marked this pull request as draft August 29, 2024 20:30
@labbott labbott force-pushed the sprockets branch 3 times, most recently from 1bc4d26 to 3f5dcad Compare August 29, 2024 20:56
@labbott labbott force-pushed the sprockets branch 2 times, most recently from 486d929 to 7f5d41d Compare September 13, 2024 20:57
@labbott labbott changed the title SPROCKETS Use sprockets on the bootstrap network Sep 13, 2024
@labbott labbott marked this pull request as ready for review September 13, 2024 21:03
@labbott labbott marked this pull request as draft September 16, 2024 13:28
@labbott
Copy link
Contributor Author

labbott commented Sep 16, 2024

Marking as draft until the hubris side changes are ready and/or merged

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.

@labbott , this looks great. Just a few nits from me.

let stream = TcpStream::connect(self.addr)
.await
.map_err(|err| Error::Connect { addr: self.addr, err })?;
// The sprocket client loads the associated root certificates at this point.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The sprocket client loads the associated root certificates at this point.
// The sprockets client loads the associated root certificates at this point.

.start_reset(&ctx.base_log, ctx.global_zone_bootstrap_ip)
.start_reset(
&ctx.base_log,
(ctx.sprockets).clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need the parens here. Were they left over from when this was maybe a pointer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm amazed clippy did not complain

@@ -1,4 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you got an accidental newline here

@@ -52,8 +59,9 @@ impl SprocketsServer {
/// `TcpListener::accept()`, which is cancel-safe. Note that cancelling this
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably change the comment here to reflect that this is a sprockets listener. I think it should still be cancel safe.

@@ -88,3 +88,9 @@ level = "info"
mode = "file"
path = "/dev/stdout"
if_exists = "append"

# These are pre-generated keys and roots designed to be used for testing.
# Create your own if you need to test
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Create your own if you need to test
# Create your own if you need to test a multi-node system.

I think that in almost all cases where we use sprockets we'll have multiple nodes, such as in a4x2. In these cases it will be a little weird for each node to have the same keys. Should we generate a bunch of extras and check them in, or provide notes about how to do so?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll copy over the sled2 keys used in sprockets as well

This uses the certificates/keys in the RoT as the basis for
TLS sessions
@labbott labbott marked this pull request as ready for review September 20, 2024 19:16
@labbott labbott merged commit 6831de3 into main Sep 20, 2024
18 checks passed
@labbott labbott deleted the sprockets branch September 20, 2024 19:17
hawkw pushed a commit that referenced this pull request Sep 21, 2024
Connect over the bootstrap network with sprockets tls
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.

2 participants