puppetlabs-toy-chest / wash

Wide Area SHell: a cloud-native shell for bringing remote infrastructure to your terminal.
https://puppetlabs.github.io/wash
Apache License 2.0
180 stars 29 forks source link

Specify canonical user for gcp instance exec #745

Closed MikaelSmith closed 4 years ago

MikaelSmith commented 4 years ago

Previously we supplied the user registered with GCP metadata as a FallbackUser, which allowed a user's SSH config to change the user. However this behavior is inconsistent with gcloud ssh and resulted in default user entries (Host *) in SSH config breaking this functionality.

Switch to using the user from GCP metadata as the canonical user for login. If we later need to support changing that user, it should be a new feature of the wexec command/API.

Fixes #725.

Signed-off-by: Michael Smith michael.smith@puppet.com

MikaelSmith commented 4 years ago

If it's empty then it will behave as before. And I think it will always be non-empty.