# Best practise for disabling password login for a realm

**URL:** <https://forum.keycloak.org/t/best-practise-for-disabling-password-login-for-a-realm/12892>\
**Category:** Getting advice\
**Created:** [January 5, 2022, 8:41am UTC](https://forum.keycloak.org/t/best-practise-for-disabling-password-login-for-a-realm/12892 "2022-01-05T08:41:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnulnets](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dnulnets/32/3343_2.png) [@dnulnets](https://forum.keycloak.org/u/dnulnets)\
**Post date:** [January 5, 2022, 8:41am UTC](https://forum.keycloak.org/t/best-practise-for-disabling-password-login-for-a-realm/12892/1 "2022-01-05T08:41:15Z")

</div>

Hi,

I want to used IdP brokered login only and in my case it offers a much higher assurance level of the user identity than keycloaks userid/password and I would like to thoroughly disable that method for logging in. I am using Keycloak 16.1.0.

I have looked around as good as I could and it seems to be different opinions and solutions for disabling password login. And I just want to make sure that I have thought of everything.

1. Created a new theme and removed all mentions on password logins.
2. Disabled everything from the “Login”-Tab of “Realm Settings”.
3. Routing from internt only towards auth/realms och auth/resources
4. Set regular expressions to \A(?!x)x on password policy and maximum length to -1

Anything else that comes to mind?

Thanks,

Tomas
