Tag-scoped SSH key can access untagged VMs
I created a new SSH key and registered it with ssh exe.dev ssh-key add --tag=<tag name>.
The response returned successfully:
{
"name": <name>,
"permissions": {
"tag": <tag name>
},
"status": "added"
}
However when I tried to use this key to SSH into an untagged VM, it unexpectedly worked:
ssh \
-F /dev/null \
-i ./worker-key \
-o IdentityAgent=none \
-o IdentitiesOnly=yes \
-o BatchMode=yes \
-o StrictHostKeyChecking=yes \
-o UserKnownHostsFile=./known-hosts \
<vm name> \
true
After revoking the key, ssh failed as expected.
My expectation is that ssh-key add --tag would restrict SSH access to only VMs carrying that tag. If that is correct, it looks like the restriction isn't being enforced.
2 Comments
Tag-scoped keys allow you to ssh to the lobby and manipulate resources with that tag as well. I believe the true here is falling through to the exe.dev lobby. Replacing with a command that the lobby doesn’t have (eg hostname) should verify the point. Email us at support@exe.dev if you’d like us to trace it a bit deeper for your account.
Ah I see; it's working fine, closing. Thanks!