Problem with Spring Security configuration

Asked

Viewed 174 times

0

Guys I’m having trouble in the following scenario:

I have two projects, where one is the Resource project and the other project is the authentication server, both projects were built with spring boot.

The project with the application server is working normally with spring-security Oauth2, here I have nothing to complain about. In the client project I have a problem, when I run the application through spring boot, there is no error, however when I pass the two applications to Tomcat (external server), the client project creates a request for the authentication server in the context of spring, but as Tomcat has not finished publishing the projects the application hangs on that part.

I also performed a test to check that if you only upload the client project by spring boot(built-in Tomcat), it does not create this request and add the project normally.

the property that creates the request is in the application.properties and is in the following way:

security.oauth2.resource.jwt.keyUri=http://localhost:8080/partner-interface-oauth2/oauth/token

Thank you for your attention and help!

1 answer

1


We solved the problem by adding the public key in the property file with the security.Oauth2.resource.jwt.keyValue. So the Resourceservertokenservicesconfiguration class does not need to make a request for an authentication server on startup;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.