rotate_encryption_key
Re-encrypt all encrypted G-code files with a new passphrase. Preview changes with a dry run before executing the rotation.
Instructions
Rotate the G-code encryption key by re-encrypting all files.
Scans *directory* recursively for encrypted G-code files, decrypts
with the old passphrase, and re-encrypts with the new one.
**Run with ``dry_run=True`` first** to preview which files would be
affected. Then call again with ``dry_run=False`` to execute.
After rotation, update the ``KILN_ENCRYPTION_KEY`` environment
variable to the new passphrase and restart the server.
Args:
old_passphrase: The current KILN_ENCRYPTION_KEY value.
new_passphrase: The new passphrase to encrypt with.
directory: Root directory to scan for encrypted G-code files.
pattern: Glob pattern for files to process (default ``"*.gcode"``).
dry_run: Preview only — don't modify files (default ``True``).
Requires Enterprise license and admin scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| pattern | No | *.gcode | |
| directory | Yes | ||
| new_passphrase | Yes | ||
| old_passphrase | Yes |