Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

The Plugin should display the challenge message #42

Closed
cornelinux opened this issue May 19, 2020 · 8 comments
Closed

The Plugin should display the challenge message #42

cornelinux opened this issue May 19, 2020 · 8 comments
Assignees
Milestone

Comments

@cornelinux
Copy link
Contributor

When doing challenge-response with triggerchallenge the privacyIDEA returns a message in the JSON response. The contents of this is often useful, since it contains s.th. like "Please enter the OTP value from the Email".
Especially for the indexedSecretToken it contains important information like "Please enter the position 2,3 and 7 of your secret".
Without this information, the user can not answer the challenge.

The message should be inserted about here:

transaction_id = otp_prov.triggerChallenge(username, privacyIDEArealm, token);

The call to triggerChallenge needs to return the message like here:

string transaction_id = getJsonNode(responseString, "transaction_ids");

Can the triggerChallenge method return a tuple of the transaction_id and the message?

You can see the returned messages here:
https://privacyidea.readthedocs.io/en/latest/modules/api/validate.html#get--validate-triggerchallenge

So the code should probably be something like

                    string message = getJsonNode(responseString, "messages");

or getJsonNode(responseString, "message"), since message contains the concatenation of all challenges.

@sbidy sbidy self-assigned this May 20, 2020
@sbidy sbidy added this to the 1.3.8 milestone May 20, 2020
@sbidy
Copy link
Owner

sbidy commented May 20, 2020

This should not be a big thing - give me the weekend for the first beta 😄 🚀
But I'll keep this as an optional feature which can be activated in the config (for the 1.3.8).

@cornelinux
Copy link
Contributor Author

Please drop me a note, if you need any input!

@sbidy
Copy link
Owner

sbidy commented May 24, 2020

Update now available as 1.3.8.2 - now should be display the challenge message in the UI (tested with "Questioner Challenge Token")

Please test with your token implementation.

The message can be switched on and off with a config parameter:

<ChallengeMessage>true</ChallengeMessage>

@sbidy
Copy link
Owner

sbidy commented May 24, 2020

The massage array will be displayed but maybe no correct formatted!

@sbidy
Copy link
Owner

sbidy commented May 24, 2020

All messages will be shown up in the UI if multiple tokens are deploy - check version 1.3.8.2.
This should fix the appearance problem from 1.3.8.1.

@cornelinux
Copy link
Contributor Author

Cool, thx!

@sbidy
Copy link
Owner

sbidy commented May 27, 2020

Any updates? :)

@cornelinux
Copy link
Contributor Author

I am not able to look at it myself. But I got work from a user, that it works out as expected. Thanks a lot! :+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants