spring-projects / spring-projects/spring-security

AuthorizationManagerAfterMethodInterceptor custom annotations and aspecj support

Open
#14,970 3 comments 0 reactions 1 assignee View on GitHub

@jzheaux is already working on this.

Since Apr 26, 2024.

status: feedback-provided
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

HI, in our application based on spring security 5 we used PostInvocationAdviceProvider with AfterInvocationProviderManager and also defined few custom annotations to limit access to methods based on our internal roles.
We are also using aspectj weaving and we want to make sure some security checks happen inside transaction. For that we use AspectJMethodSecurityInterceptor and aspectj transactional support.

After updating to spring security 6 it's not really understandable how we should migrate all that code to AuthorizationManagerAfterMethodInterceptor as a replacement for AspectJMethodSecurityInterceptor. Furthermore there is no mention on how to use this new interceptor with aspectj (it seems like only Spring AOP is supported). Are we missing something or are you planning to add more support for aspectj into spring security 6? Are there any guides how we could define custom annotations in spring security 6 and potentially use the new interceptor code also as an aspect?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.