-
Hi all, I'm using springaddons to implement the backend-for-frontend scenario, the bff springboot, as oauth2 client application, when starting needs to reach the url ".well-known/openid-configuration" of the authorization server, I'm using keycloak. I've seen that if keycloak-server is down my bff-server is unable to start, I have a difference from the tutorial, I have this class, without it the redirect uri coming from keycloak is without the schema (...&redirect_uri=/login/oauth2/code/default...), hostname and port parts, so it doesn't work, how does the tutorial work without this class and how can I be able to start bff even if in a the starting phase keycloak server is not available?
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can not run an OAuth2 system if other actors (clients and resource servers) can't reach the authorization server. Other actors use the OpenID configuration to auto-configure themself with:
You may configure all of these endpoints yourself instead of relying on OIDC auto-configuration, but at some point, the client will need to access the authorization server and it will also need to redirect users to it (with proper scheme, host and port). So just make your authorization server highly available (this is the most critical part in your system) and configure the authorization-server URIs properly on your clients and resource servers (either the authorization server itself or a proxy in front of it, but with scheme, host and port). |
Beta Was this translation helpful? Give feedback.
You can not run an OAuth2 system if other actors (clients and resource servers) can't reach the authorization server.
Other actors use the OpenID configuration to auto-configure themself with:
You may configure all of these endpoints yourself instead of relying on OIDC auto-configuration, but at some point, the client will need to access the authorization server and it will also need to redirect users to it (with proper scheme, host and port).
So just make your authorization serv…