Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow authentication only with specific token type depending on flexible conditions #3752

Open
cornelinux opened this issue Sep 5, 2023 · 1 comment
Labels
Topic: Authentication Authentication-flow related issues Topic: Policy in regards to event handler modules and events (can be function, DB or UI) Type: Feature request A change requested or proposed by a user which is not on the default roadmap

Comments

@cornelinux
Copy link
Member

Is your feature request related to a problem? Please describe.

In certain scenarios the authentication with a certain token type is not expected.
E.g. under certain conditions a user would not want to authenticate with an SMS token, since an SMS token triggers an SMS (sending/ receiving of SMS) although the user may have another token type.

(Add more scenarios)

Describe the solution you'd like

I would like to define conditions, under which certain tokentypes are removed fromt he list of the user's available tokens, so that these tokens are not check in the function token.py::check_token_list(). (see

@log_with(log, hide_args=[1])
)

To do so, maybe we can define a pre-auth-hook, similar to pre-event-handlers and script-handlers, so that these conditions can be added in a most flexible way.

Describe alternatives you've considered

We have some policies. However, policies in this case seem very static.

We have the parameter "type" in the /validate/check request, so that an application can define, which tokentype should be used for authentication in this request.

We could add a list of token types to this parameter, so that privacyIDEA could check

  • authenticate user with the first tokentype in the list
  • if the user does not have such a tokentype, take the 2nd one...

We could also do this as a policy.

Top level requirements and scenarios

Describe what needs to be achieved and how the scenario looks like

If a user has several tokentype enrolled, we somehow need to be able to only use a specific token type for authentication.

E.g. to avoid spamming user with SMS.

@cornelinux cornelinux added Type: Feature request A change requested or proposed by a user which is not on the default roadmap Topic: Policy in regards to event handler modules and events (can be function, DB or UI) Topic: Authentication Authentication-flow related issues labels Sep 5, 2023
@plettich
Copy link
Member

plettich commented Sep 5, 2023

Maybe related to #3695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: Authentication Authentication-flow related issues Topic: Policy in regards to event handler modules and events (can be function, DB or UI) Type: Feature request A change requested or proposed by a user which is not on the default roadmap
Projects
None yet
Development

No branches or pull requests

2 participants