We want to use a step-up mechanism to require different authentication levels (1FA, 2FA) for the different clients of a realm. For this we have set up the step-up flow as described in the Server Administration guide. Then we set default ACR values for each client as described in the guide. However, as is specified in various warning boxes throughout the linked sections, users can avoid having to provide their second factor for clients with default ACR 2 by specifying acr_values=1 in the URL.
Is there any way to enforce the default ACR values set in the client/realm options (e.g. the acr_values param would be ignored or rejected when authenticating a user)? That way we could manage what authentication level is required for which service centrally through Keycloak instead of having to tell all client developers that they have to double-check the ID token for the correct ACR value defined by us.
I have read the section about ACR claims in the OIDC core specification and I do not know if this would break the OIDC conformity. It sounds like the acr_values have to be considered if present in the URL. As far as I understand the default case for step-up is to provide different authentication levels within a client (like a higher level for payment related actions) in which case doing the requests for step-up and checks in the client code is necessary anyway. However, for our use case enforcing the default values would be preferable.
