Why not just remove the role/permission which is granting this function and then succeed the flow. This will grant the user a token which is not capable to access the function which the application than could inform the user about.
As the user is also from the application point of view able to login but not use the function I would say this is a cleaner approach. Also he might have still budget for other functions so this will also scale for this.
So TLDR
Mit freundlichen Grüßen / Best regards
Markus Till
Project Delivery Berlin 22 (IOB/PAU1)
Bosch.IO GmbH | Ziegelei 7 | 88090 Immenstaad |
GERMANY | www.bosch.io
Tel. +49 30 726112-354 | Mobil +49 172 5782078 | Telefax +49 30 726112-100 |
Marku...@bosch.io
Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Stefan Koss; Geschäftsführung: Dr. Andreas Nauerz, Yvonne Reckling
--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
keycloak-dev...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/keycloak-dev/4511729e-df4f-480c-a8a4-86e9eeb4bb9fn%40googlegroups.com.
--
Hello Cornelia et al.,I see two additional options here you could try:1) Instead of letting the auth flow fail, you could simply restart the flow (with a message) and let the new auth session timeout.2) You could implement you own BruteForceProtector which does not count such failures: https://github.com/thomasdarimont/keycloak-project-example/blob/main/keycloak/extensions/src/main/java/com/github/thomasdarimont/keycloak/custom/security/bruteforce/AcmeBruteForceProtector.javaHowever it would be great to have an API that would allow to fail / abort an authentication flow without counting towards the bruteforce limit.@Lokesh Regarding the Required Action:This would probably work, but then the user would in fact have a working authentication session that might enable the user to access other clients or functionality if not locked down thoroughly.@Markus:Regarding "Check the budget for the function before authentication is done"How do you check whether a user has sufficient funds before you authenticate the user? I think what would work is to check for funds before / during (as part of) the authorization, either on the Keycloak side, in a middleware / gateway or the app.Cheers,Thomas
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/CAGT0TQ13tTqsqp4hQ7KH1ipRz%2BK5jV69ryMGL3t2YW7CVWruRQ%40mail.gmail.com.