Skip to content

Multi-Tenant & RBAC Security (IAM) ​

SyncBoot's security and authorization module provides multi-layered data isolation and access control tailored for enterprise environments.


Multi-Tenant Isolation Approaches ​

Depending on the operating environment and security requirements, two isolation approaches can be configured.

  1. Shared Database Approach:

    • Based on the tenant_id column in domain tables, a MyBatis-Plus interceptor automatically injects a WHERE tenant_id = ? condition into executed queries.
  2. Dedicated Database Approach:

    • Switches the Dynamic DataSource according to the tenant identifier at request time to connect to physically separated databases.

4-Tier Access Control Framework (RBAC Matrix) ​

TierScopeControl Mechanism
1. Menu Access ControlWeb Admin Console menusRenders only menus authorized for the user's role
2. Feature & Button ControlCreate, Update, Delete, Excel ExportControls button activation via the v-hasPermi directive
3. API Endpoint ControlBackend REST API pathsValidated via the Spring Security @PreAuthorize annotation
4. Data-Level ControlRow-level and column maskingAutomatically injects SQL conditions and applies sensitive-data masking annotations

Dynamic Data Masking ​

Sensitive data such as personal information can be processed at the backend response stage according to designated masking rules.

java
public class UserDetailDTO {

    private Long id;
    private String name;

    @Desensitize(type = DesensitizeType.PHONE) // 010-****-5678
    private String phoneNumber;

    @Desensitize(type = DesensitizeType.EMAIL) // qu***@empasy.com
    private String email;

    @Desensitize(type = DesensitizeType.ID_CARD) // 900101-1******
    private String residentNumber;
}