I am working with the Python keycloack provider an...
# python
m
I am working with the Python keycloack provider and am looking for some guidance on the
password_policy
key https://www.pulumi.com/registry/packages/keycloak/api-docs/realm/#password_policy_python and its allowed/accepted values. For example, the keycloak server has an password policy in the UI
Not Recently Used
. If I want to use that value in password_policy, should it be
notRecentlyUsed(3)
? I looked through the keycloak docs search for anything under
PasswordPolicy
but didn’t come across that value https://www.keycloak.org/docs-api/21.0.1/javadocs/index-all.html Would greatly appreciate it if someone has any functional examples around that bit.
e
Surprisingly this seems to be completely undocumented by keycloak! It looks like the simplest way to do this is to edit things in the keycloak console, then use the rest api to see what the console set the value to (
GET <KEYCLOAK_HOST>/auth/admin/realms/<YOUR_REALM>
) and then copy that to your program.
m
Yeah or u can export the entire realm config and search for the right keyword. More layers of abstraction, more places to search, and the less u find 🙂