📘 Tuần 2 – Admin, Phân quyền và Password Policy
📘 Tuần 2 – Admin, Phân quyền và Password Policy
🗺️ Sơ đồ – Hệ thống Admin và Phân quyền
📚 Lý thuyết cơ bản
🔰 Admin Roles trong Palo Alto
Palo Alto có 2 loại vai trò admin:
1. Dynamic Roles (Vai trò cố định):
| Role | Quyền hạn |
|---|---|
| superuser | Toàn quyền, kể cả tạo/xóa admin khác |
| superreader | Chỉ đọc toàn bộ |
| deviceadmin | Quản trị thiết bị, không thay đổi được admin superuser |
| devicereader | Chỉ đọc cấu hình thiết bị |
2. Custom Roles (Vai trò tùy chỉnh):
💡 Bạn tự định nghĩa: admin này được xem log, admin kia được thay đổi policy, admin khác chỉ xem không sửa.
🔰 Authentication Profile là gì?
Authentication Profile = "Cổng kiểm tra danh tính" – quy định cách xác thực khi đăng nhập.
💡 Giống như cổng an ninh sân bay: - Dùng CMND (Local DB) → đơn giản, phù hợp lab nhỏ. - Dùng passport có chip (LDAP/AD) → chuyên nghiệp, dùng tài khoản Windows domain. - Dùng Face ID + CMND (RADIUS + MFA) → bảo mật cao nhất.
🔰 Commit trong Palo Alto – Tại sao quan trọng?
💡 Palo Alto hoạt động theo mô hình "Running Config vs Candidate Config": - Candidate Config = Bản nháp (chỗ bạn đang thay đổi). - Running Config = Bản đang chạy thực tế. - Commit = Áp dụng bản nháp → thành bản chạy thực tế. Nếu không Commit → thiết bị reboot → mất hết thay đổi!
🛠️ Thực hành
Tạo Custom Admin Role
text# Qua GUI: Device → Admin Roles → Add
# Qua CLI:
admin@PA-LAB-01# set shared admin-role net-operator role device
admin@PA-LAB-01# set shared admin-role net-operator role device webui network read-write
admin@PA-LAB-01# set shared admin-role net-operator role device webui policies read-only
Tạo tài khoản Admin mới
text# Tạo admin vận hành mạng
admin@PA-LAB-01# set mgt-config users netadmin password
admin@PA-LAB-01# set mgt-config users netadmin permissions role-based custom profile net-operator
# Tạo admin chỉ xem
admin@PA-LAB-01# set mgt-config users ro_viewer password
admin@PA-LAB-01# set mgt-config users ro_viewer permissions role-based custom profile read-only-viewer
# Lưu lại
admin@PA-LAB-01# commit
Bật Password Policy
text# GUI: Device → Setup → Management → Password Complexity
admin@PA-LAB-01# set mgt-config password-complexity enabled yes
admin@PA-LAB-01# set mgt-config password-complexity minimum-length 12
admin@PA-LAB-01# set mgt-config password-complexity uppercase yes
admin@PA-LAB-01# set mgt-config password-complexity lowercase yes
admin@PA-LAB-01# set mgt-config password-complexity numeric yes
admin@PA-LAB-01# set mgt-config password-complexity special-char yes
admin@PA-LAB-01# set mgt-config password-complexity password-change-on-first-login yes
admin@PA-LAB-01# set mgt-config password-expiry-days 90
admin@PA-LAB-01# commit
Bật Lockout sau nhiều lần đăng nhập sai
text# GUI: Device → Setup → Management → Authentication Settings
admin@PA-LAB-01# set deviceconfig setting management failed-attempts 3
admin@PA-LAB-01# set deviceconfig setting management lockout-time 10
admin@PA-LAB-01# commit
🔒 Bảo mật cần nhớ
- ✅ Không dùng chung tài khoản
admingiữa nhiều người. - ✅ Dùng Custom Role – không gán superuser cho vận hành hàng ngày.
- ✅ Bật lockout sau 3 lần đăng nhập sai → chống brute-force.
- ✅ Commit sau mọi thay đổi!
📖 Case thực tế
Công ty có 5 kỹ thuật viên cùng dùng tài khoản admin. Một ngày security policy bị thay đổi sai → không ai nhận lỗi vì log chỉ ghi "admin đã thay đổi". 👉 Giải pháp: Tạo tài khoản named riêng + Custom Role cho từng người.
📅 Tuần 2/12 – PAN-OS Administration Lab trên PnetLab