<html><body>
<p><font size="2" face="sans-serif">The X-Auth-Token header in your request to validate the user token are not the same thing. You have to login as admin to get a token and hold on to that token, when a user request comes in with his token, you can hand it over to keystone for validation. Here I think will be how the request look like.</font><br>
<br>
<font size="3" face="serif"> request: curl -s -X GET </font><font size="3" face="serif"><a href="http://localhost:35357/tokens/tokenToBeValidated">http://localhost:35357/tokens/tokenToBeValidated</a></font><font size="3" face="serif"> -H "X-Auth-Token: "adminAccessToken""</font><br>
<br>
<font size="2" face="sans-serif">adminAccessToken should be a token you (as admin) to get using the same API and admin userid and password or other means (certificates possibly if that is how it was designed) to get access token just like any other user against keystone.</font><br>
<br>
<font size="2" face="sans-serif">Hope that helps.</font><br>
<br>
<font size="2" face="sans-serif">Tong Li<br>
Emerging Technologies & Standards<br>
</font><br>
<img width="16" height="16" src="cid:1__=0ABBF19FDFD82DE78f9e8a93df938@us.ibm.com" border="0" alt="Inactive hide details for "pat" ---02/08/2013 07:31:25 AM---Hi, Thanks for the reply."><font size="2" color="#424282" face="sans-serif">"pat" ---02/08/2013 07:31:25 AM---Hi, Thanks for the reply.</font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:      </font><font size="1" face="sans-serif">"pat" <pat@xvalheru.org></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">Tong Li/Raleigh/IBM@IBMUS, </font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Cc:        </font><font size="1" face="sans-serif">openstack@lists.launchpad.net, openstack-bounces+litong01=us.ibm.com@lists.launchpad.net</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:      </font><font size="1" face="sans-serif">02/08/2013 07:31 AM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:   </font><font size="1" face="sans-serif">Re: [Openstack] keystone question</font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<font size="3" face="serif">Hi,<br>
<br>
Thanks for the reply.<br>
<br>
I've been digging and I've found way how to get token using API:<br>
curl -s -X POST </font><font size="3" face="serif"><a href="http://localhost:35357/tokens">http://localhost:35357/tokens</a></font><font size="3" face="serif"> -d '{"auth": {"passwordCredentials": {"username":"XXX", "password":"XXX"}, "tenantName":"XXX"}}' -H "Content-type: application/json"<br>
<br>
This request returns JSON response, that's fine for me.<br>
<br>
But how to validate the token? I'm following the API:<br>
</font><font size="3" face="serif"><a href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/GET_validateToken_v2.0_tokens__tokenId__Admin_API_Service_Developer_Operations-d1e1356.html">http://docs.openstack.org/api/openstack-identity-service/2.0/content/GET_validateToken_v2.0_tokens__tokenId__Admin_API_Service_Developer_Operations-d1e1356.html</a></font><font size="3" face="serif"><br>
<br>
and request: curl -s -X GET </font><font size="3" face="serif"><a href="http://localhost:35357/tokens/XXXYYYXXX">http://localhost:35357/tokens/XXXYYYXXX</a></font><font size="3" face="serif"> -H "X-Auth-Token: "XXXYYYXXX""<br>
return 401 (unauthorized).<br>
<br>
What I'm doing wrong?<br>
<br>
Thanks for help<br>
<br>
</font><font size="3" face="serif"><b><br>
On Wed, 6 Feb 2013 11:46:28 -0500, Tong Li wrote</b></font><font size="3" face="serif"><br>
> </font><font size="2" face="sans-serif">keystone provides APIs for authentication, I would think you only need to develop some code in your app to call the API and parse the response, then following request will have to be verified using the token. If you app is already wsgi app, you will just need to use the keystone middleware in your pipeline. If it is other type of the application, you will just need to develop some code which deal with keystone authentication http request/response and figure out a way to verify the token.</font><font size="3" face="serif"><br>
><br>
> </font><font size="2" face="sans-serif">Thanks.</font><font size="3" face="serif"><br>
><br>
> </font><font size="2" face="sans-serif">Tong Li<br>
> Emerging Technologies & Standards<br>
><br>
> </font><font size="3" face="serif"><br>
><br>
> </font><img src="cid:1__=0ABBF19FDFD82DE78f9e8a93df938@us.ibm.com" width="16" height="16" alt="Inactive hide details for "pat" ---02/06/2013 10:35:26 
AM---Hi all, I have a question about keystone. I have an application (Je"><font size="2" color="#424282" face="sans-serif">"pat" ---02/06/2013 10:35:26 AM---Hi all, I have a question about keystone. I have an application (Jee web one) which I</font><font size="3" face="serif"><br>
><br>
> </font><font size="1" color="#5F5F5F" face="sans-serif">From: </font><font size="1" face="sans-serif">"pat" <pat@xvalheru.org></font><font size="3" face="serif"><br>
> </font><font size="1" color="#5F5F5F" face="sans-serif">To: </font><font size="1" face="sans-serif">openstack@lists.launchpad.net, </font><font size="3" face="serif"><br>
> </font><font size="1" color="#5F5F5F" face="sans-serif">Date: </font><font size="1" face="sans-serif">02/06/2013 10:35 AM</font><font size="3" face="serif"><br>
> </font><font size="1" color="#5F5F5F" face="sans-serif">Subject: </font><font size="1" face="sans-serif">[Openstack] keystone question</font><font size="3" face="serif"><br>
> </font><font size="1" color="#5F5F5F" face="sans-serif">Sent by: </font><font size="1" face="sans-serif">openstack-bounces+litong01=us.ibm.com@lists.launchpad.net</font><font size="3" face="serif"><br>
> </font><hr width="100%" size="2" align="left" noshade><font size="3" face="serif"><br>
><br>
> </font><tt><font size="2">Hi all,<br>
><br>
> I have a question about keystone. I have an application (Jee web one) which I<br>
> want to authenticate against keystone. What I have to do?<br>
><br>
> Thanks<br>
><br>
>     Pat<br>
><br>
> ----------------------------------------<br>
> Freehosting PIPNI - </font></tt><a href="http://www.pipni.cz/"><tt><font size="2" color="#0000FF"><u>http://www.pipni.cz/</u></font></tt></a><tt><font size="2"><br>
><br>
> _______________________________________________<br>
> Mailing list: </font></tt><a href="https://launchpad.net/~openstack"><tt><font size="2" color="#0000FF"><u>https://launchpad.net/~openstack</u></font></tt></a><tt><font size="2"><br>
> Post to     : openstack@lists.launchpad.net<br>
> Unsubscribe : </font></tt><a href="https://launchpad.net/~openstack"><tt><font size="2" color="#0000FF"><u>https://launchpad.net/~openstack</u></font></tt></a><tt><font size="2"><br>
> More help   : </font></tt><a href="https://help.launchpad.net/ListHelp"><tt><font size="2" color="#0000FF"><u>https://help.launchpad.net/ListHelp</u></font></tt></a><tt><font size="2"><br>
><br>
> </font></tt><font size="3" face="serif"><br>
><br>
> ---------------------------------------------------------------------------<br>
> Freehosting PIPNI - </font><a href="http://www.pipni.cz/"><font size="3" color="#0000FF" face="serif"><u>http://www.pipni.cz/</u></font></a><font size="3" face="serif"><br>
<br>
<br>
</font>
<p><font size="3" face="serif">--------------------------------------------------------------------------- <br>
Freehosting PIPNI - </font><a href="http://www.pipni.cz/"><font size="3" color="#0000FF" face="serif"><u>http://www.pipni.cz/</u></font></a><font size="3" face="serif"> </font>
<p>
<p></body></html>