👩‍🏫
Big ACL Docs
big-acl.comStatusSupport
  • Welcome
  • What is Big ACL ?
  • Getting started
    • Signing up
    • Authoring your first rule
    • Writing Effective Rules
  • Key Concepts
    • Lifecycle of an Authorization Rule
    • Managing Exceptions
  • Authorization Landscape
    • RBAC
    • ABAC
    • ReBAC
    • CEDAR
    • XACML
    • Zanzibar
    • OAuth 2.0 Rich Authorization Requests
  • API
    • Authentication
    • Authorization
  • Connectors
    • Spring Security
    • Open Policy Agent
    • Amazon Verified Permissions
Powered by GitBook
On this page
  • Use Method-Level Security
  • Configure Big ACL Connector

Was this helpful?

  1. Getting started

Deploying policies

Assume the application you want to secure relies on Spring Security.

Use Method-Level Security

Method-level security is used to restrict access at the controller, service or repository layer.

Use @PreAuthorize or @PostAuthorize annotations to apply authorization checks on method calls. These annotations support SpEL (Spring Expression Language) for complex conditions.

@Service
public class ReportService {

    @PreAuthorize("hasPermission(#reportId, 'REPORT', 'READ')")
    public Report getReportById(Long reportId) {
        // Method logic here
    }

    @PreAuthorize("hasPermission(#report.id, 'REPORT', 'UPDATE')")
    public void updateReport(Report report) {
        // Logic for updating the report
    }
    
}

Configure Big ACL Connector

Big ACL provides a connector for Spring Security and Spring Security ACL

Including the dependency in your project

    <dependency>
      <groupId>com.bigacl</groupId>
      <artifactId>spring-security</artifactId>
    </dependency>

Last updated 6 months ago

Was this helpful?

Page cover image