Relative Content

Tag Archive for javaspring-bootspring-security

CSRF token validation alway giving 403 for protected routes

I am new to java we have implimented CSRF token validation for for protected routes even token matched its giving 403, please check below code.
I have /api/auth/send-otp will send the otp to email address and /verify will verity the otp and if its valid return access_token and when trying to retrive refresh token with post call /token this time we are getting 403 error.

Multiple authentication mechanisms on same API path

In one of our services, it is possible to get requests from two sources, internal (within our cluster) and external. For internal requests, the request needs to be validated using JWT token. For external ones there are just headers that need to be checked.

SecurityConfig Circular Reference

I’ve been trying to figure out this error for days. I’ve looked at similar questions and they either don’t apply or I don’t know enough about spring-security to make them apply.
I’ve migrated to spring-boot-starter-parent 3.3.2 from 2.3.9.RELEASE to be able to do a Java 11 to 21 upgrade. I’m getting the following message on startup.