Bootstrap Admin CLI
Module: aibs_backend.interfaces.cli.bootstrap_admin
Purpose
Create the first AIBS administrator account or upgrade an existing directory user to AIBS admin access.
This is a bootstrap/recovery command, not a routine user-management workflow.
Command
pdm run python -m aibs_backend.interfaces.cli.bootstrap_admin \
--username <username> [--display-name <name>] [--email <email>]
or:
python -m aibs_backend.interfaces.cli.bootstrap_admin \
--username <username> [--display-name <name>] [--email <email>]
Options
Option |
Meaning |
|---|---|
|
Required directory username. |
|
Used only when creating a new user. |
|
Used only when creating a new user. |
Execution Flow
Load
.envand build OpenSearch/Logserver user-directory settings.Resolve the configured user directory provider.
Look up the requested username.
If the user is missing:
prompt twice for a password
reject empty or mismatched passwords
create the user with AIBS admin entitlement
If the user exists without AIBS admin access:
update entitlement flags
If the user already has AIBS admin access:
leave the user unchanged
Print created, upgraded, or unchanged status.
Exit Codes
Code |
Meaning |
|---|---|
|
Created, upgraded, or confirmed unchanged. |
|
Input validation or user-directory provider failure. |
Security Notes
The password is intentionally interactive. There is no password CLI flag.
Run from a trusted shell. Do not capture terminal output into shared logs.
Confirm the
.envpoints at the intended user directory before running.