Open cornelinux opened 3 years ago
Also check #2510
@nilsbehlen I would start implementing this on the server side:
client_mode
with the possible values:
interactive
(would be used for OTP tokens, Email, SMS)poll
(would be used for push tokens)webauthn
for Webauthn / FIDO2 tokensu2f
for U2F / FIDO tokensIs there any other value you can think of?
image
that simply contains a dataimage that the client can generically display.webauthn for webauthn
@nilsbehlen Thanks, would it be the same process like u2f? Should be call this "fido" or is "webauthn" or "fido2" specific enough for the clients?
Conceptual Thought:
In the tokenclasses we can have a class constant that defines the client_mode
setting value per class.
Or can the client_mode differ for a certain token type? I do not think so.
i think we need to differentiate between u2f and webauthn so each has their own mode. I would prefer these names because they are more commonly used than the specification names.
Maybe you can also remove the challenges for u2f and webauthn from the detail.attribute field since they are already in the challenges themselves.
@nilsbehlen Do you remember, what "preferred client mode" is?
@nilsbehlen Do you remember, what "preferred client mode" is?
We have this implemented in multiple plugins. You can set your preffered token type in the settings and if a token of that type is triggered, the plugin starts in that mode. i.e. prompting for webauthn directly without having to press the button.
We can improve the communition with the client plugins. We should improve the REST response values, so that the client plugins can more easily react.
Currently the response looks like this:
The "attributes" section can contain additional, tokenspecific information like challenges of U2F or WebAuthn.
However, there can be additional information in each element of the
multi_challenge
section.This could be:
Image
A key
image
can contain the challenge data in an image. This is e.g. similar to the TiQR token, which currently contains theimg
tag in the attribute sub section.However, if we have a general
image
key, then we could display images of any kind. We could even display an image of the token, so that the user "knows" what to do - like accepting the challenge of the push token on his smartphone.Or the image could be used to even enroll a token during the authentication process.
Client mode
There are different modes how a plugin would react in general. A key
client_mode
could tell the plugin the way it should react. This way, the plugin does not need the logic to decide based on the tokentype how to react. Thus we can add new token types, and if they use an existing mode, there would be no need to enhance the plugins.Possible modes:
The mode
otp
would be the default mode. It tells the plugin, that is should display an entry field, where the user is supposed to enter something and press enter. The plugin will then send actively this credential to the /validate/check endpoint.The mode
poll
tells the plugin, that it needs to poll the privacyIDEA server for the state of the given transaction_id. This mode would not require to display an input field.Example
A resulting response could look like this:
TODO