211 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
0
answers
71
views
Why Grails Spring Security validation and logout filter always applies?
I'm using Grails 6.2.0 with the Spring Security Core 6.1.2 and Spring Security Rest 5.0.0 plugins.
I configured the filters as recommended in the documentation (or at least how I understood it):
...
0
votes
0
answers
26
views
Springboot with jwt always gets authenticated but the other urls are always fails with username null from token
I tried to authenticate rest api controller with jwt and other without jwt. I am able to get the login response for the rest but all other calls are failing with error while extracting the username ...
-5
votes
1
answer
168
views
API Security and protection from non trusted clients
We are facing an issue with a malicious user who has details about how our website works. Using the developer tools in the browser, the login and subsequent APIs are studied and a mobile app is built ...
-1
votes
1
answer
1k
views
SecurityContext is null even if it was instantiated in SecurityContextHolder
I have a problem with Spring Security. When I'm trying to authenticate an user on my application, I'm redirected back to signin.html. After debugging, I saw that even if I'm instantiating ...
1
vote
0
answers
624
views
Spring boot security 6 - swagger 3: CSRF token only worked second call
I'm implementing spring boot security in our Java 17 project which uses Swagger 3. The login procedure appears when navigating to the swagger-UI before we can call one the endpoints. Which is normal. ...
0
votes
1
answer
95
views
Spring Security REST - Invalidate Refresh Token when accountExpired
I have an application that uses Grails 3.1, Spring Security, and Spring Security REST.
In my User entity, I have the accountExpired field, which, when set to true, prevents the user from accessing the ...
-1
votes
1
answer
2k
views
Spring security post v5 - how to get authentication manager for filter
I am using Spring security 6.1.3 and Spring boot 3.1.3.
For learning purposes, I am trying to connect to the secured service via Basic Auth and receive a JWT token. I keep getting a null ...
0
votes
0
answers
777
views
Getting 401 from Postman but 200 from Swagger with Spring Boot Security and JWT
When I request APIs in POSTMAN protected by Spring Boot Security, I get the following error: Unauthorized error: Full authentication is required to access this resource . But in Swagger, things are ...
0
votes
1
answer
61
views
Grails 5 RestfulController extension is showing default constructor missing problem
I am using grails-5.2.5 to migrate an application from grails-2.5.2 version. In grails-2 version there is a class RestVehicleTrackingController which extends RestfulController. The purpose of the ...
0
votes
0
answers
63
views
bug: spring security doesn't disting between roles
i have this spring security config, the idea is secure the endpoint for the only the user with the role "CARD-OWNER" have access to the data
@Configuration
@EnableWebSecurity
public class ...
1
vote
2
answers
2k
views
Extract Keycloak Principal in spring boot 3 using oauth
is there any way to extract Keycloak Principal in spring boot 3 using oauth?
With older version we accessed like below,
KeycloakAuthenticationToken authentication;
try {
authentication =
...
0
votes
1
answer
176
views
CreateProcess error=206, The filename or extension is too long while using Spring Security
I am using JDK v.1.8, Grails v.3.3.10. I am trying to implement some of the endpoints of my app as rest and remaining as normal web pages URL. So to achieve this added below lines in build.gradle file
...
1
vote
0
answers
364
views
How to make a proper jwt authentification for rest api using spring boot security?
I want to make a rest API where some endpoints are protected by an authentication base on users roles. I also would like to use JWT token and to check roles of user. Furthermore, I have seen countless ...
0
votes
2
answers
656
views
How to generate an api key and store it in a database as encrypted format
Here we need to find a mechanism on how to generate an api key and store it in a database in encrypted value and all requests to the api need to pass as a header called API_KEY and this value will be ...
1
vote
1
answer
2k
views
Spring security exception handling custom response
How is it possible to return a json instead a html?
I got:
<!doctype html>
<html lang="en">
<head>
<title>HTTP Status 401 – Unauthorized</title>
<...