I have a problem with security configuration. When the application starts, there is a GlobalSecurityConfiguration where KeyCloakConfig distributes requests between offline and online modes,
public GlobalSecurityConfiguration(BeanFactory beanFactory, KeyCloakConfig keyCloakConfig) { this.beanFactory = beanFactory; this.keyCloakConfig = keyCloakConfig; }
Where keyCloakConfigdistributes requests between offline/online false-need to check token/true-don`t
I have a KeyCloakConfig annotated with @RefreshScope, which updates my application.yml at runtime. However, the security configuration does not update (for example, I change true to false, check inside the code, but can still continue making requests)enter image description here
The piece of code needs to handle cases where the application begins without token authorization. enter image description here
I tried to make post request to change KeyCloakConfig, change it inside code and update with the help spring-boot-starter-actuator, but there is no changes. If write @refreshScope on GlobalSecurityConfiguration when application stars there is authorization window, but in 1x I have authorization by token, and secondly, even if I log in (the password is generated in the console, the login is user, it does not accept requests). I use idea – tomcat with deploy war
John_SL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.