privacyidea icon indicating copy to clipboard operation
privacyidea copied to clipboard

Token type when doing PIN change via validate/check

Open lukasmatusiewicz opened this issue 3 years ago • 3 comments

By the server response with a prompt for a new PIN, token type is still webauthn. That forces us to adjust the code to avoid triggering webauthn tokens if there is no sign request.

Maybe this can be a good idea: if the server has an unordinary challenge for a specific token, type changes to: e.g. newPIN.

That seems more useful because only one thing that is telling us what the server expects is the message, which can differ by the language.

lukasmatusiewicz avatar Aug 09 '22 07:08 lukasmatusiewicz

Thank you for filing an issue and sharing your observations or ideas. Please be sure to provide as many information as possible to help us working on this issue.

github-actions[bot] avatar Aug 09 '22 07:08 github-actions[bot]

grafik

lukasmatusiewicz avatar Aug 09 '22 07:08 lukasmatusiewicz

OK, in such a case we could remove the tokentype, or move the "type" so s.th. like "old_type", and -- as you said -- fill the "type" with s.th. other (None).

cornelinux avatar Sep 21 '22 08:09 cornelinux

Another way could be, that we allow including the challenge_type to the challenge.

jona-samuel avatar Mar 02 '23 12:03 jona-samuel

After looking at it closer we just need to set the client mode to "interactive" in the second step. This must be added to the returned multi-challenge dictionary here: https://github.com/privacyidea/privacyidea/blob/28f138522618915950769a0fe196720f3b417393/privacyidea/lib/challengeresponsedecorators.py#L62 since all other challenges are dismissed in case of a challenge-response decorator. The Plug-In must not use the token type to "guess" the current flow.

plettich avatar Mar 16 '23 13:03 plettich