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

Certificate Authority (CA) ในความปลอดภัยเครือข่าย คืออะไร บทบาท และการทำงาน

Certificate Authority (CA) / การรับรองใบรับรอง คืออะไร?

Certificate Authority (CA) หรือ Certification Authority เป็น องค์กร/หน่วยงานที่เชื่อถือได้ (Trusted Third Party) ที่มีหน้าที่ ออก ใบรับรองดิจิทัล (Digital Certificates / X.509 Certificates) เพื่อผูก Public Key กับ ตัวตน (Identity) ของ Entity (เว็บไซต์, เซิร์ฟเวอร์, ผู้ใช้, อุปกรณ์, โค้ด, อีเมล)

บทบาทและหน้าที่หลักของ CA

  1. Identity Verification (การยืนยันตัวตน): ตรวจสอบว่าผู้ขอ Certificate เป็นเจ้าของ Domain/Organization จริง (DV, OV, EV)
  2. Certificate Issuance (การออกใบรับรอง): เซ็น Certificate ด้วย Private Key ของ CA สร้าง Chain of Trust
  3. Certificate Lifecycle Management: Renewal, Revocation (CRL/OCSP), Expiration Tracking
  4. Trust Anchor Distribution: Root CA Certificate อยู่ใน Trust Store ของ OS/Browser (Microsoft, Apple, Mozilla, Google, Java)
  5. Policy Enforcement: บังคับใช้ CA/Browser Forum Baseline Requirements, CP/CPS

ประเภทของ CA

ประเภทคำอธิบายตัวอย่างTrust Level
Public CA (Commercial CA)ขาย Certificate สาธารณะ Trusted โดย Browser/OS ทุกตัวDigiCert, GlobalSign, Sectigo, GoDaddy, Let's Encrypt (Free), ZeroSSL, Buypass, Google Trust ServicesHigh (Public Trust)
Private CA (Enterprise CA)องค์กรตั้งเอง ใช้ภายใน (Intranet, VPN, Wi-Fi 802.1X, mTLS, Code Signing)Microsoft AD CS, Smallstep, HashiCorp Vault, Venafi, EJBCA, CFSSLInternal Trust Only
Root CAจุดเริ่มต้นของ Trust Chain Self-signed, Offline, Highly Secured (HSM)DigiCert Root G2, ISRG Root X1 (Let's Encrypt), Microsoft Root CAUltimate Trust Anchor
Intermediate CAออก Certificate ให้ End-Entity ลดความเสี่ยง Root CADigiCert TLS RSA SHA256 2020 CA1, R3 (Let's Encrypt)Delegated Trust

Chain of Trust (เชื่อมโยงความไว้วางใจ)

Root CA (Self-signed, ใน Trust Store)
    │
    ├──► Intermediate CA 1 (เซ็นโดย Root)
    │       │
    │       ├──► Intermediate CA 2 (เซ็นโดย Int 1)
    │       │       │
    │       │       └──► Leaf/End-Entity Certificate (เว็บไซต์, Server, User)
    │       │               (CN=example.com, SANs, Public Key, Validity, Extensions)
    │       │
    │       └──► Leaf Certificate (Code Signing, Email, Client Auth)
    │
    └──► Intermediate CA 2 ...

การตรวจสอบ Certificate (Validation Process)

  1. Client (Browser/cURL/App) ได้รับ Certificate จาก Server
  2. สร้าง Chain: Leaf → Intermediate(s) → Root
  3. ตรวจสอบ Root อยู่ใน Trust Store ของ OS/Browser หรือไม่
  4. ตรวจสอบ Signature ทุกขั้น (CA Private Key → Child Public Key)
  5. ตรวจสอบ: Validity Period (NotBefore/NotAfter), Revocation Status (CRL/OCSP), Key Usage/Extended Key Usage, Name Constraints, Certificate Transparency (CT) Logs
  6. ถ้าผ่านทั้งหมด: Trust Established → TLS Handshake ดำเนินต่อ

ระดับการตรวจสอบ (Validation Levels) - Public TLS Certificates

ระดับชื่อการตรวจสอบใช้สำหรับตัวอย่าง UI
DVDomain Validationยืนยันครอบครอง Domain (Email/DNS/HTTP Challenge)เว็บทั่วไป, Blog, API, Dev🔒 Lock Icon
OVOrganization ValidationDV + ยืนยัน Organization จริง (Govt Registry, Phone, Address)องค์กร, E-commerce, SaaS🔒 + Organization Name
EVExtended ValidationOV + กระบวนการเข้มงวดมากที่สุด (Legal Existence, Physical Address, Call Verification)ธนาคาร, Enterprise, High-trust🔒 + Green Bar (Legacy) / Org Name

Private CA / Enterprise CA - ใช้เมื่อไหร่?

  • mTLS (Mutual TLS): Service Mesh (Istio, Linkerd), Microservices Auth
  • Wi-Fi 802.1X (EAP-TLS): Certificate-based Wi-Fi Auth (ไม่ใช้ Password)
  • VPN (IPsec/OpenVPN/WireGuard): Client Certificate Auth
  • Code Signing: Internal Software, Drivers, Scripts
  • Document Signing / S/MIME: Email Encryption/Signing, PDF Signing
  • IoT/Device Identity: Device Certificates (EST, SCEP, ACME)

CA Security - จุดอ่อนและการป้องกัน

ACME Protocol & Automation (Let's Encrypt Model)

  • ACME (RFC 8555): Automated Certificate Management Environment
  • Client (Certbot, acme.sh, Caddy, Traefik, Smallstep) → ACME Server (Let's Encrypt, ZeroSSL, Buypass, Private CA)
  • Challenges: HTTP-01, DNS-01, TLS-ALPN-01
  • Certificate อายุสั้น (90 วัน) → Auto-renewal → ลดความเสี่ยง Key Compromise

สรุป

CA เป็น Trust Anchor ของ PKI ทำหน้าที่ Verify Identity → Sign Certificate → Distribute Trust Public CA ใช้สำหรับ Internet-facing (HTTPS, Email, Code Signing) Private CA ใช้สำหรับ Internal (mTLS, VPN, Wi-Fi, IoT) ความปลอดภัยของ CA เองสำคัญที่สุด: HSM, Offline Root, Short-lived Certs, CT Logs, CAA Records การเลือก CA: ดู Reputation, Browser Trust, Price, Automation Support, Compliance (WebTrust, ETSI)

ความเสี่ยงเหตุการณ์จริงการลดทอน
CA Compromise (Root/Intermediate)DigiNotar (2011), Comodo (2011), Trustwave (2012), Symantec (2015-2017)HSM (FIPS 140-2 L3), Offline Root, Short-lived Intermediates, CT Logs, CAA Records
Mis-issuanceGoogle/CT Logs พบหลายครั้ง (Symantec, CNNIC, WoSign/StartCom)CT Logs Monitoring, CAA Records, Short-lived Certs (ACME/90 days)
Private Key TheftStuxnet (Realtek/JMicron Certs), SolarWinds (Code Signing Cert)HSM, Key Rotation, Hardware Tokens, Zero Trust Key Management