Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A5c ai Babysitter bootstrap auth

From Leeroopedia
Knowledge Sources
Domains Kubernetes, Authentication, Security
Last Updated 2026-10-23 00:00 GMT

Overview

Concrete tool for bootstrapping Kubernetes authentication credentials for a Kradle environment.

Description

The bootstrapAuth function generates admin credentials and a Kubernetes Secret manifest for a Kradle deployment. It creates a <namespace>-bootstrap-auth Secret containing ADMIN_USERNAME, ADMIN_PASSWORD, ADMIN_TOKEN_SEED, and AUTH_MODE.

For local-dev mode, the password defaults to admin if not specified. For all other modes, an opaque password is generated via randomBytes(18) in base64url. An opaque token seed is always generated.

Usage

  • Kradle deployment Step 5: Bootstrap auth credentials after environment installation.

Code Reference

Source Location

  • Repository: Babysitter
  • File: packages/kradle/installer/src/sdk/auth.ts:L26-52

Signature

function bootstrapAuth(config: CloudConfig): AuthBootstrapResult;
// AuthBootstrapResult: {
//   secretName: string,
//   username: string,
//   password: string,
//   tokenSeed: string,
//   manifests: KubernetesManifest[],
//   env: Record<string, string>
// }

Import

import { bootstrapAuth } from "@a5c-ai/kradle/installer";

I/O Contract

Inputs

Name Type Required Description
config.namespace string Yes Target namespace
config.auth.adminUsername string Yes Admin username
config.auth.defaultAdminPassword string No Admin password (auto-generated if absent and not local-dev)
config.auth.mode string Yes Auth mode (local-dev or other)

Outputs

Name Type Description
AuthBootstrapResult object Secret name, username, password, token seed, K8s Secret manifest, env vars

Usage Examples

Bootstrap Auth

import { loadCloudConfig, bootstrapAuth } from "@a5c-ai/kradle/installer";

const config = await loadCloudConfig({ environment: "staging" });
const auth = bootstrapAuth(config);

console.log("Secret:", auth.secretName);
console.log("Username:", auth.username);
console.log("Password:", auth.password); // auto-generated
console.log("Manifests:", auth.manifests); // K8s Secret manifest

Local Dev (Default Password)

const config = await loadCloudConfig({ environment: "minikube" });
// config.auth.mode = "local-dev"
const auth = bootstrapAuth(config);
console.log(auth.password); // "admin"

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment