<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, May 3, 2013 at 2:30 PM, Bhandaru, Malini K <span dir="ltr"><<a href="mailto:malini.k.bhandaru@intel.com" target="_blank">malini.k.bhandaru@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="">Hello Keystone gurus!<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">We have a currently standalone wsgi application, barbican (key manager), and want to integrate with keystone for auth.<u></u><u></u></p>
<p class="">Followed the docs on this and have updated the api-paste.ini etc.
<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">In a typically use case, barbican will get an authenticated user request, thus the auth related headers in request will be<u></u><u></u></p>
<p class="">Appropriately populated. What do I need to stuff into request headers to mimic this?<u></u><u></u></p>
<p class="">Keystone is configured with PKI.<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">headers = {'X-Auth-User': “nova”,<u></u><u></u></p>
<p class=""> 'X-Auth-Key': “secret”, <u></u><u></u></p>
<p class=""> 'X-Auth-Project-Id': <service-project_id>}</p></div></div></blockquote><div><br></div><div style>I assume I got your questions answered in IRC, but for anyone else interested, the headers to mimic are documented in auth_token:</div>
<div style><br></div><div style> <a href="https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/middleware/auth_token.py#L56">https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/middleware/auth_token.py#L56</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div>
<p class=""><u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">And making the http request with the above headers.<u></u><u></u></p>
<p class="">But I get a 401 unauthorized.<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">Or ?? <u></u><u></u></p>
<p class="">headers['X-User-Id'] = "nova"<u></u><u></u></p>
<p class="">headers['X-Tenant-Id'] = "service"<u></u><u></u></p>
<p class="">headers['X-Roles'] = "admin"<u></u><u></u></p>
<p class="">headers['X-Identity-Status'] = 'Confirmed'<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">The parameters below work when used as environment variables to use “keystone” cli to retriever user-list etc.<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class="">[filter:keystone_authtoken] <u></u><u></u></p>
<p class="">paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory<u></u><u></u></p>
<p class="">signing_dir = . <u></u><u></u></p>
<p class="">auth_host = localhost<u></u><u></u></p>
<p class="">auth_port = 35357 <u></u><u></u></p>
<p class="">auth_protocol = http <u></u><u></u></p>
<p class="">admin_tenant_name = service <u></u><u></u></p>
<p class="">admin_user = barbican<u></u><u></u></p>
<p class="">admin_password = secret<u></u><u></u></p>
<p class=""><u></u> <u></u></p>
<p class=""><u></u> <u></u></p>
</div>
</div>
<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></blockquote></div><br></div></div>