<html>
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta content="OpenWebMail 3.00_beta4 20121104 rev 671" name="Generator">
</head>
<body>
Hi,<br />
<br />
Thanks a lot.<br />
<br />
     Pat<br />
<br />
<b>On Fri, 8 Feb 2013 08:52:13 -0500, Tong Li wrote</b><br />
> <font face="sans-serif" size="2">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 face="serif" size="3"> request: curl -s -X GET </font><font face="serif" size="3"><a href="http://localhost:35357/tokens/tokenToBeValidated">http://localhost:35357/tokens/tokenToBeValidated</a></font><font face="serif" size="3"> -H "X-Auth-Token: "adminAccessToken""</font><br />
><br />
> <font face="sans-serif" size="2">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 face="sans-serif" size="2">Hope that helps.</font><br />
><br />
> <font face="sans-serif" size="2">Tong Li<br />
> Emerging Technologies & Standards<br />
> </font><br />
> <img alt="Inactive hide details for "pat" ---02/08/2013 07:31:25 
AM---Hi, Thanks for the reply." border="0" height="16" src="cid:1__=0ABBF19FDFD82DE78f9e8a93df938@us.ibm.com" width="16" /><font color="#424282" face="sans-serif" size="2">"pat" ---02/08/2013 07:31:25 AM---Hi, Thanks for the reply.</font><br />
><br />
> <font color="#5F5F5F" face="sans-serif" size="1">From: </font><font face="sans-serif" size="1">"pat" <pat@xvalheru.org></font><br />
> <font color="#5F5F5F" face="sans-serif" size="1">To: </font><font face="sans-serif" size="1">Tong Li/Raleigh/IBM@IBMUS, </font><br />
> <font color="#5F5F5F" face="sans-serif" size="1">Cc: </font><font face="sans-serif" size="1">openstack@lists.launchpad.net, openstack-bounces+litong01=us.ibm.com@lists.launchpad.net</font><br />
> <font color="#5F5F5F" face="sans-serif" size="1">Date: </font><font face="sans-serif" size="1">02/08/2013 07:31 AM</font><br />
> <font color="#5F5F5F" face="sans-serif" size="1">Subject: </font><font face="sans-serif" size="1">Re: [Openstack] keystone question</font><br />
>
<hr align="left" noshade="noshade" size="2" style="color:#8091A5; " width="100%" />
<br />
><br />
> <font face="serif" size="3">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 face="serif" size="3"><a href="http://localhost:35357/tokens">http://localhost:35357/tokens</a></font><font face="serif" size="3"> -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 face="serif" size="3"><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><br />
<font face="serif" size="3">><br />
> and request: curl -s -X GET </font><font face="serif" size="3"><a href="http://localhost:35357/tokens/XXXYYYXXX">http://localhost:35357/tokens/XXXYYYXXX</a></font><font face="serif" size="3"> -H "X-Auth-Token: "XXXYYYXXX""<br />
> return 401 (unauthorized).<br />
><br />
> What I'm doing wrong?<br />
><br />
> Thanks for help<br />
><br />
> </font><br />
<font face="serif" size="3"><b>> On Wed, 6 Feb 2013 11:46:28 -0500, Tong Li wrote</b></font><br />
<font face="serif" size="3">> > </font><font face="sans-serif" size="2">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><br />
<font face="serif" size="3">> ><br />
> > </font><font face="sans-serif" size="2">Thanks.</font><br />
<font face="serif" size="3">> ><br />
> > </font><font face="sans-serif" size="2">Tong Li<br />
> > Emerging Technologies & Standards<br />
> ><br />
> > </font><br />
<font face="serif" size="3">> ><br />
> > </font><img 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" height="16" src="cid:1__=0ABBF19FDFD82DE78f9e8a93df938@us.ibm.com" width="16" /><font color="#424282" face="sans-serif" size="2">"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><br />
<font face="serif" size="3">> ><br />
> > </font><font color="#5F5F5F" face="sans-serif" size="1">From: </font><font face="sans-serif" size="1">"pat" <pat@xvalheru.org></font><br />
<font face="serif" size="3">> > </font><font color="#5F5F5F" face="sans-serif" size="1">To: </font><font face="sans-serif" size="1">openstack@lists.launchpad.net, </font><br />
<font face="serif" size="3">> > </font><font color="#5F5F5F" face="sans-serif" size="1">Date: </font><font face="sans-serif" size="1">02/06/2013 10:35 AM</font><br />
<font face="serif" size="3">> > </font><font color="#5F5F5F" face="sans-serif" size="1">Subject: </font><font face="sans-serif" size="1">[Openstack] keystone question</font><br />
<font face="serif" size="3">> > </font><font color="#5F5F5F" face="sans-serif" size="1">Sent by: </font><font face="sans-serif" size="1">openstack-bounces+litong01=us.ibm.com@lists.launchpad.net</font><br />
<font face="serif" size="3">> > </font>
<hr align="left" noshade="noshade" size="2" width="100%" />
<br />
<font face="serif" size="3">> ><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 color="#0000FF" size="2"><u>http://www.pipni.cz/</u></font></tt></a><br />
<tt><font size="2">> ><br />
> > _______________________________________________<br />
> > Mailing list: </font></tt><a href="https://launchpad.net/~openstack"><tt><font color="#0000FF" size="2"><u>https://launchpad.net/~openstack</u></font></tt></a><br />
<tt><font size="2">> > Post to     : openstack@lists.launchpad.net<br />
> > Unsubscribe : </font></tt><a href="https://launchpad.net/~openstack"><tt><font color="#0000FF" size="2"><u>https://launchpad.net/~openstack</u></font></tt></a><br />
<tt><font size="2">> > More help   : </font></tt><a href="https://help.launchpad.net/ListHelp"><tt><font color="#0000FF" size="2"><u>https://help.launchpad.net/ListHelp</u></font></tt></a><br />
<tt><font size="2">> ><br />
> > </font></tt><br />
<font face="serif" size="3">> ><br />
> > ---------------------------------------------------------------------------<br />
> > Freehosting PIPNI - </font><a href="http://www.pipni.cz/"><font color="#0000FF" face="serif" size="3"><u>http://www.pipni.cz/</u></font></a><br />
<font face="serif" size="3">><br />
> </font><br />
> <font face="serif" size="3">---------------------------------------------------------------------------<br />
> Freehosting PIPNI - </font><a href="http://www.pipni.cz/"><font color="#0000FF" face="serif" size="3"><u>http://www.pipni.cz/</u></font></a><font face="serif" size="3">  </font><br />
><br />
> ---------------------------------------------------------------------------<br />
> Freehosting PIPNI - <a href="http://www.pipni.cz/">http://www.pipni.cz/</a><br />
<br />
<br />


<br><p>

---------------------------------------------------------------------------

<br />

Freehosting PIPNI - <a href="http://www.pipni.cz/">http://www.pipni.cz/</a>

</p>

<br></body>
</html>