Skip to content

Add JSR-250 annotation support to shiro-aspectj #2979

Backlog

Description

@Oct0b12

Search before asking

Feature Request

Background
Apache Shiro's security model and the reply from the security mailing list both state that the AspectJ integration has never supported the @RolesAllowed, @permitAll and @Denyall annotations. This is a missing feature rather than a security vulnerability, and the team suggested raising it through a public issue as a feature request.

Request
Please add support for JSR-250 security annotations to shiro-aspectj, bringing it in line with other integrations such as CDI.

Current Status
AuthorizationAnnotations.allTypes() already conditionally registers JSR-250 annotations when jakarta.annotation is available on the classpath. ShiroAnnotationAuthorizingAspect's pointcut historically covered only the five Shiro annotations. PR #2974 changed it to a broad match plus AnnotationHierarchy, but the gate still checks only AuthorizationAnnotations.shiroTypes(). As a result, applications that use JSR-250 annotations and rely on AspectJ weaving have those authorization annotations silently ignored.

Suggestion
Change the AspectJ gate from AuthorizationAnnotations.shiroTypes() to AuthorizationAnnotations.allTypes(), or otherwise include the JSR-250 annotation types, and add corresponding weaving tests.

Note
This is a feature enhancement request, not a security vulnerability report.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Activity

  1. lprimak commented on Nov 30, 2026

    @lprimak
    Contributor

    Thanks for your report. Would you consider issuing PR for this? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions