Lý thuyết: Admin Roles & Privileged Identity Management
RBAC trong M365, PIM Just-In-Time và Access Reviews
Built-in Admin Roles trong Microsoft 365
| Role | Quyền hạn chính | Nguyên tắc |
|---|---|---|
| Global Administrator | Toàn quyền trên tenant | Tối đa 5 người, dùng tài khoản emergency |
| Global Reader | Xem tất cả, không sửa được | Audit, compliance review |
| User Administrator | Quản lý user, group, reset mật khẩu (trừ Admin) | Helpdesk L2/L3 |
| Exchange Administrator | Exchange Online settings, mailbox | Email team |
| Teams Administrator | Teams policies, meeting settings | Collaboration team |
| Security Administrator | Defender, Purview, Conditional Access | Security team |
| Billing Administrator | Subscriptions, purchase, invoice | Finance/Procurement |
| Intune Administrator | Device management, compliance policies | Endpoint team |
Privileged Identity Management (PIM)
PIM cho phép triển khai Just-In-Time (JIT) privilege — admin không có quyền thường trực, chỉ yêu cầu khi cần, được phê duyệt và có thời hạn. Yêu cầu Entra ID P2.
| Khái niệm PIM | Mô tả |
|---|---|
| Eligible assignment | User được chỉ định nhưng chưa có quyền. Phải activate để sử dụng. |
| Active assignment | User đang có quyền — thường trực hoặc có thời hạn. |
| Activation | User yêu cầu quyền: chọn thời gian, lý do, có thể cần MFA + approval. |
| Approval | Approver (manager hoặc security team) xác nhận yêu cầu. |
| Just-in-time window | Quyền tự động hết hạn sau 1—8 giờ (cấu hình được). |
| Access review | Kiểm tra định kỳ ai đang có quyền, có còn cần không. |
Zero Trust Principle cho Admin Accounts
| Nguyên tắc | Triển khai |
|---|---|
| Separate admin account | Admin dùng tài khoản riêng, không duyệt web thường ngày |
| MFA bắt buộc | Conditional Access yêu cầu MFA cho tất cả admin roles |
| No persistent privilege | Dùng PIM JIT — không ai có Global Admin thường trực |
| Audit everything | PIM log mọi activation, approval trong Entra audit logs |
| Emergency access account | 2 break-glass accounts: không MFA, không PIM, monitor alert 24/7 |
Lab thực hành: PIM Setup, JIT Activation và Access Review
Cấu hình PIM cho Global Admin, test activation và tạo access review
Lab A — Cấu hình PIM cho Global Administrator Role
- Vào entra.microsoft.com → Identity Governance → Privileged Identity Management → Microsoft Entra roles.
- Chọn Global Administrator → Settings.
- Cấu hình: Activation maximum duration:
4 hours. Bật Require justification on activation. Bật Require approval to activate. Chọn approver (Security team lead). Bật Require Azure MFA on activation. Click Update. - Vào Assignments → + Add assignments. Chọn user
[email protected]. Assignment type: Eligible. Click Assign.
User [email protected] có Eligible assignment cho Global Admin nhưng chưa có quyền. Phải activate qua PIM mới có hiệu lực.
Lab B — Activate PIM Role (góc nhìn user)
- Đăng nhập bằng tài khoản [email protected] → vào entra.microsoft.com → PIM → My roles → Microsoft Entra roles.
- Thấy Global Administrator trong tab Eligible. Click Activate.
- Nhập lý do:
Emergency maintenance — user bulk import. Chọn thời gian:2 hours. Điền MFA. Click Activate. - Approver nhận email → approve trong PIM portal. Admin nhận thông báo được activate.
- Sau 2 giờ: quyền tự hết hạn, user trở về quyền thường.
Lab C — Tạo Access Review cho Privileged Roles
- Vào Identity Governance → Access reviews → + New access review.
- Review type: Teams + Groups hoặc Microsoft Entra roles. Chọn role Global Administrator và Security Administrator.
- Reviewers: Manager of each user (hoặc chỉ định Security Officer cụ thể). Recurrence: Quarterly. Duration:
14 days. - Settings: bật Auto apply results. If reviewer doesn't respond: Remove access. Click Start.
Lab D — Kiểm tra Audit Log của PIM
Connect-MgGraph -Scopes "AuditLog.Read.All"
Get-MgAuditLogDirectoryAudit -Filter "loggedByService eq 'PIM'" -Top 20 |
Select ActivityDisplayName, ActivityDateTime, InitiatedBy, TargetResources
-------------------- ---------------- -----------
Add eligible member to role 2025-03-15T08:30:00Z [email protected]
Activate role 2025-03-15T09:00:00Z [email protected]
Tình huống thực tế: BIDV và Zero Trust Admin Model
Ngân hàng triển khai PIM theo chuẩn PCI DSS
BIDV — Quản lý 200 IT admin theo chuẩn PCI DSS
BIDV (Bank for Investment and Development of Vietnam) có 200 IT admin quản lý hạ tầng và M365. Chuẩn PCI DSS yêu cầu kinh kiểm soát truy cập đặc quyền và audit log đầy đủ. BIDV triển khai PIM cho 8 admin roles: activation tối đa 4 giờ, bắt buộc justification + approval + MFA. Access review hàng quý tự động thu hồi quyền nếu manager không confirm. Kết quả: giảm 73% tài khoản admin thường trực, đáp ứng kiểm toán PCI DSS không có exception lần đầu.
PIM Role Matrix của BIDV
| Role | Số người eligible | Max activation | Cần approval | Recurrence review |
|---|---|---|---|---|
| Global Administrator | 4 | 2h | Yes (CISO) | Monthly |
| Security Administrator | 8 | 4h | Yes (Security Lead) | Quarterly |
| Exchange Administrator | 12 | 4h | No | Quarterly |
| Intune Administrator | 15 | 4h | No | Semi-annual |
| User Administrator | 20 | 8h | No | Semi-annual |
| SharePoint Administrator | 10 | 4h | No | Quarterly |