Method-level security
Method-level security is authorization enforced on individual method invocations according to the caller’s identity or authorities.
Spring Security in Action, Second Edition
Global method security is a method-authorization capability that applies authorization rules across application methods.
- How it is used
- Protects methods across web and non-web application layers when endpoint authorization is too coarse.
- How deep it goes
- Descends to annotations, SpEL expressions, AOP interception, and custom evaluators, while deferring filtering details.
- Examples
- Uses document ownership, administrator permissions, @RolesAllowed, @Secured, curl requests, and direct method-security tests.
- What you can do after
- Apply it via Spring Security annotations, SpEL rules, custom PermissionEvaluator implementations, and focused authorization tests.
Read how Spring Security in Action, Second Edition explains method-level security →
Spring AI in Action
Method-level security is authorization enforced when application methods are invoked based on the caller's identity or authorities.
- How it is used
- Protects application and LLM-tool methods from unauthorized callers.
- How deep it goes
- Explains configuration, annotations, SpEL evaluation, role checks, and denied invocations.
- Examples
- Uses getGameComplexity, Function.apply(), PREMIUM_USER, and Burger Battle requests.
- What you can do after
- Apply it via Spring Security annotations to restrict methods and tools by role.
Read how Spring AI in Action explains method-level security →
Also covered in
What to know first
- Spring Expression LanguageSpring Expression Language is an expression language integrated with Spring for querying and manipulating object graphs and evaluating values, conditions, and configuration rules.
Related concepts
- @EnableMethodSecurityconfigured by · @EnableMethodSecurity is a Spring Security annotation that enables authorization checks on secured method invocations.
- authorizationimplements · Authorization is the determination of which actions or resources an identity or other entity is permitted to access under defined permissions or policies.
- call authorizationused by · Call authorization is method-level authorization that decides whether a method may be called or whether its returned value may be accessed.
- Spring Securityused by · Spring Security is a framework for securing Java and Spring applications through authentication, authorization, access control, and related security mechanisms.
- interceptorused by · An interceptor is a software component that intercepts operations, requests, or messages to inspect or modify them or apply behavior around their processing.
- preauthorizationincludes · Preauthorization is authorization checking performed before a protected method executes, preventing the call when its conditions are not satisfied.
Questions about method-level security
What is method-level security?
Method-level security is authorization enforced on individual method invocations according to the caller’s identity or authorities.
Which Manning books explain method-level security?
Spring Security in Action, Second Edition and Spring AI in Action.
What should I know before learning method-level security?
Manning books that teach method-level security usually introduce Spring Expression Language first.
What kinds of method-level security are there?
Kinds of method-level security include preauthorization.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

