If you need to extend the functionality of method security expressions in a Spring application to support custom permissions, how would you go about integrating a custom permission evaluator?
- Create a custom security interceptor
- Implement a custom PermissionEvaluator
- Modify the Spring Security core library
- Use predefined permission expressions
To support custom permissions in Spring Security, you should implement a custom PermissionEvaluator (Option 2). This interface allows you to define custom logic for evaluating permissions. Creating a custom security interceptor (Option 1) or modifying the Spring Security core library (Option 3) is not recommended and can be complex and error-prone. Predefined permission expressions (Option 4) may not cover all custom requirements.
Loading...
Related Quiz
- What considerations should be taken into account when determining the Time-To-Live (TTL) of a cache in a Spring Boot application?
- For creating custom auto-configuration in Spring Boot, the configuration class needs to be listed in the _____ file.
- Imagine you are developing a Spring Boot application with a read-heavy database workload. How would you optimize the application and database connectivity to handle high read requests efficiently?
- What is the primary file used to define properties in Spring Boot?
- In Spring Boot, to create a condition based on the presence or absence of a specific bean, the _____ annotation can be used.