Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: User should be able to login to different servers with ca certificates either provided or not. Version-Release number of selected component (if applicable): openshift v0.4.2-125-gf80ad14-dirty kubernetes v0.13.1-dev-641-gf057a25 How reproducible: Always Steps to Reproduce: 1. Login to server1 with insecure connection: $ osc login --server=https://<server1>:8443 --insecure-skip-tls-verify 2. Login to server2 with ca certificate provided: $ osc login --server=https://<server2>:8443 --certificate-authority=/tmp/cert.crt Actual results: 1. Can login successfully and the context is saved in ~/.config/openshift/.config 2. Cannot login: F0403 03:18:10.766214 2896 login.go:40] Error: specifying a root certificates file with the insecure flag is not allowed Expected results: 2. Should be able to login to server2 and save the info in the config file. Additional info: After step 1, the file ~/.config/openshfit/.config looks like this: apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true server: https://127.0.0.1:8443 name: 127-0-0-1-8443 contexts: - context: cluster: 127-0-0-1-8443 namespace: default user: user1 name: default current-context: default kind: Config preferences: {} users: - name: user1 user: token: ODE1YmY2NzAtYWNiYi00ZjdhLTk4ZDQtZmJmMmE0OTUwMTBj
When logging into a different/new server, we really shouldn't be copying any of the current context's options
See https://github.com/openshift/origin/pull/1869
Fixed in https://github.com/openshift/origin/pull/1869
Verifired with openshift v0.4.4-9-g09f87e4: $ osc login --server=https://10.14.6.120:8443 --insecure-skip-tls-verify Username: user1 Authentication required for https://10.14.6.120:8443 (openshift) Password: Login successful. ... $ osc login --server=https://localhost:8443 --certificate-authority=/tmp/cert.crt Username: user2 Authentication required for https://localhost:8443 (openshift) Password: Login successful. ...