<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote">Bonjour,</div><div class="gmail_quote"><br></div><div class="gmail_quote">Votre conf semble correct, la doc officielle explique comment utiliser le LDAP pour l'identity et l'assignment:</div><div class="gmail_quote"><a href="http://docs.openstack.org/admin-guide/keystone-integrate-with-ldap.html" target="_blank">http://docs.openstack.org/<wbr>admin-guide/keystone-<wbr>integrate-with-ldap.html</a><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">J'ai trouvé un article (de 2014) d'un blog qui donne la methode pour utiliser ldap pour l'identity et SQL pour l'assignment:</div><div class="gmail_quote"><a href="https://www.mattfischer.com/blog/?p=545" target="_blank">https://www.mattfischer.com/<wbr>blog/?p=545</a><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">L'erreur que vous avez n'en est peut etre pas une, avez-vous ajouter un role au user sur un projet ? Si oui, activez le debug pour comprendre pourquoi la partie assignment ne fonctionne pas correctement au moment de l'ajout de droit.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Si les droits ont été donné avant le passage sur ldap, il faut utiliser l'admin token pour tout remettre (expliqué dans le blog):</div><div class="gmail_quote"><p style="color:rgb(85,85,85);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;line-height:22.75px">The problem once you switch the authentication mechanism to LDAP, you’ve “lost” all the old roles and users that puppet setup, like the admin user who actually has permissions to do stuff like list users. The fix as any keystone expert will know is to bypass the main API and use the service token directly. In the keystone.conf a service token is defined as admin_token. To use it, unset everything like OS_USERNAME and set:</p><p style="color:rgb(85,85,85);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;line-height:22.75px"><code>export SERVICE_TOKEN=<span><br>export SERVICE_ENDPOINT=<a href="http://localhost:35357/v2.0" target="_blank">http://<wbr>localhost:35357/v2.0</a></span></code></p><p style="color:rgb(85,85,85);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px;line-height:22.75px">Then you need to give your user, in my case, “id=mfischer” permission to do stuff. I ended up giving mfischer the admin and _member_ role in both of my tenants since he/me is the new admin. Finally, I switched my settings back to what’s in my rc file, mfischer as the user, my LDAP password, and the normal keystone endpoint, and… finally my user-list query worked and I got results from LDAP.</p></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Cordialement,</div><div class="gmail_quote"><div><br><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Kourosh VIVAN</span><br></div><div><div dir="ltr"><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Ingenieur Openstack</font> | <font face="arial, helvetica, sans-serif"><a href="tel:%2B33%206%2084%2088%2019%2076" value="+33684881976" target="_blank">+33 6 84 88 19 76</a></font> | <a href="http://osones.com/" target="_blank">osones.com</a> <br><b><font color="#990000"><br></font></b></div><div style="font-size:12.8px"><b><font color="#990000">Osones.</font> Audit, intégration, support, formation.</b></div><div style="font-size:12.8px"><b><br></b></div><div style="font-size:12.8px"><b><br></b></div></div></div><div><div class="h5">
Sujet : [OpenStack-fr] Mitaka keystone avec identity->ldap et assignment->sql<br>
Date : Tue, 13 Sep 2016 11:20:53 +0200<br>
De : Stéphane Delmotte <<a href="mailto:stephane.delmotte@univ-lyon1.fr" target="_blank">stephane.delmotte@univ-lyon1.<wbr>fr</a>><br>
Pour : <a href="mailto:openstack-fr@lists.openstack.org" target="_blank">openstack-fr@lists.openstack.o<wbr>rg</a><br>
<br>
Bonjour,<br>
Je ne sais pas si c'est le bon endroit pour poser une question technique, si ce n'est pas le cas je suis désolé.<br>
Je n'arrive pas à paramétrer keystone version Mitaka pour qu'il s’appuie à la fois sur note annuaire LDAP et la base de donnée MariaDB (intégré à OpenStack).<br>
<br>
voici les extraits de mon fichier keystone.conf<br>
[identity]<br>
<br>
#driver = sql<br>
driver = ldap<br>
<br>
*<br>
*<br>
*<br>
[assignment]<br>
driver = keystone.assignment.backends.s<wbr>ql.Assignment<br>
#<br>
# From keystone<br>
#<br>
# Entrypoint for the assignment backend driver in the keystone.assignment<br>
# namespace. Only an SQL driver is supplied. If an assignment driver is not<br>
# specified, the identity driver will choose the assignment driver (driver<br>
# selection based on `[identity]/driver` option is deprecated and will be<br>
# removed in the "O" release). (string value)<br>
#driver = <None><br>
<br>
# A list of role names which are prohibited from being an implied role. (list<br>
# value)<br>
prohibited_implied_role = <None><br>
<br>
[ldap]<br>
#<br>
# From keystone<br>
#<br>
<br>
# URL(s) for connecting to the LDAP server. Multiple LDAP URLs may be specified<br>
# as a comma separated string. The first URL to successfully bind is used for<br>
# the connection. (string value)<br>
<br>
url = ldap://x.x.x.x<br>
user_tree_dn = ou=People,dc=lbbe,dc=local<br>
user_objectclass = inetOrgPerson<br>
<br>
group_tree_dn = ou=Group,dc=lbbe,dc=local<br>
group_objectclass = groupOfNames<br>
<br>
allow_subtree_delete = False<br>
debug_level = 9<br>
<br>
user_enabled_default = True<br>
user_enabled_attribute = enabled<br>
user_enabled_emulation = False<br>
user_allow_create = False<br>
user_allow_update = False<br>
user_allow_delete = False<br>
group_allow_create = False<br>
group_allow_update = False<br>
group_allow_delete = False<br>
<br>
<br>
<br>
La fonction [identity] est opérationnelle :<br>
lorsque j'utilise un mauvais mot de passe j'ai le message sur l'interface Horizon : Invalid credentials.<br>
dans le cas d'un authentification correcte j'ai : You are not authorized for any projects or domains.<br>
Il semblerait que ce soit la partie qui "assignment" qui pose problème.<br>
<br>
Nous avons essayé de "bidouiller" la base de donnée MariaDB mais ça me semble compliqué..<br>
Ce que je cherche étant il me semble très simple.<br>
<br>
La question est comment s'appuyer sur LDAP pour l'authentification et MariaDB pour le reste ?<br>
Avez-vous des documents, des liens qui peuvent m'aider ?<br>
<br>
<br>
Cordialement<br>
Stéphane Delmotte<br>
<br>
<br>
-- <br>
Delmotte Stéphane<br>
UMR CNRS 5558 Biometrie et Biologie Evolutive<br>
Bat 711 |<br>
Universite Claude Bernard - Lyon I | Tel : <a href="tel:%2B33%2004%2072%2043%2011%2068" value="+33472431168" target="_blank">+33 04 72 43 11 68</a><br>
43, Bd du 11 Novembre 1918 | Fax : 04 72 43 13 88<br>
69622 Villeurbanne cedex FRANCE<br>
<br>
<br>
______________________________<wbr>_________________<br>
OpenStack-fr mailing list<br>
<a href="mailto:OpenStack-fr@lists.openstack.org" target="_blank">OpenStack-fr@lists.openstack.o<wbr>rg</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-fr" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-fr</a><br>
</div></div></div><br>
</div>
</div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">-- <br></font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Kourosh VIVAN</font></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">Ingenieur Openstack</font> | <font face="arial, helvetica, sans-serif">+33 6 84 88 19 76</font> | <a href="http://osones.com/" style="color:rgb(17,85,204)" target="_blank">osones.com</a> <br><b><font color="#990000"><br></font></b></div><div style="font-size:12.8px"><b><font color="#990000">Osones.</font> Audit, intégration, support, formation.</b></div></div></div>
</div>