The Device Password Rotation workflow rotates the password for a single user account on a single network device. It renders the device’s intended configuration (which by then contains the new password from the secrets store), computes the diff against the running configuration, validates that the diff only changes the target user’s password — and on that condition auto-approves and applies the change. The auto-approval is the central feature: a pure password rotation never blocks on a human reviewer; a diff that touches anything else fails closed.
For site-wide bulk rotation across every device at a site, use Site Password Rotation instead — it fans out a Device Password Rotation per device.
Before running, confirm the following are in place:
secrets: install config) at the path the device’s password mapping points to, then re-render via the Render Service so the device’s intended configuration carries the new password. If the render has not rolled forward, the diff stage will report “No password changes needed, no diff” and the rotation will do nothing.get_password_mappings activity fails fast if the mapping is missing.After submission, a status page appears showing the four stages. A normal password-only rotation completes without human interaction.
The workflow runs four stages. The diff stage flips from requires_approval=True to requires_approval=False at runtime once the diff is validated, so the operator never sees an approval prompt on the happy path.
load_intended_configuration — Load the device’s intended config.
Pulls the rendered intended configuration plus its commit SHA. The intended config must contain the new password from the secrets store; if it still contains the old password, this is an upstream render issue and the diff stage will report “No password changes needed, no diff.”
perform_configuration_diff — Compute the diff and validate it.
Validates the device’s platform is supported, validates the password mapping is present for the target username, runs a candidate diff against the device’s running configuration, and then:
approved=False with display “No password changes needed, no diff.” The workflow continues to perform_backup to record the unchanged state.validate_password_diff against the diff text and the target username. If the diff only changes the target user’s password, the stage clears its approval requirement and auto-approves with display “Password Rotation Configuration Diff (Auto-Approved password only changes for ‘<user>’)”.DiffValidationError with the invalid lines surfaced in the error message. The workflow halts; apply_configuration and perform_backup are not reached.apply_configuration — Apply the auto-approved diff.
Pushes the configuration change to the device. The same non-retryable errors as Configuration Deploy apply: ConfigSyntaxException, DiffChangedException.
perform_backup — Capture a fresh backup.
Starts the Configuration Backup workflow as a child workflow with trigger=WORKFLOW and a 10-minute run timeout. The backup is tagged with the just-applied commit SHA.
After the workflow reports success, confirm:
perform_configuration_diff green and downstream stages on the empty-diff path).DiffValidationError waiting to happen on the next run.A rotation rarely leaves a device in a worse state than it started in, but if it does:
breakglass user with the site root password from the secrets store. If breakglass is also unreachable, reach the device via console using the Options for logging into a stuck device procedure.nv action run system ztp re-runs the ZTP boot script (including user creation) without sudo. See New Site Bringup → Rerunning ZTP on a live device.DiffValidationError: Diff contains non-password changes.
The intended configuration has drifted in ways beyond the password — for example, a template change landed in the same render. The workflow fails closed by design rather than silently apply unrelated changes. Resolve the unintended change (revert the template or update Nautobot), re-render, and re-run. If you genuinely want to apply a mixed change, route it through Configuration Deploy so a human reviews the diff.
get_password_mappings activity failed.
The device’s config context does not have a password mapping populated for the target username. Add the mapping in Nautobot and re-run.
Diff stage reports “No password changes needed, no diff.”
Either the rotation has already been applied, or the rendered intended config still references the old password (render has not picked up the new secret yet). Re-render via the Render Service if you expected a change.
Unsupported platform error.
Password rotation is only implemented for Cumulus Linux and NVOS today. Devices on other platforms fail at platform validation; rotate their passwords through whatever per-platform process applies.
DiffChangedException at apply.
The device’s running configuration changed between diff and apply. Re-run the workflow — it will compute a fresh diff and re-validate.