IAM
Macro Architecture Portal

Keycloak Master Curriculum (Phases 1 - 3)

REALIGNED MASTER CURRICULUM • 16 WEEKS • 3 GRAND PHASES • ~160 HOURS

From Foundations to Keycloak Principal Architect

แผนผังหลักสูตรและดัชนีภาพรวมระดับ Macro ฉบับจัดระเบียบใหม่ตามหลัก First Principles & Progressive Mastery: เริ่มจากทำความเข้าใจนิยามและตัวละครหลักใน IAM (Phase 1: Basic), ก้าวสู่การเชื่อมโยงระบบระดับองค์กรและ Pipeline ความปลอดภัย (Phase 2: Intermediate), และปิดท้ายด้วยการเขียนโค้ด Java ขยายแกน Core Engine พร้อมสถาปัตยกรรม High Availability บน Kubernetes (Phase 3: Expert)

Total Timeline 16 Weeks 3 Progressive Milestones
Phase 1: Basic 3 Weeks Entities ➔ Tokens ➔ API
Phase 2: Inter 5 Weeks LDAP / Brokering / MFA
Phase 3: Expert 8 Weeks Java SPIs / K8s HA Mesh

🏛️ The 3 Progressive Milestones of the Architecture Journey

ลำดับขั้นทางวิศวกรรมที่ต่อเนื่องกันโดยไม่ก้าวกระโดด

End-to-End Progression
PHASE 1 • BASIC 3 Weeks (~30h)

Foundations, Entities, Tokens & Stateless API

เข้าใจตัวตนและบทบาทของ "ตัวละครหลักใน IAM" (Quarkus Runtime, Master vs Business Tenant, Users, Passwords, Public/Confidential Clients), การจัดสิทธิ์ RBAC, Token Anatomy, Mappers, Session RTR และการตรวจสอบ Bearer Token ด้วย Stateless JWKS (/certs)

● North Star: Clean Entities ➔ Lean Token ➔ API
● Capstone: Dockerized 3-Tier IAM Architecture
PHASE 2 • INTERMEDIATE 5 Weeks (~50h)

Enterprise Federation, Flows, MFA & Theming

ก้าวสู่สภาพแวดล้อมระดับองค์กร: ดึงผู้ใช้จาก LDAP / Microsoft Active Directory โดยไม่ต้อง Migrate, เชื่อมต่อ Social/SAML Identity Brokering, ออกแบบ Authentication Execution Tree (Conditional MFA / Passkeys), และปรับแต่ง UI ด้วย Freemarker (.ftl)

● North Star: Hybrid Directory Sync & Adaptive MFA
● Capstone: Enterprise Portal with LDAP & FTL UI
PHASE 3 • EXPERT 8 Weeks (~80h)

Custom Java SPIs, Distributed Grid & K8s HA

ก้าวสู่ระดับ Core Engineer: เขียน Java/Quarkus Service Provider Interfaces (Custom Authenticator, Kafka Event Listener, User Storage Provider), จูน Infinispan Distributed Cache Grid ข้ามคลัสเตอร์, และดูแล High Availability ผ่าน Kubernetes Operator

● North Star: Java SPI Core & Multi-AZ Zero-Downtime
● Capstone: Production K8s Mesh with Custom SPI JAR
PHASE 1 REALIGNED ROADMAP • 3 WEEKS • 21 SESSIONS

Phase 1: Basic — Foundations, Entities, Tokens & Stateless API

เรียนรู้ผ่านหลัก First Principles: เข้าใจตัวละคร (Entities) ➔ เข้าใจบัตรผ่านและสิทธิ์ (Tokens/Roles) ➔ ประกอบระบบจริงกับ Backend (JWKS)

WEEK 1 • DAYS 01 - 07

Identity Foundations & Entities

ปูรากฐานตัวละครในระบบ IAM ก่อนแตะโปรโตคอลซับซ้อน:

  • Day 01: What is Keycloak, 7 Subsystems & Postgres Storage
  • Day 02: Demystifying OAuth 2.0 vs OIDC & PKCE (RFC 7636)
  • Day 03: Keycloak Entities: Realms, Users & Storage Boundaries
  • Day 04: Clients Anatomy: Public vs Confidential Clients
  • Day 05: Machine-to-Machine & Client Credentials Grant
  • Days 06-07: Checkpoint Lab #1: Entity Modeling & CLI Handshake
WEEK 2 • DAYS 08 - 14

Roles, Claims & Token Lifecycles

จัดโครงสร้างสิทธิ์ บัตรผ่าน และการควบคุมเซสชัน:

  • Day 08: Authorization RBAC: Realm Roles vs Client Roles
  • Day 09: Groups & Declarative User Profile Management
  • Day 10: Deep-Dive JWT Anatomy & Token Bloat Defense (HTTP 431)
  • Day 11: Protocol Mappers, Custom Claims & Scopes Strategy
  • Day 12: Session Lifecycles & Refresh Token Rotation (RTR)
  • Days 13-14: Checkpoint Lab #2: Token Security & OWASP Audit
WEEK 3 • DAYS 15 - 21

Backend Integration & Stateless API

เชื่อมต่อกับ Backend และประกอบระบบ End-to-End:

  • Day 15: Public Key Cryptography & JWKS Endpoint (/certs)
  • Day 16: Building the Resource Server: Stateless Verification
  • Day 17: Enforcing Scopes & RBAC Authorization in API
  • Day 18: Logout Architectures & RFC 7009 Token Revocation
  • Day 19: Capstone: Unified 3-Tier IAM Architecture
  • Days 20-21: Comprehensive 3-Week Assessment & Defense
PHASE 2 REALIGNED ROADMAP • 5 WEEKS • 35 SESSIONS

Phase 2: Intermediate — Enterprise Ecosystem, Federation & Custom UX

เชื่อมต่อ Directory องค์กรเดิม (LDAP/Active Directory), Brokering กับ Social/SAML, ควบคุม Execution Tree สำหรับ MFA, และทำ Branded Theming

Enterprise Ready
WEEK 04

User Federation (LDAP/AD)

เชื่อมต่อ OpenLDAP & Active Directory, Sync Modes (Full vs Changed), LDAP Mappers, และ Kerberos / SPNEGO Single Sign-On

WEEK 05

Identity Brokering

เชื่อมต่อ Google, GitHub, Microsoft Entra ID และ SAML 2.0 IdP ภายนอก, ปรับแต่ง First Broker Login Flow และ Account Linking

WEEK 06

Auth Flows & Adaptive MFA

โครงสร้าง Execution Trees (Required, Alternative, Conditional), การทำ Conditional OTP ตามเงื่อนไขสิทธิ์ และ WebAuthn / Passkeys

WEEK 07

Custom FTL Theming

ออกแบบหน้า Login, Registration และ Error ด้วย Freemarker (.ftl), Theme Inheritance, Tailwind CSS และ Multi-Language i18n

WEEK 08

Phase 2 Capstone

สร้าง Enterprise Portal รวม LDAP + Social Login + Conditional MFA พร้อมหน้าตา Branded UI สวยงามตามเอกลักษณ์องค์กร

PHASE 3 REALIGNED ROADMAP • 8 WEEKS • 56 SESSIONS

Phase 3: Expert — Custom Java SPIs, Distributed Grid & K8s HA

ก้าวสู่ระดับ Core Principal Engineer: เขียน Custom Java Plugins, จูน Infinispan Data Grid ข้ามคลัสเตอร์, และดูแล High Availability บน Kubernetes

Cloud-Native HA
WEEKS 09 - 10

Java Quarkus SPI Lifecycle

สถาปัตยกรรม Service Provider Interface, Provider vs ProviderFactory, KeycloakSession Context, การทำ Event Listener SPI ส่ง Audit Log เข้า Kafka

WEEKS 11 - 12

Custom Authenticators & Storage

พัฒนา Custom Authenticator SPI (เชื่อมต่อ SMS Gateway ไทย หรือ Hardware Tokens) และ User Storage Provider เชื่อมฐานข้อมูล Legacy Database

WEEKS 13 - 14

Infinispan Grid & UMA 2.0

Infinispan Distributed Caching (Session Grid, JGroups, Cross-Site Replication), RFC 8693 Token Exchange, และ Financial-Grade API (FAPI)

WEEKS 15 - 16

K8s Operator & HA Defense

Production Keycloak Kubernetes Operator, Multi-AZ Zero-Downtime Rolling Upgrades, DB Connection Pool Autoscaling, และ Grand Defense Exam

📊 Grand Master Competency & Architecture Matrix

ตารางเปรียบเทียบมิติทางเทคนิคและความลึกของทักษะในแต่ละ Phase ฉบับ Realigned

Standards Compliance: 100%
Technical Dimension Phase 1: Basic (3 Weeks) Phase 2: Intermediate (5 Weeks) Phase 3: Expert (8 Weeks)
1. Identity Source PostgreSQL Relational DB, User Entities & Attributes OpenLDAP / Active Directory & Social/SAML IdPs Custom User Storage SPI (Legacy DB/REST API)
2. Authentication Model Username/Password, PKCE S256, Client Credentials M2M Conditional MFA, WebAuthn Passkeys, SPNEGO Kerberos Custom Authenticator SPI (SMS OTP, Hardware MFA)
3. Authorization & Tokens Realm/Client Roles, Audience Claims (aud), Lean JWT Composite Role Hierarchies, Declarative User Profiles UMA 2.0, Fine-Grained Auth, RFC 8693 Token Exchange
4. UI & UX Capabilities Keycloak Default Base Console Custom Freemarker (.ftl) Themes & Account v3 UI Headless Authentication APIs & Dynamic Flow UI
5. Backend Verification Stateless JWKS Signature (/certs), In-Memory Key Cache Backchannel Logout Listeners, Step-Up Auth Headers Distributed Scope Filters & Istio/Envoy Sidecar Mesh
6. High Availability & Ops Docker Compose, Agroal Pool Sizing, Volume Mounts Multi-node Local Stack, Reverse Proxy Hostname v2 Kubernetes Keycloak Operator & Infinispan Grid HA
Active Learning Materials Ready

เข้าสู่หน้าสารบัญ Phase 1 หรือเริ่มเรียนรายวันได้ทันที

เข้าถึงไฟล์ที่สร้างเสร็จสมบูรณ์ตามมาตรฐาน First Principles