Computer >> Hướng Dẫn Máy Tính >  >> Kết Nối Mạng >> An Ninh Mạng

AAA Network Security (Authentication, Authorization, Accounting) - Cơ chế, Triển khai, Cisco ISE, RADIUS/TACACS+

AAA là gì?

AAA (Authentication, Authorization, Accounting) - Khung.framework kiểm soát truy cập mạng tiêu chuẩn. "Ba A" đại diện cho:

  1. Authentication (Xác thực): "Bạn là ai?" - Xác minh danh tính (User, Device, Process). Credentials: Username/Password, Certificate, Token, Biometric, MFA.
  2. Authorization (Uỷ quyền): "Bạn được làm gì?" - Cấp quyền truy cập tài nguyên, lệnh, lệnh CLI, VLAN, ACL, Dải IP, Dịch vụ dựa trên Policy/Role/Group.
  3. Accounting (Kế toán/Ghi log): "Bạn đã làm gì?" - Ghi lại hoạt động: Thời gian đăng nhập/đăng xuất, Lệnh thực thi (CLI), Lượng dữ liệu (Bytes/Packets), Session duration, Billing.

Giao thức AAA chuẩn

Giao thứcPortĐặc điểmDùng cho
RADIUS
(Remote Authentication Dial-In User Service)
UDP 1812 (Auth), 1813 (Acct)IETF Standard. Combine Auth+Authz trong 1 request. Attribute-Value Pairs (AVP). Hỗ trợ EAP (802.1X). Không mã hóa toàn gói tin (chỉ Password).Wi-Fi Enterprise (802.1X), VPN, Dial-up, ISP, Network Device Admin (ít dùng).
TACACS+
(Terminal Access Controller Access-Control System Plus)
TCP 49Cisco Proprietary (mở rộng). Tách biệt Auth, Authz, Acct. Mã hóa TOÀN BỘ payload (Header + Body). Hỗ trợ Command Authorization chi tiết (per-command). Reliable (TCP).Quản trị thiết bị mạng (Router, Switch, Firewall CLI) - Phân quyền lệnh chi tiết. AAA cho Network Admin.
DiameterTCP/SCTP 3868Thế hệ sau RADIUS. Hỗ trợ roaming, proxy, reliability, capacity lớn. 3G/4G/5G IMS, LTE, WiMAX.Telecom, Mobile Core, Large Scale AAA.

Triển khai AAA trên thiết bị Cisco (IOS/IOS-XE/NX-OS)

! 1. Bật AAA
aaa new-model

! 2. Định nghĩa Server Group (RADIUS/TACACS+)
aaa group server radius ISE_RADIUS
 server name ISE_PRIMARY
 server name ISE_SECONDARY
!
aaa group server tacacs+ ISE_TACACS
 server name ISE_TACACS_PRI
 server name ISE_TACACS_SEC
!

! 3. Cấu hình Method Lists (Thứ tự thử)
! Login (VTY, Console, SSH)
aaa authentication login DEFAULT group ISE_RADIUS local
aaa authentication login CONSOLE_NONE none  ! Console không cần auth (cẩn thận!)

! Enable (Privilege 15)
aaa authentication enable default group ISE_TACACS enable

! Command Authorization (Chỉ TACACS+ hỗ trợ tốt)
aaa authorization commands 0 default group ISE_TACACS none  ! User mode
aaa authorization commands 1 default group ISE_TACACS none
aaa authorization commands 15 default group ISE_TACACS none  ! Privilege 15

! Exec Authorization (Shell access)
aaa authorization exec default group ISE_TACACS local

! Network Authorization (VPN, 802.1X, Per-user ACL/VLAN)
aaa authorization network default group ISE_RADIUS local

! Accounting
aaa accounting exec default start-stop group ISE_TACACS
aaa accounting commands 15 default stop-only group ISE_TACACS
aaa accounting network default start-stop group ISE_RADIUS
aaa accounting connection default start-stop group ISE_RADIUS

! 4. Áp dụng cho Line VTY/Console
line vty 0 15
 login authentication DEFAULT
 authorization exec DEFAULT
 authorization commands 15 DEFAULT
 accounting exec DEFAULT
 transport input ssh
!
line console 0
 login authentication CONSOLE_NONE  ! Hoặc DEFAULT nếu muốn auth console

Cisco ISE (Identity Services Engine) - AAA Server hàng đầu

  • Hỗ trợ RADIUS (802.1X, MAB, VPN, Guest) & TACACS+ (Device Admin).
  • Policy Sets: Conditions (AD Group, Device Type, Posture, Time, Location) → Results (VLAN, dACL, SGT, Profile, Authorization Policy).
  • Profiling: Nhận diện thiết bị (DHCP, HTTP, NMAP, NetFlow, CDP/LLDP) → Gán Endpoint Identity Group.
  • Posture/Compliance: Kiểm tra AV, Patch, Disk Encryption, Registry trước khi cho truy cập mạng (AnyConnect/NAC Agent).
  • Guest/Portal: Self-registration, Sponsor approval, AUP, CWA (Central Web Auth).
  • TrustSec/SGT: Security Group Tag - Micro-segmentation không cần ACL phức tạp.
  • PIA (Passive Identity): Học Identity từ AD Logon, VPN, DHCP, Syslog, NetFlow.

So sánh RADIUS vs TACACS+ cho Device Admin

Tiêu chíRADIUSTACACS+
Mã hóaChỉ Password (AVP)Toàn bộ Payload
Command AuthorizationYếu (Chỉ Privilege Level)Mạnh (Per-command, RegEx)
TransportUDP (Unreliable)TCP (Reliable)
Multi-vendorChuẩn mở (Tốt)Cisco (Hỗ trợ một số vendor khác)
AccountingTốt (Session, Data volume)Tốt (Command logging chi tiết)
Khuyến nghị802.1X, VPN, WirelessNetwork Device Admin (CLI)

AAA trong Zero Trust Architecture

  • Identity Provider (IdP): Azure AD, Okta, Ping - làm Authentication (SAML/OIDC).
  • Policy Decision Point (PDP): Làm Authorization (Policy Engine: OPA, Cedar, Cloud Vendor).
  • Policy Enforcement Point (PEP): Proxy, Gateway, Sidecar, Agent - Enforce quyết định.
  • Logging/Audit: Làm Accounting (SIEM, Cloud Audit Logs).
  • AAA truyền thống (RADIUS/TACACS+) vẫn cốt lõi cho Network Infrastructure Access (Router/Switch/Fireless Controller/Firewall CLI).

Best Practices AAA

  1. Luôn dùng TACACS+ cho Device Admin (CLI), RADIUS cho 802.1X/VPN.
  2. Bật Accounting (Command Accounting quan trọng cho Audit/Forensics).
  3. Dùng Method Lists riêng cho từng Line/Service (không dùng DEFAULT cho tất cả).
  4. Cấu hình Fallback Local (local database) nếu AAA Server down.
  5. Bảo mật kênh AAA: Key mạnh, Source Interface Loopback, ACL cho phép chỉ AAA Server IP.
  6. Monitor & Alert: AAA Server unreachable, Failed auth spike, Privilege escalation.
  7. Review log Accounting định kỳ (Compliance, Insider Threat).

Kết luận

AAA là xương sống kiểm soát truy cập hạ tầng mạng. Hiểu rõ Authentication/Authorization/Accounting, RADIUS vs TACACS+, cấu hình Cisco `aaa new-model`, và tích hợp với Cisco ISE/IdP hiện đại là kỹ năng bắt buộc cho Network Security Engineer và Network Engineer cấp cao.