2016-10-29 2 views
0

Voulant passer au fournisseur Htpasswd Identity j'ai mis à jour le maître-config.yaml pour ressembler à ceproblèmes avec le système: connexion admin après avoir changé de fournisseur Htpasswd identité dans OpenShift Origin

identityProviders: 
    - name: my_htpasswd_provider 
    challenge: true 
    login: true 
    provider: 
    apiVersion: v1 
    kind: HTPasswdPasswordIdentityProvider 
    file: /path/to/users.htpasswd 

Im en utilisant le cluster oc : oc cluster vers le haut --host-données-dir =/opt/openshift_data --host-config-dir =/opt/openshift_conf --use-existante-config , mais lorsque j'essaie de me connecter avec le système : administrateur admin cela arrive.

oc login -u system:admin 
The server uses a certificate signed by an unknown authority. 
You can bypass the certificate check, but any data you send to the server could be intercepted by others. 
Use insecure connections? (y/n): y 

Login failed (401 Unauthorized) 
You must obtain an API token by visiting https://:8443/oauth/token/request 

Répondre

1

J'ai eu cette erreur, quand j'ai changé le fournisseur d'authentification de mon groupe OpenShift, et je l'avais déjà utilisateur connecté en tant qu'administrateur avec les anciens paramètres du fournisseur d'authentification.

Je devais ajouter mappingMethod: ajouter l'option à ma configuration, afin de pouvoir mapper l'utilisateur existant.

identityProviders: 
    - challenge: true 
    login: true 
    mappingMethod: add 
    name: my_htpasswd_provider 
    provider: 
     apiVersion: v1 
     kind: HTPasswdPasswordIdentityProvider 
     file: /var/openshift/users.htpasswd 

C'est OpenShift url documentation:

https://docs.openshift.com/enterprise/3.2/install_config/configuring_authentication.html#mapping-identities-to-users

Hope this helps