이 모듈은 Studio Platform 의 데이터베이스 기반 ACL 구현과 관련 서비스를 제공한다. Spring Security ACL의 표준 테이블을 기반으로 하며, Spring Security ACL과 통합되어 권한 관리용 고수준 API를 제공한다.
- 목적: ACL 메타데이터 저장, 권한 관리, 정책 갱신
- 의존: Spring Security ACL, JPA 리포지토리(일부 경로에서 선택)
- 제공: 서비스, 정책 동기화, 관리자 엔드포인트(스타터를 통해 노출)
studio-platform-starter-security-acl 를 의존성에 추가하면 자동으로 구성된다.
dependencies {
implementation("studio.one.starter:studio-platform-starter")
implementation("studio.one.starter:studio-platform-starter-user")
implementation("studio.one.starter:studio-platform-starter-security")
**implementation("studio.one.starter:studio-platform-starter-security-acl")**
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
**implementation("org.springframework.boot:spring-boot-starter-security")**
**implementation("org.springframework.security:spring-security-acl")**
}
ACL 기능은 **studio.security.acl.enabled=true**로 활성화된다.
studio:
security:
enabled: true
acl:
enabled: true
설정예시 (YAML)
studio:
security:
acl:
enabled: true
cache-name: aclCache
admin-role: ROLE_ADMIN
metrics-enabled: true
audit-enabled: true
sync:
enabled: true
web:
enabled: true
base-path: /api/mgmt/acl
defaults:
enabled: true
policies:
- domain: attachment
component: download
roles:
- role: ROLE_USER
actions: [READ, DOWNLOAD]
- role: ROLE_ADMIN
actions: [ADMIN]
studio.security.acl.web.base-path**는 관리용 API 경로이며, 기본값은 /api/mgmt/acl이다.studio.security.acl.metrices-enabled 는 매트릭 기록 여부를 활성화하여 기록할 수 있다.studio.security.acl.audit-enabled 를 ture 값으로 설정 감사로그를 남길 수 있다. ACL 감사 로그는 INFO 레벨에서 ACL_AUDIT_ 프레픽스롤 출력하게 된다.studio.security.acl.admin-role 기본값은 ROLE_ADMIN이며, 필요 시 이 값을 바꿔서 ACL 관리 권한을 변경할 수 있다.studio.security.acl.cache-name 캐쉬 이름은 선택 사항으로 디폴트 값은 aclCache 이다. 캐쉬 기능은 스프링의 Cache 기능이 활성화 되면 적용된다.AclPolicyDescriptor 기반이며 domain/component/roles/actions 구조를 따른다. 데이터베이스를 사용하지 않고 설정 값을 기준으로 정책을 반영한다.가장 쉽게 적용하는 방법은 REST API 를 통하여 정책을 생성하여 적용하는 방법이다. 이름 위해 테이블 생성이 필요하다. REST API 는 **studio.security.acl.web.enabled=true**설정을 통하여 활성화된다.
Spring Security ACL(Access Control List) 표준 스키마로, 앞서 설계한 RBAC(Role-Based Access Control) 시스템을 보완하여 **객체 수준의 정밀한 권한 제어(Fine-grained Authorization)**를 가능하게 한다. 이를 기반으로 시스템은 "누가 어떤 역할을 가졌는가(Role)"를 넘어 **"누가 특정 데이터 레코드(Object)에 대해 읽기/쓰기 권한을 가졌는가"**를 완벽하게 통제할 수 있다.
erDiagram
acl_sid ||--o{ acl_object_identity : "owns"
acl_sid ||--o{ acl_entry : "assigned to"
acl_class ||--o{ acl_object_identity : "defines type"
acl_object_identity ||--o{ acl_entry : "has rules"
acl_object_identity ||--o| acl_object_identity : "parent (inheritance)"
acl_sid {
bigserial id PK
boolean principal "User(true) or Role(false)"
varchar sid "Username or RoleName"
}
acl_class {
bigserial id PK
varchar class "Fully Qualified Class Name"
}
acl_object_identity {
bigserial id PK
bigint object_id_class FK
varchar object_id_identity "Domain Object ID"
bigint parent_object FK
bigint owner_sid FK
boolean entries_inheriting
}
acl_entry {
bigserial id PK
bigint acl_object_identity FK
int ace_order
bigint sid FK
integer mask "Permission (1:Read, 2:Write, etc)"
boolean granting
}