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

Finalize sprockets integration #1161

Closed
jgallagher opened this issue Jun 6, 2022 · 2 comments
Closed

Finalize sprockets integration #1161

jgallagher opened this issue Jun 6, 2022 · 2 comments
Labels
bootstrap services For those occasions where you want the rack to turn on security Related to security.

Comments

@jgallagher
Copy link
Contributor

jgallagher commented Jun 6, 2022

As of #1128, bootstrap-agent to bootstrap-agent communications may (if an SP is present) take place in sprockets sessions, providing authentication and confidentiality. However, the current mechanism by which sprockets is integrated is as a TCP proxy sitting between the bootstrap-agent dropshot server and its client (see #1128 for more details). The dropshot server itself listens on localhost and implicitly trusts all incoming connections, expecting them to only be coming from the sprockets proxy. This needs to be locked down to guarantee requests to the dropshot server can only take place if the client has connected via sprockets. (A similar problem exists on the client side, where the sprockets proxy implicitly trusts all connections made to it before forwarding them to the corresponding serverside sprockets proxy.) Some possible options:

  • Extend dropshot itself (and progenitor) allowing custom listeners/acceptors sufficiently for us to use hyper-sprockets, similarly to how dropshot/progenitor have built-in support for TLS.
  • Switch from using TCP for the localhost connections to Unix domain sockets?
  • Sufficiently lock down the TCP services (this point is vague because it's unclear to me what could be done here)?
  • Move away from dropshot/progenitor entirely, and use something bespoke over "raw TCP" (inside a sprockets session)

My preference is the first, but it requires a currently-unknown amount of work; probably more on the progenitor side than dropshot due to progenitor's use of reqwest, which currently does not support custom clients.

CC @smklein @andrewjstone @ahl

@jgallagher jgallagher added security Related to security. bootstrap services For those occasions where you want the rack to turn on labels Jun 6, 2022
@jgallagher
Copy link
Contributor Author

jgallagher commented Jun 7, 2022

After chatting with @andrewjstone about a different but related issue (described below), we're inclined to go with option 4 and use sprockets session directly as a wrapped TCP stream, eschewing dropshot and progenitor for bootstrap-agent-to-bootstrap-agent communications.

As described in RFD 238 § 4, during rack unlock, sleds must not only mutually authenticate via sprockets, but must additionally verify that the peer they're communicating with is in the set of DeviceIds provisioned during rack initialization. The remote identity is trivially available given direct access to a sprockets session, but it's less obvious how we would perform that check if we kept the proxies or used hyper-sprockets as the connection layer for dropshot/progenitor. In both cases we could push the device ID check into the connection layer itself (either the proxy or hyper-sprockets), but that would leave dropshot and its client in the awkward spot of appearing to implicitly trust all connections, as they'd be relying on the connection layer to (transparently to them) perform all auth checks. If we wanted to pursue the hyper-sprockets / integration path, it would be nicer to be able to expose at least evidence that the auth check had been performed to the dropshot endpoint and client, but that would require more work of unknown size, particularly since it's not obvious hyper supports that kind of out-of-band info.

jgallagher added a commit that referenced this issue Jun 8, 2022
jgallagher added a commit that referenced this issue Jun 8, 2022
jgallagher added a commit that referenced this issue Jun 8, 2022
@jgallagher
Copy link
Contributor Author

Option 4 implented in #1173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bootstrap services For those occasions where you want the rack to turn on security Related to security.
Projects
None yet
Development

No branches or pull requests

1 participant