vmware-archive / kubernetes-archived

This repository is archived. Please file in-tree vSphere Cloud Provider issues at https://github.com/kubernetes/kubernetes/issues . CSI Driver for vSphere is available at https://github.com/kubernetes/cloud-provider-vsphere
Apache License 2.0
46 stars 31 forks source link

Provision fails with error "Cannot complete login due to an incorrect user name or password" using secrets in configuring vsphere.conf #510

Open GajaHebbar opened 6 years ago

GajaHebbar commented 6 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

when secrets are used in vsphere.conf, pvc creation fails with error Cannot complete login due to an incorrect user name or password:

user should be able to create volume using secret,plain text username/password works for same cred:

** vsphere.conf

[Global] insecure-flag = 1 secret-name = "vcconf" secret-namespace = "default"

[VirtualCenter "10.133.44.92"] port = "443" datacenters = "Pune_Shared"

[Workspace] server = "10.133.44.92" datacenter = "**" default-datastore="" resourcepool-path="****" folder = "****"

[Disk] scsicontrollertype = pvscsi

[Network] public-network = "****"

vccredentials.yaml

apiVersion: v1 kind: Secret metadata: name: vcconf type: Opaque data: 10.133.44.92.username: ZmxleGt1YmVAdnNwaGVyZS5sb2NhbA== 10.133.44.92.password: QXZheWExMjM0NSM=

created secret kubectl create -f vccredentials.yaml --namespace=default

used echo -n 'password' | base64 to encode the username and password

kubectl describe secret vcconf

Name: vcconf Namespace: default Labels: Annotations:

Type: Opaque

Data

10.133.44.92.password: 11 bytes 10.133.44.92.username: 22 bytes

verified decoding the username and password, it matches the username and password.

but while creating pvc provision fails with above error, If the same user name and password is used in plain text, things are working. **:

Environment:

divyenpatel commented 6 years ago

cc: @abrarshivani

GajaHebbar commented 6 years ago

@divyenpatel @abrarshivani any update/input on this issue?