Documentation
¶
Overview ¶
Package password implements `olares-cli cluster middleware password ...`.
Sub-noun under `cluster middleware` so the password-management verbs (today: `set`; future: maybe `rotate`, `reveal`) cluster together rather than scattering across the umbrella's top-level help. Mirrors the SPA's grouping in apps/.../controlHub/pages/Middleware/Overview.vue where password rotation is a discrete dialog launched from the instance card, not a top-level Middleware action.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPasswordCommand ¶
NewPasswordCommand assembles `olares-cli cluster middleware password`. Today's set is the Phase 6 slice (just `set`).
func NewSetCommand ¶
NewSetCommand: `olares-cli cluster middleware password set --type X --name N --namespace NS --user U [--password P] [--yes]`.
Calls SPA's updateMiddlewarePassword (apps/.../controlPanelCommon/network/index.ts:640): `POST /middleware/v1/<type>/password` with body `{name, namespace, middleware, user, password}`.
--password is OPTIONAL on the command line. If omitted, we prompt twice via golang.org/x/term.ReadPassword (no echo) and require both entries to match. This is the recommended path: shell history never captures the secret. Pass --password explicitly only when the caller is a script that already has the value securely.
ConfirmDestructive prompts before issuing the POST, showing the type / namespace / name / user so the operator can spot a wrong instance before the rotation lands.
Types ¶
This section is empty.