SSH host keys for bootstrap aren't checked

Bug #1579593 reported by Menno Finlay-Smits
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Andrew Wilkins

Bug Description

Bootstrap uses SSH to set up the bootstrap host but the host keys of the bootstrap host aren't verified. This presents an opportunity for a MITM attack.

axw and menn0 have come up with a possible solution for this.

1. During bootstrap, the client pre-generates SSH host keys for the bootstrap node and pass them to cloud-init[1]. This way the host keys aren't generated on the bootstrap node and the host keys are known to the client.

2. Bootstrap happens, with the SSH part using the pre-generated SSH host keys.

3. The bootstrap agent generates new SSH host keys for the host (probably in InitializeState). This is needed because cloud-init data is not secure. On some clouds it is easily available to any process running on the machine.

4. The bootstrap machine agent comes up and reports the newly generated keys to the controller. This is already in place. As part of the fix for bug 1456916, all machines agents report the SSH public keys to the controller when they start.

[1] - http://cloudinit.readthedocs.io/en/latest/topics/examples.html#configure-instances-ssh-keys

Changed in juju-core:
status: New → Triaged
affects: juju-core → juju
Changed in juju:
importance: Medium → High
Changed in juju:
milestone: none → 2.0.1
tags: added: canonical-is
Revision history for this message
Stuart Bishop (stub) wrote :

If the secrets passed to cloud-init are leaked to non-root processes started after provisioning has completed or logged, then that certainly seems bug worthy on cloud-init. That would compromise the security of all tools using it unless they do a similar work around to what is proposed here.

If the secrets are only accessible to processes run during provisioning, then I don't think steps 3 and 4 are required.

Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0.1 → none
Revision history for this message
Andrew Wilkins (axwalk) wrote :
Changed in juju:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

@stub: the problem isn't with cloud-init itself. Apparently some clouds make each host's cloud-init data available over an API that's accessible to the anything on the host's IP.

Andrew Wilkins (axwalk)
Changed in juju:
status: In Progress → Fix Committed
milestone: none → 2.2-beta4
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.