CLI command
skarbiec rotation set
Give one Weles-managed item a rotation policy: rotate it every N days through the credential rotate lifecycle.
Invocation#
skarbiec rotation set <item-id> --every-days <N> --provider <provider> --consumer <consumer> [--purpose <text>]Purpose#
Give one Weles-managed item a rotation policy: rotate it every N days through the credential rotate lifecycle.
Required inputs and options#
- Requires one item id, a whole number of days above zero, and the provider and consumer credential rotate --local would be given; purpose is optional. Running it again for the same item replaces the interval, provider, consumer and purpose and keeps the policy's history.
Output and state effects#
- Stores the policy in the vault under rotation, appends rotation-set, and prints ok and the policy: every_days, provider, consumer, purpose, due, due_reason, next_due_at and the last attempt fields.
Refusals#
- Refuses an unknown flag or a wrong argument count with the rotation usage line; --every-days is required; --every-days must be a whole number of days above zero; --provider is required; --consumer is required; no live item: <item>; <item> is <state>, not a Weles-managed credential; only a managed credential can be rotated on a schedule. Bring it under management with credential adopt or credential acquire first; and on a replica: this vault replicates bond <name> from <source>; a direct rotation set here is replaced by the next pull. Write it on the source vault.