Service-to-service authentication, mTLS, dan identity untuk AI agents menjadi frontier baru dalam identity management di era artificial intelligence

Setelah di episode 15 kita membahas CIAM, pada episode ini kita masuk ke identity for AI & machine identity — area yang berkembang pesat di tahun 2026 karena meningkatnya penggunaan AI agents, service-to-service communication, dan machine identity management.
Mengapa machine identity penting? Karena di era modern, ada lebih banyak machine (services, containers, IoT devices, AI agents) daripada manusia. Setiap machine membutuhkan identity yang bisa diverifikasi — dan ini adalah tantangan baru yang belum sepenuhnya dipecahkan.
Service accounts digunakan oleh aplikasi untuk mengakses resource:
App A (service account: app-a@company.com)
→ API Gateway
→ Database (service account: app-a-db@company.com)
→ Cache (service account: app-a-cache@company.com)API keys adalah credentials sederhana untuk API access:
curl -H "X-API-Key: abc123def456" https://api.example.com/dataAPI keys cocok untuk simple integrasi tapi tidak untuk high-security karena:
mTLS memverifikasi identity kedua belah pihak dalam komunikasi TLS:
AI agents beroperasi secara otonom dan membutuhkan identity yang:
| Aspek | Penjelasan |
|---|---|
| Scoped | Hanya boleh mengakses resources yang dibutuhkan |
| Auditable | Setiap action harus tercatat |
| Revocable | Bisa dicabut aksesnya secara real-time |
| Delegatable | Bisa delegate akses ke agent lain |
AI Agent (Identity: agent@company.com)
→ Policy Decision Point (cek authorization)
→ Resource A (dengan scope yang terbatas)
→ Resource B (dengan audit logging)
→ Human oversight (approval untuk akses kritis)import jwt
from datetime import datetime, timedelta
def create_agent_token(agent_id, scopes, expires_hours=1):
payload = {
'sub': agent_id,
'scopes': scopes, # ['read:data', 'write:logs']
'type': 'agent',
'iat': datetime.utcnow(),
'exp': datetime.utcnow() + timedelta(hours=expires_hours)
}
return jwt.encode(payload, private_key, algorithm='RS256')SPIFFE (Secure Production Identity Framework for Everyone) adalah standar untuk workload identity:
| Komponen | Fungsi |
|---|---|
| SPIFFE ID | Identitas workload (URI format) |
| SVID | X.509 certificate atau JWT yang membawa SPIFFE ID |
| SPIRE | Server yang issue dan manage SVIDs |
SPIFFE ID format: spiffe://trust-domain/workload-identifier
Contoh:
spiffe://company.com/service/api-gateway
spiffe://company.com/service/payment-processor# Install SPIRE
curl -sL https://github.com/spiffe/spire/releases/download/v1.8.0/spire-1.8.0-linux-x86_64.tar.gz | tar xz
# Start SPIRE server
./spire-server run -config /etc/spire/server.conf
# Register workload
./spire-server entry create \
-spiffeID spiffe://company.com/service/my-app \
-selector k8s:pod-label:app:my-appNote
Machine identity management akan menjadi skill paling penting bagi IAM Engineer di masa depan. Dengan AI agents yang beroperasi secara otonom, kemampuan mengelola machine identity akan menentukan keamanan organisasi.
Inti yang harus dibawa pulang:
Di episode 17 selanjutnya kita akan membahas conditional access & policies — risk-based access, location/device policies, dan automation. Siapkan conditional access kalian!