Different Password Policies Based on Role and/or Group?

Currently there exists password policy configurations on the realm level which applies to all users regardless of their role and / or group.

Is there any way to extend the server to allow customization of password policies at a more fine grained level such as Role or Group?

Let’s say for example you have more stringent password length or complexity requirements for Admin users vs. regular login users.

You could enable MFA based on roles. Like make it mandatory for admin roles, optional for regular users.