Certificate Authority (CA) / การรับรองใบรับรอง คืออะไร?
Certificate Authority (CA) หรือ Certification Authority เป็น องค์กร/หน่วยงานที่เชื่อถือได้ (Trusted Third Party) ที่มีหน้าที่ ออก ใบรับรองดิจิทัล (Digital Certificates / X.509 Certificates) เพื่อผูก Public Key กับ ตัวตน (Identity) ของ Entity (เว็บไซต์, เซิร์ฟเวอร์, ผู้ใช้, อุปกรณ์, โค้ด, อีเมล)
บทบาทและหน้าที่หลักของ CA
- Identity Verification (การยืนยันตัวตน): ตรวจสอบว่าผู้ขอ Certificate เป็นเจ้าของ Domain/Organization จริง (DV, OV, EV)
- Certificate Issuance (การออกใบรับรอง): เซ็น Certificate ด้วย Private Key ของ CA สร้าง Chain of Trust
- Certificate Lifecycle Management: Renewal, Revocation (CRL/OCSP), Expiration Tracking
- Trust Anchor Distribution: Root CA Certificate อยู่ใน Trust Store ของ OS/Browser (Microsoft, Apple, Mozilla, Google, Java)
- 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 Services | High (Public Trust) |
| Private CA (Enterprise CA) | องค์กรตั้งเอง ใช้ภายใน (Intranet, VPN, Wi-Fi 802.1X, mTLS, Code Signing) | Microsoft AD CS, Smallstep, HashiCorp Vault, Venafi, EJBCA, CFSSL | Internal Trust Only |
| Root CA | จุดเริ่มต้นของ Trust Chain Self-signed, Offline, Highly Secured (HSM) | DigiCert Root G2, ISRG Root X1 (Let's Encrypt), Microsoft Root CA | Ultimate Trust Anchor |
| Intermediate CA | ออก Certificate ให้ End-Entity ลดความเสี่ยง Root CA | DigiCert 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)
- Client (Browser/cURL/App) ได้รับ Certificate จาก Server
- สร้าง Chain: Leaf → Intermediate(s) → Root
- ตรวจสอบ Root อยู่ใน Trust Store ของ OS/Browser หรือไม่
- ตรวจสอบ Signature ทุกขั้น (CA Private Key → Child Public Key)
- ตรวจสอบ: Validity Period (NotBefore/NotAfter), Revocation Status (CRL/OCSP), Key Usage/Extended Key Usage, Name Constraints, Certificate Transparency (CT) Logs
- ถ้าผ่านทั้งหมด: Trust Established → TLS Handshake ดำเนินต่อ
ระดับการตรวจสอบ (Validation Levels) - Public TLS Certificates
| ระดับ | ชื่อ | การตรวจสอบ | ใช้สำหรับ | ตัวอย่าง UI |
| DV | Domain Validation | ยืนยันครอบครอง Domain (Email/DNS/HTTP Challenge) | เว็บทั่วไป, Blog, API, Dev | 🔒 Lock Icon |
| OV | Organization Validation | DV + ยืนยัน Organization จริง (Govt Registry, Phone, Address) | องค์กร, E-commerce, SaaS | 🔒 + Organization Name |
| EV | Extended Validation | OV + กระบวนการเข้มงวดมากที่สุด (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 - จุดอ่อนและการป้องกัน
| ความเสี่ยง | เหตุการณ์จริง | การลดทอน |
| 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-issuance | Google/CT Logs พบหลายครั้ง (Symantec, CNNIC, WoSign/StartCom) | CT Logs Monitoring, CAA Records, Short-lived Certs (ACME/90 days) |
| Private Key Theft | Stuxnet (Realtek/JMicron Certs), SolarWinds (Code Signing Cert) | HSM, Key Rotation, Hardware Tokens, Zero Trust Key Management |
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)