AAA (Authentication, Authorization, Accounting) คืออะไร?
AAA ย่อมาจาก Authentication, Authorization, และ Accounting เป็น Framework มาตรฐาน สำหรับ ควบคุมการเข้าถึงทรัพยากรเครือข่าย (Network Access Control) ใช้ใน Router, Switch, Firewall, VPN, Wireless Controller, RADIUS Server, TACACS+ Server
🔐 3 องค์ประกอบหลัก (The Three A's)
| องค์ประกอบ | คำถามที่ตอบ | ตัวอย่าง |
|---|---|---|
| Authentication (การยืนยันตัวตน) | คุณคือใคร? (Who are you?) | Username/Password, Certificate, MFA, Token, Biometric, 802.1X |
| Authorization (การอนุมัติสิทธิ์) | คุณได้ทำอะไร? (What can you do?) | Command Privilege Levels, VLAN Assignment, ACLs, Role-Based Access (RBAC) |
| Accounting (การบันทึกบัญชี/ตรวจสอบ) | คุณทำอะไรไป? (What did you do?) | Session Time, Commands Executed, Data Volume, Login/Logout Records |
🔄 AAA Workflow (ขั้นตอนการทำงาน)
- User/Device ส่ง Credentials (Username/Password, Cert) ไปที่ Network Device (NAS - Network Access Server)
- NAS ส่งต่อ Request ไปที่ AAA Server (RADIUS/TACACS+)
- AAA Server ตรวจสอบ Credentials กับ Database (Local, LDAP, AD, Azure AD, Token Server)
- Authentication: Match → Accept / No Match → Reject
- Authorization: ดึง Profile/Policy (Privilege Level, VLAN, ACL, Downloadable ACL) ส่งกลับ NAS
- NAS Enforce Policy (Allow/Deny Traffic, Assign VLAN, Apply ACL)
- Accounting: NAS ส่ง Start/Interim/Stop Records ไป AAA Server (Logging, Billing, Auditing)
📡 โปรโตคอล AAA หลัก (AAA Protocols)
| Protocol | Port | Transport | Encryption | ใช้งาน |
|---|---|---|---|---|
| RADIUS | UDP 1812 (Auth), 1813 (Acct) | UDP | Password Only (Shared Secret) | 802.1X, VPN, Wireless, ISP, ใบรับรองมาตรฐานเปิด |
| TACACS+ | TCP 49 | TCP | Full Packet Body (Shared Secret) | Cisco Devices, Command Authorization, Granular Control |
| Diameter | TCP/SCTP 3868 | TCP/SCTP | TLS/DTLS | 3G/4G/5G Mobile Core, IMS, Next-gen RADIUS |
RADIUS = โปรโตคอลยอดนิยมมากที่สุด สำหรับ Network Access (802.1X, VPN, Wi-Fi)
TACACS+ = Cisco Proprietary (แต่เปิดสเปค) ใช้สำหรับ Device Administration (Command Authorization)
🏗️ AAA Server Types (ประเภท AAA Server)
- Cisco ISE (Identity Services Engine) - Enterprise RADIUS/TACACS+ กับ Profiling, Posture, Guest, BYOD
- Aruba ClearPass - NAC, Policy Management, Guest, Onboarding
- Microsoft NPS (Network Policy Server) - RADIUS Built-in Windows Server, 802.1X, VPN
- FreeRADIUS - Open Source RADIUS Server (Linux), ยืดหยุ่นสูง
- JumpCloud / Azure AD / Okta (Cloud RADIUS) - Cloud-native Identity + RADIUS
- PacketFence / OpenWISP - Open Source NAC Platforms
🔧 Cisco AAA Configuration (ตัวอย่างพื้นฐาน)
! Enable AAA
aaa new-model
! Define RADIUS Server Group
radius server ISE
address ipv4 10.1.1.10 auth-port 1812 acct-port 1813
key C1sc0Secret
automation-tester username test probe-interval 60
aaa group server radius ISE_GROUP
server name ISE
! Authentication: Login ใช้ RADIUS ก่อน Local
aaa authentication login default group ISE_GROUP local
! Authorization: Commands ใช้ RADIUS (TACACS+ ปกติ) Fallback Local
aaa authorization commands 15 default group ISE_GROUP local
aaa authorization exec default group ISE_GROUP local
! Accounting: ทุกการเชื่อมต่อ
aaa accounting exec default start-stop group ISE_GROUP
aaa accounting commands 15 default start-stop group ISE_GROUP
! Apply to VTY (SSH/Telnet)
line vty 0 15
login authentication default
authorization commands 15 default
authorization exec default
accounting exec default
accounting commands 15 default
transport input ssh
🎯 Use Cases ของ AAA
- 802.1X Port-based Network Access Control (Wired/Wireless)
- VPN Remote Access (AnyConnect, IPsec, SSL VPN)
- Device Administration (SSH/Telnet to Router/Switch/Firewall) - Command Authorization
- Wireless Enterprise (WPA2/3-Enterprise) - RADIUS Backend
- ISP/Service Provider - Subscriber Management, Billing (Accounting)
- Zero Trust Network Access (ZTNA) - Continuous Verification
❓ คำถามที่พบบ่อย
❓ AAA แตกต่างจาก 802.1X ยังไง?
802.1X = Framework การควบคุมการเข้าถึงพอร์ต (Port-based NAC) ใช้ EAP over LAN (EAPOL). AAA (RADIUS) = Backend Server ที่ 802.1X เรียกใช้ทำ Authentication/Authorization
❓ ทำไมต้องแยก Authentication กับ Authorization?
แยกความรับผิดชอบ: AuthN = Identity Provider (IdP, AD, Azure AD). AuthZ = Network Policy (Network Team). เปลี่ยน AuthN ได้โดยไม่ต้องแก้ Network Policy
❓ Accounting ใช้ทำไม?
❓ TACACS+ vs RADIUS 選ไหน?
Device Admin (Router/Switch/Firewall CLI) → TACACS+ (Command-level AuthZ, TCP Reliable, Full Encryption). Network Access (802.1X, VPN, Wi-Fi) → RADIUS (Standard, Vendor-neutral, UDP Fast)
สรุป: AAA เป็น หัวใจของ Network Access Control แยก Identity (AuthN) ออกจาก Access Policy (AuthZ) และ Audit Trail (Acct) ใช้ RADIUS สำหรับ Network Access, TACACS+ สำหรับ Device Admin เป็น Best Practice