Spring Security Adapter: how to fallback to form login if Keycloak server is not available?

It’s my first post in this community, so…hi everyone :slight_smile:

I’m trying to integrate Keycloak with a classic/old Spring (version 3.2.x) application that already has its own credentials/roles

I somewhat succedeed following verbatim the official docs but one thing isn’t clear to me: if Keycloak auth server set in keycloak.json was not available, i’d like users to be presented the “classic” Spring security login form (to let them authenticate with application’s own credentials)

As of now, if Keycloak auth server is not available, the authentication will stop with an error

2021-01-05 16:31:28,687 WARN KeycloakDeployment.resolveUrls(193) | Failed to load URLs from http://nonesistent-auth-server:8080/auth/realms/mycompany/.well-known/openid-configuration
java.net.UnknownHostException: nonesistent-auth-server: Name or service not known
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)

Is my use case already expected, and if so, can anyone give me advice to implement it…or should I invest in making Keycloak highly available (with clustering, for example)?

Thanks a lot,

Paolo