-
-
Notifications
You must be signed in to change notification settings - Fork 15
Missing transaction_id in validate/check request #15
Comments
Mh - I added a really "dirty hack" for that
One question: Regading the API doc. you wrote "All challenge response tokens have the same transaction_id in this case." But i have tested it with a non-challenge response (TOTP) and a mail token. So how can I determine the right |
If the user has a non-challenge-Token like TOTP and a challenge-Token like email, this is usually a bad idea (especially when not using PINs). Then for both tokens a challenge would be generated. I think they have the same transaction_ids. privacyIDEA will sort it out, which token/challenge matches and then also remove the challenges from the challenge table. |
Ok I tested all use cases and the "challenge+non-challenge" seems to be the only faulty one. How can I handle this unusual use case? Removing the all numbers after index 20 seems to me not the best way 😄 ... So do you have any suggestions? Can I send booth transaction_ids to the privacyIDEA like an JSON array ( |
So one more ...
3.1 in the response is
If I remove the "transaction_id" header from the request it works?! Should I determine If the token is a challenge token or not? I think you mention some similar at #2? |
3.1 The TOTP token acts like a challenge response token, if you set the policy scope=auth, action=challenge_response. 4 and 5: If you add a So you either need to omit the "PIN" or you need ot omit the "transaction_id". As a matter of fact with TOTP tokens the authentication works without the To recap: You can trigger a challenge either as a user by
or as and administrator by /validate/triggerchallenge?user=.... In the case of ADFS it makes sense to use triggerchallenge. You do not want the user to use another PIN, since he already specified the LDAP password. |
So what you want to send to the privacyIDEA server in case there are two challenge response tokens. I described it here: So it is up to you, if you
At least in version 3.0 we will also have a JSON element |
Cool, thank you! 😎 So to recap both issues:
|
In regards to 1: I would suggest to make it configurable: a) Add transaction_id in response = True: The transaction_id will be added in the response, I.e. no PIN is given. Thus you would only need to send one request. In regards to 2: You would currently still have the problem with two challenge response tokens. |
I already pushed a fix privacyidea/privacyidea@b110e7f |
… page). Regards to #15 : send two requests to the privacyIDEA.
Regards to 2.: Yes, I'll go fix this in the next release. But now both should have the same id❓ Regards to 1:
and the two requests:
But the transactions in the challenge table are not purged - if a PIN+OTP combination is used - with this workaround. My suggestion is, that the API provides the capability to purge the open challenge by call in the admin context something like a DELETE request to |
This is currently in a PR. I am not sure when this will be in a release. But yes, in the long run both will have the same ID.
I see the requirement. I am not sure, if a new API call would make sense. |
I moved the PR that harmonizes the transaction_id to a intermediate milestone. So we should be able to release it somewhere in January. So yes, there will be only one transaction_id. The response looks like mentioned in privacyidea/privacyidea#1353 "detail": {
"attributes": {
"state": null,
"valid_until": "2018-12-21 13:50:07.834025"
},
"message": "please enter otp: , Enter the OTP from the Email:",
"messages": [
"please enter otp: ",
"Enter the OTP from the Email:"
],
"multi_challenge": [
{
"attributes": null,
"serial": "TOTP0001573B",
"transaction_id": "01928502550899427322"
},
{
"attributes": {
"state": "01928502550899427322",
"valid_until": "2018-12-21 13:49:37.107654"
},
"serial": "PIEM000024B0",
"transaction_id": "01928502550899427322"
},
"threadid": 139947024250624,
"transaction_ids": [
"01391359713621908840",
"01391359713621908840"
],
"transaction_id": "01928502550899427322"
}, |
@sbidy: The current releases of privacyIDEA (2.23.5 and 3.0.1) now provide this single transaction_id in the top level json root. So I guess this can be closed. |
The trigger challenge call [1] [2 ] returns a
transaction_id
that is used to match the response (OTP value), that the user enters, to the created challenge.Currently the response of the triggerchallenge is not evaluated - the transaction_id response value is not used.
I recommend reading the transaction_id and passing it to the second step, so that the transaction_id can be used in the second
validate/check
request.The parameter could be passed as a hidden value in the loginform.
If the parameter
transaction_id
is not sent, the database tablechallenges
will be filled up with challenges that will not get deleted. Also this might lead to unexpected results.The text was updated successfully, but these errors were encountered: