Principle:A5c ai Babysitter Auth Bootstrap
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Authentication, Security |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
A method for generating and provisioning initial authentication credentials for a Kradle Kubernetes environment.
Description
Auth Bootstrap is the principle of creating a secure initial credential set before any agents or users can access the system. It generates an admin username, password (opaque for production, fixed for local-dev), and token seed, then wraps them in a Kubernetes Secret manifest.
For local development, the password defaults to admin for convenience. For all other environments, an opaque 18-byte base64url password is generated via crypto.randomBytes, ensuring no predictable defaults in production.
Usage
Use this principle when bootstrapping authentication for new Kubernetes environments where secure, auto-generated credentials are needed before first login.
Theoretical Basis
The bootstrap is a single function producing a Secret manifest:
password = config.auth.defaultAdminPassword
|| (mode == "local-dev" ? "admin" : randomBytes(18).base64url)
tokenSeed = randomBytes(18).base64url
secret = K8s.Secret(namespace, { ADMIN_USERNAME, ADMIN_PASSWORD, ADMIN_TOKEN_SEED, AUTH_MODE })
Key property: Production passwords are always cryptographically random — no hardcoded defaults. Local-dev convenience is explicitly gated behind the local-dev mode flag.