eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

Validate vSphere user name and password does not contain a backslash

Open TerryHowe opened this issue 2 years ago • 5 comments

Validate the vSphere EKSA_VSPHERE_USERNAME and EKSA_VSPHERE_PASSORD does not contain a backslash. Ideally, we'd base64 encode this, but maybe it is a capv problem.

Work around, use username@domain instead of domain\username

TerryHowe avatar Nov 08 '22 22:11 TerryHowe

Is this just broken for username now? https://github.com/aws/eks-anywhere/pull/1677 maybe it is fixed?

TerryHowe avatar Nov 08 '22 22:11 TerryHowe

I think we need to do the same thing we did in the above PR here:

https://github.com/aws/eks-anywhere/blob/main/pkg/providers/vsphere/config/template-cp.yaml#L548-L549

vivek-koppuru avatar Nov 15 '22 07:11 vivek-koppuru

Either we need to do the above, or add a validation not allowing the specification of a user as domain_name/user_name. I would lean towards enabling both configurations as govc supports it as well.

vivek-koppuru avatar Nov 15 '22 23:11 vivek-koppuru

This is still an issue as of 0.13.0 If someone uses the user\domain format in their EKA_VSPHERE_USERNAME they will get the following obtuse error message.

Error: applying capi spec: executing apply: error: error parsing STDIN: error converting YAML to JSON: yaml: line 9: found unknown escape character

raykrueger avatar Dec 20 '22 17:12 raykrueger

Did we establish what the vSphere constraints are? As Terry said in the OP, we really shouldn't block this, particularly for passwords.

chrisdoherty4 avatar Dec 29 '22 13:12 chrisdoherty4