Authentication, Diagnostics & Incident Triage Reference
Authoritative command reference for am auth (Zero-Trust Sessions, DPAPI / POSIX 0600), am doctor, and am diagnose (Incident Root Cause Analysis & Sanitized Dumps).
am diagnose and am doctor provide self-contained root cause analysis without requiring external cloud monitoring or telemetry egress.
This reference details operator session authentication, local cryptographic token storage (Windows DPAPI / POSIX 0600), rapid health evaluations, and automated incident bundle generation.
1. am auth — Zero-Trust Operator Authentication & Sessions
In the Aarkam Standalone Tier, authentication is enforced directly by the Rokka Coordinator MON Quorum using Argon2id password verification and asymmetric JWT bearer tokens. Tokens are auto-injected into outgoing gRPC calls via GrpcAuthClientInterceptor.
1.1 Operator Login (am auth login)
# Interactive login (prompts securely for password without echo)
am auth login --username secadmin
# Headless / CI/CD pipeline login reading secret from environment
am auth login --username storage-bot --password-env BOT_SECRET --non-interactive
1.2 Session Claims & Verification (am auth whoami & am auth status)
# Display active user identity, tenant namespace, and assigned RBAC roles
am auth whoami
# Check token validity duration, expiration timestamp, and coordinator issuer
am auth status
# Terminate session and purge local DPAPI / POSIX 0600 token cache
am auth logout
2. am doctor — Universal Pre-Flight & Fabric Scanner
Scans the complete distributed environment in parallel, probing consensus health, storage capacity thresholds, network latency, and CPU instruction acceleration:
am doctor --coordinator http://localhost:7774
3. am diagnose — Incident Triage & Root Cause Analysis
Provides emergency triage during storage anomalies, network partitions, or drive faults:
3.1 Cluster & Node Triage
# Run holistic triage scan across all cluster daemons
am diagnose cluster
# Deep dive into an individual node (disk I/O wait, kernel memory, socket pools)
am diagnose node storage-02
# Inspect latency mesh between coordinators and storage daemons
am diagnose latency
3.2 Sanitized Support Dump (am diagnose dump)
Generates an offline, cryptographically sanitized diagnostic archive for support review. Masks sensitive IP addresses and removes all cryptographic keys:
am diagnose dump --output /tmp/aarkam-incident-dump.tar.gz