password

package
v0.0.0-...-310f30e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

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

func NewPasswordCommand(f *cmdutil.Factory) *cobra.Command

NewPasswordCommand assembles `olares-cli cluster middleware password`. Today's set is the Phase 6 slice (just `set`).

func NewSetCommand

func NewSetCommand(f *cmdutil.Factory) *cobra.Command

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL