No doubt I have setup something incorrectly here. But - I went through the documentation for setting up Vault and enabled the SSH backed. I deployed the "vault-ssh-helper" to a few remote clients. I installed Vault on my client laptop to test out the "automation" bits...
Then, I tested login and it works great. A little too great in fact. Like, I can login as anyone and as far as I can tell, the only bit of actual security is the CIDR range I setup in Vault when I setup the SSH backend. Naturally, I allowed one of our corporate VLAN's that hosts developer workstations since these would be users that need SSH access to these hosts.
But, there's nothing that prevents me from logging in as *ANY* account on the system. Using a command like this:
$ vault ssh -role otp_key_role <insert_user_here>@
10.10.2.10
Heck, I can even login as root (I tested by setting PermitRootLogin to yes in sshd_config)! If they are allowed to login to the host and the account is active, Vault will happily allow me to login. So far as I can tell, I've done nothing to "authenticate" against Vault, other than my source IP falls within the CIDR range I set.
Is this by design? For some reason, I was thinking that users would somehow be required to authenticate against the Vault for a token first - I went to the trouble to setup the Vault auth backend against LDAP (works). But, it never asks for any sort of credential during the SSH backend process - it just logs me right in.
What am I missing here? I like the portability of the OTP setup, but unless I have set it up very, very wrong, it seems extremely permissive to me. All a potential attacker needs to do it squat on an allowed VLAN and have instant access to everything, right?