ProficientNowTechRFCs

2. Requirements

RFC-WORKLOAD-IDENTITY-0001                                      Section 2
Category: Standards Track                                    Requirements

2. Requirements

← Previous: Introduction | Index | Next: Architecture →


2.1 Design Goals

2.1.1 Primary Goals

GoalDescription
Unified Identity ModelSingle framework for all workload types
Zero Long-Lived CredentialsAll credentials short-lived and automatically rotated
Attestation-Based AuthIdentity proven through workload properties, not secrets
Delegation SupportTrack who authorized what, especially for AI agents
Multi-Cloud PortabilityWorks across cloud providers and on-premises

2.1.2 Secondary Goals

GoalDescription
Minimal Workload ChangesWorkloads shouldn't need extensive modification
GitOps CompatibleConfiguration declarative and version-controlled
Operator FriendlyClear operational runbooks and observability
Compliance ReadyMeet SOC 2, ISO 27001, PCI DSS requirements

2.2 Non-Goals

These are explicitly out of scope for this RFC:

Non-GoalWhyAddressed By
Human authenticationDifferent access patternsRFC-IAM-0001
Human privileged accessSession recording neededRFC-PAM-0001
Secret storage designVault architecture existsRFC-SECOPS-0001
Network policiesLayer 3/4 concernsRFC-TENANT-SECURITY
Application authorizationPer-app concernApplication teams

2.3 Architectural Invariants

Invariants are rules that MUST always be true. Violation of an invariant indicates an architectural breach.

Identity Authority (INV-1 to INV-3)


INV-1: Workload Identity Authority

Every workload MUST have a cryptographically verifiable identity issued by an authorized identity provider (SPIRE, Kubernetes, or cloud provider).

AspectRequirement
Identity FormatSPIFFE ID or equivalent verifiable identity
Cryptographic BackingX.509 certificate or signed JWT
Issuer AuthorityOnly SPIRE, Kubernetes, or cloud provider may issue
VerificationRecipients MUST verify signatures and validity

Rationale: Anonymous or unverifiable workloads cannot be trusted. Cryptographic identity enables mutual authentication and audit.

Enforcement: Service mesh rejects connections without valid identity; Vault denies requests from unidentified workloads.


INV-2: No Long-Lived Credentials

Workloads MUST NOT use long-lived static credentials (API keys, service account keys, passwords). All credentials MUST be short-lived and automatically rotated.

Credential TypeMaximum TTLRotation
SPIFFE SVID24 hoursAutomatic before expiry
Vault tokens1 hourAutomatic renewal
Database credentials1 hourVault lease renewal
Cloud credentials1 hourSTS/Workload Identity

Rationale: Long-lived credentials create extended windows for compromise. Short-lived credentials limit blast radius.

Enforcement: Vault policies enforce max TTL; SPIRE agent rotates SVIDs; no static secrets in Kubernetes Secrets (except ESO-managed).

Exceptions: Bootstrap credentials (e.g., SPIRE join tokens) may have longer TTL but MUST be single-use.


INV-3: Identity Attestation

Workload identity MUST be based on attestation of workload properties (Kubernetes metadata, cloud instance metadata, binary signatures) rather than pre-shared secrets.

PlatformAttestation Method
KubernetesNode (PSAT), Pod (namespace, service account, labels)
AWSInstance identity document
GCPInstance metadata
AzureInstance metadata service (IMDS)

Rationale: Pre-shared secrets can be stolen and used from anywhere. Attestation proves the workload is what it claims to be.

Enforcement: SPIRE requires attestation for SVID issuance; cloud providers require instance metadata for STS.


Authentication (INV-4 to INV-6)


INV-4: Kubernetes Auth for Vault

Kubernetes workloads accessing Vault MUST authenticate using the Kubernetes auth method with projected service account tokens.

RequirementDetails
Token TypeProjected service account token (not legacy)
Token Audiencevault or Vault-specific audience
Token TTL10 minutes (renewed by Vault Agent/CSI)
Auth Backendauth/kubernetes-<cluster> per cluster

Rationale: Kubernetes auth eliminates "secret zero"—the workload's Kubernetes identity serves as the initial authentication.

Enforcement: Vault Kubernetes auth method validates token with Kubernetes API; legacy tokens rejected.


INV-5: OIDC Federation for CI/CD

CI/CD pipelines accessing cloud resources MUST use OIDC federation (GitHub Actions OIDC, GitLab CI OIDC) rather than static credentials.

CI/CD PlatformOIDC Provider
GitHub Actionstoken.actions.githubusercontent.com
GitLab CIgitlab.com or self-hosted
TektonKubernetes ServiceAccount (OIDC Discovery)

Rationale: Static credentials in CI/CD systems are a major attack vector. OIDC tokens are short-lived and bound to the pipeline run.

Enforcement: Cloud IAM policies require OIDC claims (repository, workflow, branch); static credentials removed from CI/CD.


INV-6: mTLS for Service Communication

Service-to-service communication MUST use mutual TLS with certificates bound to workload identity.

RequirementDetails
Certificate SourceService mesh (Linkerd) or SPIRE
VerificationBoth client and server present certificates
Identity BindingCertificate CN/SAN contains workload identity
PlaintextProhibited within mesh; allowed only for external ingress

Rationale: mTLS ensures both parties are authenticated and traffic is encrypted.

Enforcement: Service mesh denies plaintext connections; network policies restrict non-mesh traffic.


Authorization (INV-7 to INV-9)


INV-7: Namespace-Scoped Permissions

Workload permissions MUST be scoped to the minimum required namespaces and resources.

Permission ScopeExample
Vault policiespath "secret/data/ns/{{ identity.entity.aliases.auth_kubernetes-prod.metadata.service_account_namespace }}/*"
Kubernetes RBACNamespace-scoped Roles, not ClusterRoles
Cloud IAMResource-specific policies, not broad roles

Rationale: Broad permissions violate least privilege. Namespace scoping limits blast radius of compromise.

Enforcement: Policy templates use identity metadata; ClusterRoleBindings require justification.


INV-8: Delegation Chain Preservation

When workloads act on behalf of other principals (human or machine), the delegation chain MUST be preserved and auditable.

Delegation ScenarioChain Preservation
AI agent for humanOAuth 2.0 Token Exchange with actor claim
Sub-agent for agentChained Token Exchange
Service for servicemTLS + request correlation ID

Rationale: Without delegation tracking, accountability is lost. "Who authorized this action?" must be answerable.

Enforcement: Token Exchange enforces chain preservation; audit logs capture full delegation context.


INV-9: Authorization Ceiling

Workload permissions MUST NOT exceed the permissions of the identity that created or authorized the workload.

ScenarioCeiling
AI agent delegated by humanAgent permissions ≤ Human's permissions
Service deployed by CI/CDService permissions ≤ Deployer's permissions
Operator creating resourcesCreated resource permissions ≤ Operator's permissions

Rationale: Privilege escalation through automation must be prevented.

Enforcement: Token Exchange validates requested scope against delegator's scope; Kubernetes admission validates RBAC grants.


Audit (INV-10 to INV-12)


INV-10: Identity Audit Trail

All identity issuance, authentication, and authorization events MUST be logged with full context.

Event TypeRequired Context
SVID issuanceSPIFFE ID, attestation data, expiry
Vault authenticationAuth method, entity, policies
Cloud STSAssumed role, source identity, session
mTLS connectionClient/server identities, connection metadata

Rationale: Security investigations require complete identity event history.

Enforcement: SPIRE, Vault, and cloud providers log to centralized system; logs immutable and retained per policy.


INV-11: Delegation Audit

All delegation relationships (human→agent, agent→sub-agent) MUST be logged with creation, usage, and revocation events.

EventRequired Context
Delegation creationDelegator, delegate, scope, expiry
Delegation usageAction performed, resources accessed
Delegation revocationReason, revoker, timestamp

Rationale: AI agents acting on human behalf must have full accountability.

Enforcement: OAuth 2.0 Token Exchange logs all exchanges; applications log delegation usage with correlation IDs.


INV-12: Cross-System Correlation

Audit logs MUST include correlation IDs enabling tracing across Kubernetes, Vault, SPIRE, and application logs.

SystemCorrelation Mechanism
KubernetesRequest ID in audit logs
VaultRequest ID propagated from client
SPIRERegistration entry ID
ApplicationOpenTelemetry trace ID

Rationale: Distributed systems require correlated logs for incident investigation.

Enforcement: All systems configured to accept and propagate correlation IDs; centralized log aggregation correlates by ID.


2.4 Success Criteria

2.4.1 Identity Coverage

CriterionTargetMeasurement
Workloads with cryptographic identity100%SPIRE/mesh certificate coverage
Static credentials eliminated0Secrets audit (no API keys, passwords)
OIDC-enabled CI/CD pipelines100%Pipeline configuration audit

2.4.2 Security Posture

CriterionTargetMeasurement
Maximum credential TTL≤24hVault/SPIRE configuration
mTLS coverage100% in meshService mesh metrics
Failed authentication rate<1%Auth provider metrics

2.4.3 Operational Health

CriterionTargetMeasurement
SVID rotation success100%SPIRE agent metrics
Vault token renewal success100%Vault audit logs
Identity event correlation100%Cross-system trace completion

2.5 Invariant Summary

IDCategoryOne-Line Summary
INV-1Identity AuthorityEvery workload has cryptographic identity
INV-2Identity AuthorityNo long-lived credentials
INV-3Identity AuthorityIdentity based on attestation
INV-4AuthenticationKubernetes auth for Vault
INV-5AuthenticationOIDC federation for CI/CD
INV-6AuthenticationmTLS for service communication
INV-7AuthorizationNamespace-scoped permissions
INV-8AuthorizationDelegation chain preservation
INV-9AuthorizationAuthorization ceiling
INV-10AuditIdentity audit trail
INV-11AuditDelegation audit
INV-12AuditCross-system correlation

Document Navigation


End of Section 2