8 ms·
It occurs to me that you could use this same mechanism to reduce the configuration load on machines that provision users using cloud-init(8). Right now, cloud-
by derefr 11y ago
It occurs to me that you could use this same mechanism to reduce the configuration load on machines that provision users using cloud-init(8).
Right now, cloud-init accepts a list of GitHub usernames that should be allowed to log into the machine (which is pretty clever in-and-of-itself), and then creates users for them and sets their authorized_keys to whatever values the GitHub public-SSH-key API returns.
But, rather than "burning in" a set of allowed users, you could do something much more interesting: allow any key to authenticate, and then map it back to a user and find out if that user has write-access to the GitHub project!
- eru 11y agoIt will probably work. But it seems like you are increasing the attack surface here: the current method gets the list of keys once, and if github isn't compromised at that very instant in time, you are safe. Your proposed method relies on trust in github at all times.