<div dir="ltr"><div>Thank you Nathan,<br></div><div><br>> Do you have more details on what your mapping is configured like? There<br>
> have been some changes around this area in Juno, but it's still possible<br>> that there is some sort of bug here.<br><br></div>Here are my mapping details:<br><br># Search base for users. (string value)<br>user_tree_dn=ou=People,dc=example,dc=com<br><div><br># LDAP search filter for users. (string value)<br>#user_filter=(&(objectClass=posixAccount))<br><br># LDAP objectClass for users. (string value)<br>user_objectclass = posixAccount<br><br># LDAP attribute mapped to user id. (string value)<br>user_id_attribute = uidNumber<br><br># LDAP attribute mapped to user name. (string value)<br>user_name_attribute = uid<br><br># LDAP attribute mapped to user email. (string value)<br>user_mail_attribute = mail</div><br><div><span class="im">However, I see that keystone does not make use of the "</span>user_id_attribute", while checking for authorization of user. It defaults to "uid".<br><br></div><div>Also, when i do -> <br><br>keystone user-role-add --user-id="lohit.valleru" --tenant-id="xxx" --role-id="xxx"<br><br>( I see in the logs - that it uses the configuration value that i set above. i.e uidNumber. )<br><br>Now when i do -><br><br></div><div>keyston user-list , or keystone user-get lohit.valleru<br><br></div><div>(I see that it defaults to picking up "uid" values, in place of uidNumber as above.)<br><br></div><div>So since it stores "uid" as the user_id_attribute, and searches for "uidNumber" when i do user-role-add, it will always fail, unless uidNumber = uid which is impractical.<br><br>In addition - i am confused, on why the user_id_attribute is being defaulted to
"uid". Isn't user_id_attribute supposed to default to uidNumber? (
numerical)<br><br></div><div>Why is the user_id_attribute being used to search, rather than user_name_attribute? As far as i understand - it is user_name_attribute that it stores in the mysql database.<br><br>i would rather expect the logic to behave as follows :<br><br></div><div>As soon as i authenticate using my kerberos principal : "<a href="mailto:lohit.valleru@example.com">lohit.valleru@example.com</a>", keystone is supposed to use "lohit.valleru" to search against "user_name_attribute", and not "user_id_attribute"<br><br></div><div>On swift storage or object storage - it is supposed to use "user_id_attribute", to be in sync with legacy file systems, so "user_id_attribute" is supposed to similar to posix uidNumber.<br><br></div><div>Since there is no way, i can list groups using keystone, i cannot verify if it is mapping group information in the right way.<br></div><div><br></div><div>Thank you for helping with Kerberos information. I can try testing the same, but i might not be able to go too forward, till the above issue is resolved.<br><br></div><div>Lohit<br></div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 18, 2014 at 10:13 PM, Nathan Kinder <span dir="ltr"><<a href="mailto:nkinder@redhat.com" target="_blank">nkinder@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5"><br>
<br>
On 10/18/2014 08:43 AM, lohit.valleru wrote:<br>
> Hello,<br>
><br>
> Thank you for posting this issue to openstack-dev. I had posted this on the<br>
> openstack general user list and was waiting for response.<br>
><br>
> May i know, if we have any progress regarding this issue.<br>
><br>
> I am trying to use external HTTPD authentication with kerberos and LDAP<br>
> identity backend, in Havana.<br>
><br>
> I think, few things have changed with Openstack Icehouse release and<br>
> Keystone 0.9.0 on CentOS 6.5.<br>
><br>
> Currently I face a similar issue to yours : I get a full username with<br>
> domain as REMOTE_USER from apache, and keystone tries to search LDAP along<br>
> with my domain name. ( i have not mentioned any domain information to<br>
> keystone. i assume it is called 'default', while my domain is: <a href="http://example.com" target="_blank">example.com</a> )<br>
><br>
> I see that - External Default and External Domain are no longer supported by<br>
> keystone but intstead -<br>
><br>
> keystone.auth.plugins.external.DefaultDomain or<br>
> external=keystone.auth.plugins.external.Domain are valid as of now.<br>
><br>
> I also tried using keystone.auth.plugins.external.kerberos after checking<br>
> the code, but it does not make any difference.<br>
><br>
> For example:<br>
><br>
> If i authenticate using kerberos with : <a href="mailto:lohit.valleru@example.com">lohit.valleru@example.com</a>. I see the<br>
> following in the logs.<br>
><br>
> DEBUG keystone.common.ldap.core [-] LDAP search:<br>
> dn=ou=People,dc=example,dc=come, scope=1,<br>
> query=(&(uid=<a href="mailto:lohit.valleru@example.com">lohit.valleru@example.com</a>)(objectClass=posixAccount)),<br>
> attrs=['mail', 'userPassword', 'enabled', 'uid'] search_s<br>
> /usr/lib/python2.6/site-packages/keystone/common/ldap/core.py:807<br>
> 2014-10-18 02:34:36.459 5592 DEBUG keystone.common.ldap.core [-] LDAP unbind<br>
> unbind_s /usr/lib/python2.6/site-packages/keystone/common/ldap/core.py:777<br>
> 2014-10-18 02:34:36.460 5592 WARNING keystone.common.wsgi [-] Authorization<br>
> failed. Unable to lookup user <a href="mailto:lohit.valleru@example.com">lohit.valleru@example.com</a> from 172.31.41.104<br>
><br>
> Also, i see that keystone always searches with "uid", no matter what i enter<br>
> as a mapping value for userid/username in keystone.conf . I do not<br>
> understand if this is a bug or limitation. ( The above logs show that they<br>
> are not able to find uid with <a href="mailto:lohit.valleru@example.com">lohit.valleru@example.com</a> since LDAP contains<br>
> uid without domain name)<br>
<br>
</div></div>Do you have more details on what your mapping is configured like? There<br>
have been some changes around this area in Juno, but it's still possible<br>
that there is some sort of bug here.<br>
<span class="">><br>
> May i know, how do i request keystone to split REMOTE_USER? Do i need to<br>
> mention default domain and sync with database in order for this to work?<br>
<br>
</span>REMOTE_USER is set to the full user principal name, which incudes the<br>
kerberos realm. Are you using mod_auth_kerb? If so, you can set the<br>
following in your httpd config to split the realm off of the user principal:<br>
<br>
KrbLocalUserMapping On<br>
<span class=""><br>
><br>
> Also, May i know - what modifications do i need to do to Havana to disable<br>
> username and password authentication, but instead use external<br>
> authentication such as Kerberos/REMOTE_USER.<br>
><br>
> Is anyone working on these scenarios? or do we have any better solutions?<br>
<br>
</span>There is work going on to make Kerberos a more pracitical solution,<br>
including a Kerberos auth plugin for Keystone:<br>
<br>
<a href="https://review.openstack.org/123614" target="_blank">https://review.openstack.org/123614</a><br>
<span class="">><br>
> I have read about Federation and Shibboleth authentication, but i believe<br>
> that is not the same as REMOTE_USER/Kerberos authentication.<br>
<br>
</span>SAML federation uses REMOTE_USER, but it's quite a bit different than<br>
what you are tryign do do since you still need to look up user<br>
information via LDAP (it's all provided as a part of the SAML assertion<br>
in the federation case). There are efforts going on in this area, but I<br>
think it's still a release out (Kilo hopefully).<br>
<br>
Thanks,<br>
-NGK<br>
<div class=""><div class="h5"><br>
><br>
> Thank you,<br>
><br>
> Lohit<br>
><br>
> Thank you,<br>
><br>
> Lohit<br>
><br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://openstack.10931.n7.nabble.com/keystone-Support-for-external-authentication-i-e-REMOTE-USER-in-Havana-tp22185p55528.html" target="_blank">http://openstack.10931.n7.nabble.com/keystone-Support-for-external-authentication-i-e-REMOTE-USER-in-Havana-tp22185p55528.html</a><br>
> Sent from the Developer mailing list archive at Nabble.com.<br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</div></div></blockquote></div><br></div></div></div>