Would love to have you feedback on <a href="https://review.openstack.org/#/c/14823/">https://review.openstack.org/#/c/14823/</a> (a redux of the review you just linked).<br clear="all"><div><br></div>-Dolph<br>
<br><br><div class="gmail_quote">On Thu, Oct 25, 2012 at 8:59 AM, Ralf Haferkamp <span dir="ltr"><<a href="mailto:rhafer@suse.de" target="_blank">rhafer@suse.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Oct 25, 2012 at 03:47:42PM +0200, Ralf Haferkamp wrote:<br>
> On Tue, Oct 02, 2012 at 01:06:44PM -0400, Adam Young wrote:<br>
> > On 10/02/2012 12:07 PM, Ralf Haferkamp wrote:<br>
> > >On Thu, Sep 27, 2012 at 01:52:25PM -0400, Adam Young wrote:<br>
> > >>On 09/27/2012 04:15 AM, Ralf Haferkamp wrote:<br>
[..]<br>
> ><br>
</div><div><div class="h5">> > Good first take.  However, I would prefer to add an else block on:<br>
> ><br>
> >  if auth is None<br>
> >   if 'REMOTE_USER' in context:<br>
> >      #assume external request for unscoped token<br>
> >   if 'passwordCredentials' in auth:<br>
> >     #UserID and Password passed explicitly here will trump REMOTE_USER<br>
> >   elif 'token' in auth:<br>
> >     ...<br>
> >   else<br>
> >      if 'REMOTE_USER' in context:<br>
> >     if 'tenantName' in auth:<br>
> >        # allocate scoped token<br>
> >            #not 100% sure I want to allow this, but that is a different discussion<br>
> >         else:<br>
> >        #assume external request for unscoped token<br>
> >            #don't fail just because there is an auth block.<br>
> I finally found some time to rework my code according to your suggestion. See<br>
> here again:<br>
> <a href="https://github.com/rhafer/keystone/tree/external-auth" target="_blank">https://github.com/rhafer/keystone/tree/external-auth</a><br>
><br>
> Currently the code will just allocate an unscoped token if no "auth" block is<br>
> present and REMOTE_USER is set. If the auth block is present and contains a<br>
> valid "tenantName" or "tenantId" a scoped toked will be returned. I guess<br>
> that's what you intended, right?<br>
><br>
> Also there seems to be some code duplication in the different code paths<br>
> (username/password auth vs. token auth). And I added more with external auth<br>
> support :(. I'll check if I can reduce that a bit.<br>
><br>
</div></div>Gah, I just saw that there is already in similar patch in review<br>
(<a href="https://review.openstack.org/#/c/14775/" target="_blank">https://review.openstack.org/#/c/14775/</a>) currently. Most have overlooked that.<br>
So I guess I'd better look into that one. Sorry for the noise.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Ralf<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>