I tried an OTP token that provides both TOTP and OCRA based on the same seed. The OTP generates OCRA response based on seed, challenge and time. I added the seed to LinOTP and successfully tested TOTP functionality. Then tried to validate a challenge/response from token with the simple challenge '123'. I used validate/check_s but modified source code of check_s() to get and use challenge parameter. My test for challenge/response functionality failed. I debugged the code and figured out that LinOTP's OCRA doesn't use time to generate response. Am I right? How can I use my token with LinOTP.
BTW I don't bind any user to my token and just validate with serial number.
Regards
Mehdi Bahrbegi
--
You received this message because you are subscribed to the Google Groups "LinOTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linotp+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/linotp.
To view this discussion on the web visit https://groups.google.com/d/msgid/linotp/CAAs1Gj%3DwCLm%3D1kZYEV0OEc_xsnCO5xb%2BCAxFyqt41nQzM3DTwA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- Cornelius Kölbel (Head of Product Management)
http://www.lsexperts.de LSE Leading Security Experts GmbH, Postfach 100121, 64201 Darmstadt Tel: +49 6151 86086-252, Fax: -299, Mobil: +49 160 96307089 Unternehmenssitz: Weiterstadt, Amtsgericht Darmstadt: HRB8649 Geschaeftsfuehrer: Oliver Michel, Sven Walther
the hidden feature is not lost - it's even part of the test suite :-)
have a look at **test_ocra2/test_ocra_challenge_check**
and works without a patch with validate/check_s, though this is not
in a test case.
So I've added a test using **validate/check_s** and your ocrasuite
'OCRA-1:HOTP-SHA1-6:QN06-T1M' which goes like this:
<pre>
def test_ocra_challenge_check_s(self):
'''
Test support for challenges in validate/check_s on timebased ocra
'''
ocrasuite = 'OCRA-1:HOTP-SHA1-6:QN06-T1M'
message = '783232123'
serial = "QR2_123"
ocra = OcraOtp()
response1 = self.init_0_QR_Token(ocrasuite=ocrasuite, user=None,
serial=serial)
ocra.init_1(response1)
(response2, activationkey) = self.init_1_QR_Token(ocrasuite=ocrasuite,
serial=serial,
message=message)
(challenge, transid) = ocra.init_2(response2, activationkey)
''' finish rollout '''
otp = ocra.callcOtp(challenge)
response = self.check_otp(transid, otp)
self.assertTrue('"value": true' in response, response)
challenge = '123456'
cout = ocra.counter
otp = ocra.callcOtp(challenge, counter=cout + 1)
parameters = {'pass': 'pin' + otp,
'serial': serial,
'challenge': challenge,
}
response = self.app.get(url(controller='validate',
action='check_s'),
params=parameters)
assert '"value": true' in response
self.removeTokens(serial=ocra.serial)
return
</pre>
you got me wrong - I just posted a unit test, where you could see that it works -
refering to an existing test (**test_ocra2/test_ocra_challenge_check**), which is already in the release 2.6.0.3.
And the posted test used the ocrasuite 'OCRA-1:HOTP-SHA1-6:QN06-T1M', which is a
nummeric challenge of 6 digits len (QN06) - so your token using an Challenge of
40 chars (QA40) should be ok too, as it is part of the other tests.
For to find out what's going on and why it fails, we need of cause more information :-) like log files and configuration.
W.r.t. your hardware - you can have two tokens for the same seed and as they are both time based tokens, there might be no difference. To ease the handling though, I would suggest to use one user they are both assigned to and let LinOTP decided, which one is to be used.
Regards,
Kay