Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

AAA Network Security คืออะไร? Authentication, Authorization, Accounting ทำงานอย่างไร

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 (ขั้นตอนการทำงาน)

  1. User/Device ส่ง Credentials (Username/Password, Cert) ไปที่ Network Device (NAS - Network Access Server)
  2. NAS ส่งต่อ Request ไปที่ AAA Server (RADIUS/TACACS+)
  3. AAA Server ตรวจสอบ Credentials กับ Database (Local, LDAP, AD, Azure AD, Token Server)
  4. Authentication: Match → Accept / No Match → Reject
  5. Authorization: ดึง Profile/Policy (Privilege Level, VLAN, ACL, Downloadable ACL) ส่งกลับ NAS
  6. NAS Enforce Policy (Allow/Deny Traffic, Assign VLAN, Apply ACL)
  7. Accounting: NAS ส่ง Start/Interim/Stop Records ไป AAA Server (Logging, Billing, Auditing)

📡 โปรโตคอล AAA หลัก (AAA Protocols)

ProtocolPortTransportEncryptionใช้งาน
RADIUSUDP 1812 (Auth), 1813 (Acct)UDPPassword Only (Shared Secret)802.1X, VPN, Wireless, ISP, ใบรับรองมาตรฐานเปิด
TACACS+TCP 49TCPFull Packet Body (Shared Secret)Cisco Devices, Command Authorization, Granular Control
DiameterTCP/SCTP 3868TCP/SCTPTLS/DTLS3G/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 ใช้ทำไม?
  • Auditing/Compliance (PCI-DSS, SOX)
  • Billing (ISP, Cloud Providers)
  • Forensics/Incident Response (Timeline Reconstruction)
  • Capacity Planning (Bandwidth Usage)
  • ❓ 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