Access Control Mechanisms
Published:
Some common access control mechanisms like ACL, RBAC, PBAC that are widely used in software systems.
1. Access Control List (ACL):
- ACL is a list of permissions attached to an object. The list specifies who or what is allowed to access the object and what operations are allowed to be performed on the object.
| Title | Owner Control | Read | Write | Execute |
|---|---|---|---|---|
| John | X | X | X | |
| Admin | X | X | X | X |
| Reviewer | X | X |
Trong ví dụ là 1 ma trận của đối tượng và quyền, tương tự cách quản lý file trên Linux (chmod) và phù hợp với những ứng dụng có ít đối tượng.
Khi hệ thống lớn lên mô hình này sẽ không thể quản lý nổi bởi ma trận được tạo ra quá lớn và phức tạp. Do vậy và mô hình này không còn phổ biến hiện tại.
2. Role-Based Access Control (RBAC):
- RBAC is a method where permissions are associated with roles, and users are assigned to these roles. Therefore, users gain permissions through their roles.

- RBAC liên kết
Entities->Role, và từRole->Permissions. Ví dụ role Administrator có thể thừa hưởng mọi permissions của role Manager => giảm độ phức tạp của ma trận quyền, thay vì gán toàn bộ quyền cho Administrator thì chỉ cần cho Administrator thừa hưởng các quyền của Manager.
- Nhược điểm: Chưa hoàn toàn fine-grained, không thể gán quyền cụ thể hơn
3. Policy-Based Access Control (PBAC):

- PBAC được xây dựng dựa trên Attribute Based Access Control (ABAC), qua đó định nghĩa các quyền để diễn đạt một yêu cầu được cho phép hay từ chối
ABAC sử dụng
Attributesđể mô tả cho đối tượng cần được kiểm tra, mỗi thuộc tính là 1 cặp key-value ví dụDepartment = Marketing=> ABAC có thể phân quyền fine-graned hơn phù hợp nhiều context và business khác nhau- Ví dụ PBAC:
{
"subjects": ["user:john", "user:katy", "user:perry"],
"effect": "allow",
"actions": ["catalog:delete", "catalog:update", "catalog:publish"],
"resources": ["product:john-leman", "product:john-doe"],
"conditions": {
"IpAddress": {
"addresses": ["192.168.0.0/16"]
}
}
}
- Advantages:
- Fine-grained access control based on attributes
- Scalibility
- Disadvantages:
- Complexity

Leave a Comment