Remix.run Logo
Cloud-Init on Raspberry Pi OS(raspberrypi.com)
36 points by rcarmo 5 days ago | 6 comments
cryptonector 2 hours ago | parent | next [-]

First I've heard of cloud-init. So I went looking to see how it does provisioning of SSH keys and... it doesn't really. Sure, it will add public keys to the authorized_keys file, but it won't do anything to register each provisioned hosts' public keys anywhere. And here was I hoping for something to do with TPMs or DICE or something. But sadly, no.

It would be a really good thing to integrate something like Safeboot (https://github.com/osresearch/safeboot), which does use TPMs. Safeboot is implemented as Bash scripts using tpm2-tools, which... I'm really not fond of. I'd rather implement the Safeboot protocol or similar from scratch in Rust or Go, or even maybe parts in C and parts in a safe language. But anyways, the idea is to enroll a host given its TPM's EKcert or the system's platform cert (if it has one), and in the process generate credentials for the host that it will be able to fetch upon attestation upon first boot and which only it can decrypt using its TPM, then after that the host can use those credentials as a root of trust with which to acquire any other necessary credentials (if any). E.g., client certificates, Kerberos keys ("keytabs"), TLS server certificates, etc.

figmert 41 minutes ago | parent [-]

Cloud-init isn't about boot process, it's about initial provisioning of a system.

If you need the host's public keys registered somewhere, you can do that using cloud-init, but there's not built-in mechanism. You'd have to write your own script to do so.

synergy20 3 hours ago | parent | prev | next [-]

i don't have fond memory about cloud-init from ubuntu install in the past, sometimes it got stuck there for good. I would like the installation can be done quickly offline, or, if network is live at least timeout the stuck cloud-init and proceed when it occurs.

vbezhenar an hour ago | parent [-]

Cloud Init is used everywhere, probably in every cloud provider. It's very ubiquitous. I don't like it either, its syntax changed in an incompatible way between versions and simple things might require a lot of experimentation, like just creating user with password to log in. But once you're over this, it's pretty nice.

thedougd 3 hours ago | parent | prev | next [-]

This was already in Ubuntu server for the RPi.

Works great.

rcarmo 5 days ago | parent | prev [-]

At last, one of my uses for https://github.com/rcarmo/ground-init is gone.