<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=3&amp;t=1239" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2013-11-25T21:31:56+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=3&amp;t=1239</id>
<entry>
<author><name><![CDATA[krisl]]></name></author>
<updated>2013-11-25T21:31:56+01:00</updated>
<published>2013-11-25T21:31:56+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1239&amp;p=4666#p4666</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1239&amp;p=4666#p4666"/>
<title type="html"><![CDATA[Re: [QUESTION] troubleshooting ykclient to ykval]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1239&amp;p=4666#p4666"><![CDATA[
Hi krisl (yes I'm replying to my own post).<br /><br />well.. I did some debugging, and the issue I was coming up against was that I was being lazy with the api root directory structure.  I had /var/www/ykval as my root with /var/www/ykval/verify.php being symlinked to the one in /usr/share.  Its important to note that the /wsapi/2.0 directory should be here too! as the verify script tries to parse the API version from the request  This is in the instructions, my brain chose to ignore it.<br /><br />Setting the directory up correctly resulted in it all working, so I can crack on with PAM now.<br /><br />krisl<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2704">krisl</a> — Mon Nov 25, 2013 9:31 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[krisl]]></name></author>
<updated>2013-11-23T12:31:35+01:00</updated>
<published>2013-11-23T12:31:35+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1239&amp;p=4662#p4662</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1239&amp;p=4662#p4662"/>
<title type="html"><![CDATA[[QUESTION] troubleshooting ykclient to ykval]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1239&amp;p=4662#p4662"><![CDATA[
Hello,<br /><br />I have been trying to get ykkms (v1.14) and ykval (v2.24) setup, with the objective being to setup free radius and use the PAM interface in the middle.  I'm aware of course the yubiradius appliance is available, so this is more of an interest thing rather than anything else!<br /><br />So I have the KSM working ok, and I also appear to have the validation server working ok too.  They are on separate VMs, and both http services (ykksm and ykval) have certificates which are signed by an internal CA.<br /><br />Where I am getting stuck is, once the ykclient is setup and tested, I can never get it to work, and I believe I am having difficulty troubleshooting it as I am not sure I completely understand the way the HMAC signatures work.  With a valid OTP setup in the KSM (that comes back &quot;OK&quot; from the KSM when tested, and &quot;OK&quot; from the ykval) I always get the following error when testing with ykclient<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">&#91;root@radius01 ykval&#93;# ykclient --debug --url &quot;https://ykval01. xxxxxxx/verify.php&quot; 1 cccccccccccbkdutgticegguretvnnrddccfcinldjeb<br />Input:<br />  validation URL: https://ykval01. xxxxxxx/verify.php<br />  client id: 1<br />  token: cccccccccccbkdutgticegguretvnnrddccfcinldjeb<br />Verification output (104): HMAC signature validation/generation error<br />&#91;root@ radius01 ~&#93;# echo $?<br />3<br />&#91;root@ radius01 ~&#93;# <br />&#91;root@ radius01 ykval&#93;# ykclient --debug --url &quot;https://ykval01. xxxxxxx/verify.php&quot; 1 cccccccccccbkdutgticegguretvnnrddccfcinldjeb<br />Input:<br />  validation URL: https://ykval01.xxxxxxx/verify.php<br />  client id: 1<br />  token: cccccccccccbkdutgticegguretvnnrddccfcinldjeb<br />Verification output (2): Yubikey OTP was replayed (REPLAYED_OTP)<br />&#91;root@ radius01 ykval&#93;# <br /></div> <br /><br />by the fact that if the curl test is repeated and then returned a REPLAY, the request to the validation server obviously works!  I can see this in the ykval and the ykksam logs.<br /><br />Additional notes:<br />- my CA cert is cat'd on to the end of the /etc/pki/tls/certs/ca-bundle, so curl will be picking the CA cert up and this is clear that I have not used the -k option above.  I have tried ykclient with the --ca CADIR option, but this didn't make any difference, the docs indicated that if using https with a valid CA, api keys shouldn't necessarily be needed?<br />- I have tried using an API key in the clients table on the ykval server, and using --apikey KEY, but this doesn't work either even when using the same key.  Currently this field in the table for client &quot;1&quot; is empty.<br /><br />I have tried using the same ykclient to api.yubico.com using a registered apikey and a registered yubikey OTP and this does work, so do I have a problem with the configuration of ykval, and issue with the way ykval is processing HMAC, or some issue with the &quot;client&quot; configuration for client &quot;1&quot;?<br /><br />I've been struggling to get a solution to this, so any help would be gratefully appreciated!<br /><br />Many thanks in advance  <img src="https://forum.yubico.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" /><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2704">krisl</a> — Sat Nov 23, 2013 12:31 pm</p><hr />
]]></content>
</entry>
</feed>