Questions tagged [jsr250]

JSR 250: Common Annotations for the Java Platform

Specification: JSR 250

23 questions
0
votes
1 answer

Disable JSR250 method security by Spring Boot profile

I'm securing my HTTP controller endpoint methods using @RolesAllowed annotations, authenticated by Keycloak. Security is activated by @EnableWebSecurityand @EnableGlobalMethodSecurity(jsr250Enabled = true) config annotations on a…
Michael Böckling
  • 7,341
  • 6
  • 55
  • 76
0
votes
0 answers

Servlet access authorization through annotation and Spring Security

while trying to implement Spring Security and OAuth2, I have been able to make things work through a very simple example with 2 servlets but I have an issue while securing one of these servlets access : "AdminTestServlet" should only be authorized…
Benjamin C
  • 119
  • 2
  • 11
0
votes
0 answers

Spring security - How to Map the Roles inside the Access token to enable the @RolesAllowed annotations in JSR250

We are trying to Auhenticate / Authorise our Java Application using Spring Security. Our Identity Provider is a custom OAUTH provider (Manages the user and its Permission) and upon successful authentication will redirect to our application with…
0
votes
2 answers

Annotation base configuration in standalone Java program

I was made aware with the annotation base configuration (the @Resource) feature in Java EE which I really like. Then I noticed that the annotation was actually part of Java SE. So I wonder if I can use it with Java SE. I can surely use the…
NawaMan
  • 25,129
  • 10
  • 51
  • 77
0
votes
0 answers

Spring global method security and rememberMe not working together

I also have two separate paths to secure so each one has its own config. My config: (the same for path-a & path-b) @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled = true, jsr250Enabled = true) @Order(2) public class…
Elyran
  • 313
  • 2
  • 10
0
votes
0 answers

Spring Security: Token based authentication and JSR 250

@RestController public class ApplicationController { @PermitAll @RequestMapping(value = "/", method = RequestMethod.GET) public String index() { return "Greetings from ContextConfig Boot!"; } @RolesAllowed({"ADMIN"}) …
rrader
  • 351
  • 1
  • 2
  • 11
0
votes
2 answers

How to secure multiple endpoint with SecureAnnotationsInterceptor (Apache CXF)?

I am using Apache CXF and I'd like to use the SecureAnnotationsInterceptor to secure my endpoint with the @RolesAllowed annotation. As far as I understand, I have to tell the interceptor which object to protect through passing the reference to the…
poussma
  • 7,033
  • 3
  • 43
  • 68
0
votes
1 answer

Spring Security + JSR 250 + EJB 3.1 not working

My JEE6 webapp (mainly CDI, EJB 3.1 and JSF 2) uses Spring Security 3, but not Spring dependency injection or MVC. I implemented a Spring AuthenticationProvider to handle the login. During login, I add roles to my users depending on some custom…
Sebi
  • 8,323
  • 6
  • 48
  • 76
1
2