Clarify class-level interceptor binding inheritance #33666
Labels
area/arc
Issue related to ARC (dependency injection)
area/security
kind/enhancement
New feature or request
Milestone
Description
The Java language and the CDI specification (following Common Annotations) both define that class-level annotations are inherited only if they are
@Inherited
. By default, ArC inherits class-level annotations even if they are not@Inherited
, which is confusing and wrong.Unfortunately, it is also what Quarkus security expects -- because it uses annotations such as
@RolesAllowed
as [inheritable] interceptor bindings. In #33523, we fixed this in ArC strict mode, but by default, non-@Inherited
annotations are still inherited.Implementation ideas
One option is to fix inheritance of interceptor bindings for good and use annotation transformations to make the security annotations
@Inherited
.The text was updated successfully, but these errors were encountered: