Files
windmill/cli/windmill-utils-internal
6f4124e9a0 feat: reference existing HashiCorp Vault secrets from secret variables (#12078)
* feat: reference existing HashiCorp Vault secrets from secret variables

A secret variable can hold `$external:vault://<path>#<key>` instead of a
value. The reference is resolved from Vault each time the variable is
read, so the value is never stored in Windmill. An instance-level
allow-list of path prefixes, optionally per workspace, is checked when a
reference is saved and again when it is resolved. Other schemes are
parsed and refused as unsupported backends.

Adds AppRole as a Vault auth method, an "External reference" toggle in
the variable editor and an instance settings section for the connection
and the allow-list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: point ee-repo-ref at the external secret references branch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: keep external secret references intact on delete, deploy and export

- Deleting a reference no longer runs the managed backend cleanup, which
  could delete the secret it points at.
- Deploying a variable to another workspace copies the reference, which
  the target's allow-list then checks, instead of its resolved value.
- A plain-secrets workspace export writes references verbatim.
- Reference paths reject backslashes, `#` and control characters, which
  the URL parser would otherwise normalize past the allow-list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: skip external secret references in key rotation and the read cache

- Workspace key rotation no longer tries to decrypt references.
- `get_value?allow_cache=true` does not cache a resolved reference, so
  Vault rotation and allow-list changes apply on the next read.
- `VaultSettings.mount_path` is optional in the OpenAPI spec, matching
  its serde default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: keep the OSS Vault reader stub public and regenerate workspace tool schemas

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: restrict external secret references to workspace admins and keep them out of the managed Vault storage

Creating, repointing or removing a reference now takes a workspace admin, on
create and update including already-encrypted pushes and cross-workspace
deploys; the variable form disables the toggle and fields for anyone else.

A reference into the storage of Windmill's own Vault secret backend (same
address, namespace folded into the path) is refused on save and on resolve,
whatever the allow-list says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: compare external secret references as written in workspace comparison

Two references that currently resolve to the same value still point at
different secrets, so comparing their resolved values hid a repoint from the
diff and from deployment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: let external secret references reuse the Vault backend connection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: hide the external reference toggle from non-admins unless already set

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: read whole Vault secrets, show allowed paths, and pick the variable type in one control

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: mask JSON fields only for whole Vault secrets, and skip PEM armor and JSON lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: align the reference editor and settings warning with the form and alert guidelines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: let a saved reference become non-secret directly, and warn when no prefix is allowed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: save an empty value when a reference is switched to another type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: keep a saved reference's baseline through type round trips

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: drop an unused binding in the reference parser

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: offer vault reference only when a vault path is allowed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: update ee-repo-ref to c0fd22ba77e6618cea7611d72fe2e75c8855c595

This commit updates the EE repository reference after PR #932 was merged in windmill-ee-private.

Previous ee-repo-ref: 56cba4e7771e7a87e56a67eb115549a31dd12b1a

New ee-repo-ref: c0fd22ba77e6618cea7611d72fe2e75c8855c595

Automated by sync-ee-ref workflow.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
2026-10-30 20:23:27 +01:00
..

Windmill Utils Internal

Internal TypeScript utility package for Windmill development tools and scripts.

What this package contains

This package provides internal utilities and tools used by the Windmill CLI, the VS CODE extension, and the frontend.

Development

To work on this package we need to generate the windmill client, and remove .ts extensions to the imports and exports (added by default for deno compatibility, so that the CLI can use this package).

You just need to run this before working on the package:

npm run dev

After you are done with your modifications, add back the .ts extensions:

./remove-ts-ext.sh -r

Building

To build the package for production:

npm run build

Publishing

To publish the package:

./publish.sh