Repository navigation
Carry Wrangler's secrets.required with each deployment - #352
Merged
Merged
Conversation
widefleet deploy and the template builder accept secrets.required in the Wrangler configuration, as Cloudflare documents it. The names must be valid secret names, unique and different from the configuration's bindings and variables. The list travels in the deployment metadata as required_secrets, so every stored version keeps its own list. Runtimes do not receive it.
This was referenced Nov 23, 2026
widefleet deploy now rejects __proto__ and lists of more than 128 names, as the contract's requiredSecrets does, instead of failing after the upload. The builder already applies that schema; tests cover both. Both early checks also count the ASSETS binding that every deployment gets without an assets key, so a required secret named ASSETS fails before the build. Platform bindings use the WIDEFLEET_ prefix, which secret names cannot use.
A template install checked the built metadata only when publishing, after the app existed. It now checks it right after the build, with the same contract the upload uses, so a template the platform rejects leaves no app behind.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
widefleet-docs | 75571e6 | Nov 23 2026, 05:54 PM |
tnkuehne
added a commit
that referenced
this pull request
Nov 23, 2026
## Problem A version that declares required secrets still deploys when the app does not have them, so the app starts without its credentials. ## Change **Deployments and rollbacks fail while the app lacks a secret the version requires.** - The error lists every missing name, as `wrangler deploy` does: `The following required secrets have not been set: API_KEY, API_SECRET.` It points to the app's Secrets page and `widefleet secret put`. - The check runs where every deployment is queued: CLI and API uploads, template installs, previews and rollbacks, for agent and Cloudflare executions alike. - A rollback checks the list of the version it selects. **Secret edits keep working.** - Changing or deleting a secret redeploys the selected code without the check, so a required secret can be deleted, as Cloudflare allows. The app's code reports its missing setup until the secret is set again. **Differences from Wrangler.** - `widefleet deploy` creates a new app before uploading, so the first deployment of a new app fails after the app exists. Set its secrets and deploy again, or create it first with `widefleet create`. Wrangler fails before creating the Worker. - Previews are separate apps with their own secrets, so a preview needs the required secrets set on it. ## Tests - Integration test: a deployment without both secrets lists both, then the remaining one; it succeeds once both are set; deleting a required secret is allowed; a rollback to the version is rejected through the API with the missing name until the secret is set again. - Ran `pnpm check` and the unit and integration suites. - Not run: the container runtime suites. The Cloudflare suite ran on #354, which includes this change. Stack: #352 → #353 (this PR) → #354 → #355. The docs follow in #356. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=116868905&sig=0a90f4561e35c8039a6c3e0790389f3ed107d0ea2df43d6a05233adfa0005d11"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F353&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-impact-verdict --> The PR appears safe to merge, with template secret input supplied by dependent PR #354. <details open><summary><h3>Summary</h3></summary> Deployments and rollbacks now reject versions whose required secrets are missing. Errors list the missing names and explain where to set them. - Deployments and rollbacks stop when their selected version needs missing secrets. </details> <details open><summary><h3>Diagram</h3></summary> ```mermaid %%{init: {'theme': 'neutral'}}%% flowchart TD A[Upload or rollback] --> B[Read selected version] B --> C{Required secrets present?} C -->|No| D[Return missing names] C -->|Yes| E[Queue agent or hosted deployment] F[Secret edit] --> G[Redeploy selected code without required-secret check] G --> E ``` </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (2) · Last reviewed commit: ["Reject deployments and rollbacks without..."](39782a2) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
tnkuehne
added a commit
that referenced
this pull request
Nov 23, 2026
## Problem A template whose code requires secrets cannot be installed in one step: the install deploys before anyone can set the secrets, so the deployment fails. The template page, CLI and API also do not say which secrets a template needs. ## Change **Template installs take the values of the required secrets.** - The install checks before building that every secret the template's `wrangler.jsonc` requires has a value, and that no other secret is given. - The values are saved only together with the app's first deployment, with the same authorization and binding limit as a secret edit. On an agent installation, the upload transaction accepts the deployment and saves them under the app lock. On Cloudflare, the deployment command carries the encrypted values and claims the first deployment; recording the accepted deployment saves them in the same transaction, and the operation history keeps the command without them. - If another deployment of the app is accepted first, the install fails and saves nothing, so the values only ever reach the template's own code. - The API takes them as `secrets` in the install request. `widefleet catalog templates install ID --secret-file NAME=PATH` reads each value from a file, as `widefleet secret put --file` does, and sends `secrets` only when given. **The template detail lists `requiredSecrets`.** `widefleet catalog templates show` prints them for agents. **The template page asks for each value.** - A password field per secret, labeled with its name. Install is enabled once every field is filled. - Installing requires the existing permission to create apps. The installer owns the new app and can manage its secrets, so no member sees the form without being able to submit it. **The secret status reports what the deployed code requires.** - `required` lists the secrets of the latest accepted deployment's version, in Cloudflare's acceptance order on Cloudflare. - The Secrets page marks set ones as **Required** and lists unset ones as **Missing**, with **Set value**, which fills in the name and focuses the value field. - `widefleet secret list` prints the missing names. ### Screenshots Gmail with its two required secrets (declared in #355), 1280 px, light. | Before | After | | --- | --- | | <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-template-install-1280-light.png" width="420" alt="Template page before"> | <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-template-install-1280-light.png" width="420" alt="Template page after"> | | Template page: Install only | Template page: one field per required secret | | <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-secrets-missing-1280-light.png" width="420" alt="Secrets page with one secret before"> | <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-secrets-missing-1280-light.png" width="420" alt="Secrets page with a missing secret after"> | | Secrets with only `GOOGLE_CLIENT_ID` set | The other one is listed as missing; **Set value** filled in its name | | <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-secrets-required-1280-light.png" width="420" alt="Secrets page with both secrets before"> | <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-secrets-required-1280-light.png" width="420" alt="Secrets page with both secrets after"> | | Both secrets set | Both marked as required | Filled form: [1280 light](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-template-install-filled-1280-light.png). Narrow and dark: [template 390](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-template-install-390-light.png) ([before](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-template-install-390-light.png)), [missing 390](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-secrets-missing-390-light.png) ([before](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-secrets-missing-390-light.png)), [required 390](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-secrets-required-390-light.png) ([before](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-secrets-required-390-light.png)), [template 1280 dark](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-template-install-1280-dark.png) ([before](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-template-install-1280-dark.png)), [missing 1280 dark](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-secrets-missing-1280-dark.png) ([before](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-secrets-missing-1280-dark.png)), [required 1280 dark](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/after-secrets-required-1280-dark.png) ([before](https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/before-secrets-required-1280-dark.png)). The after shot of the missing secret shows **Skip to content** because the keyboard focus followed the previous action. The before Secrets page shows two deployments because saving each secret redeployed the installed app. Checked: desktop and 390 px in light and dark without horizontal scrolling, Install disabled until every value is filled, the install through to the Secrets page, removing a required secret and setting it again with **Set value**. Not checked visually: an install whose template changed its required secrets after the page loaded (the server rejects it and lists the missing names), a secret name long enough to wrap, and the pages on a Cloudflare installation. ## Tests - Integration tests: the template detail lists the secrets; installs without a value or with an extra secret fail before building; members without the create permission are refused; the values are saved and the deployed version records its list; removing one leaves it in `required` and out of `names`. - A template's Wrangler parsing, the API listing with `wrangler.json`, and the CLI request body and `--secret-file` errors (`RUN_CLI_TESTS=1`). - The browser test that installs Gmail with both values and checks the Secrets page is in #355, with the template that requires them. - Cloudflare: registration saves the secrets once across request and Workflow races, a deployment accepted earlier rejects the install without saving anything, and the status follows acceptance order. A workerd test serves the install's secret to its own code and none to other code accepted first. - Ran `pnpm check`, the unit and integration suites, the CLI Rust tests and the Cloudflare suite (`RUN_CLOUDFLARE_TESTS=1`). - Not run: the container runtime suites. Stack: #352 → #353 → #354 (this PR) → #355. The docs follow in #356. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=116868942&sig=d99d2352da232b3849eb722aee85189c952b1579e0a3a1f604ded5de0d825ef4"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F354&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-impact-verdict --> The PR appears safe to merge; both previous findings are fixed and no new blocking issue was found. <details open><summary><h3>Summary</h3></summary> Adds required secrets to template details and accepts their values during installation. - Template details list the secret names needed to install them. - Template installs collect required values and save them with the first deployment. - Secret status shows which names the deployed code requires. Both previous findings are addressed. No new actionable issues were found. Tests and browser checks were not run during this review. </details> <details open><summary><h3>Diagram</h3></summary> ```mermaid sequenceDiagram actor Installer participant Install participant Builder participant Publish participant Cloudflare participant Database Installer->>Install: Required secret values Install->>Install: Check missing and extra names Install->>Builder: Build template sources Builder-->>Install: Worker and metadata Install->>Publish: Worker and encrypted values Publish->>Cloudflare: First-deployment command Cloudflare->>Database: Lock app and check deployment history alt App has no deployment Cloudflare->>Database: Save values and record deployment together else Another deployment exists Cloudflare-->>Installer: Reject without saving values end ``` </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (2) · Last reviewed commit: ["Report the required secrets of the deplo..."](65b93e0) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
tnkuehne
added a commit
that referenced
this pull request
Nov 23, 2026
#355) ## Problem The Gmail, Google Calendar, Google Sheets, Google Drive, WHOOP and Strava templates cannot connect accounts without the organization's own OAuth client, but nothing asks for it when installing. The app deploys and reports `setup_required` until an administrator finds the Secrets page. ## Change **These templates require their OAuth client.** - Each `wrangler.jsonc` lists the client ID and secret under `secrets.required`: `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`, `WHOOP_CLIENT_ID` and `WHOOP_CLIENT_SECRET`, `STRAVA_CLIENT_ID` and `STRAVA_CLIENT_SECRET`. - Installing from the template page or the CLI asks for the values, and deploying without them fails with their names. - Templates with a managed client (Outlook, OneDrive, Excel, Teams, GitHub, Linear) and Garmin Connect, whose users bring their own keys, keep optional secrets. **The templates still handle a deleted secret.** They keep reporting `setup_required`, and their connect page now asks the administrator to set the secrets on the app's Secrets page. **`template.md` follows the new order.** - Deploying a copy creates the app, sets both secrets with `widefleet secret put` and then runs `widefleet deploy`. - The setup steps say that installs ask for the values, and that the provider's redirect URL or callback domain can be added once the app's URL is known. ### Screenshots The Gmail template page now asks for both values before installing (1280 px, light): <img src="https://gist.githubusercontent.com/tnkuehne/0ac26ce32c2037ae89a7e23f9f9ae198/raw/6742d313e346ee88719a8ff56f49044b2a232540/compare-template-install-1280-light.png" alt="Gmail template page before and after" width="840"> The Secrets page shots are in #354. Not checked visually: the other five template pages, which use the same form. ## Tests - A browser test installs Gmail from its page, checks that Install waits for both password fields, that both secrets are saved encrypted, and that the Secrets page marks them as required. It removes one, checks that it is listed as missing, and sets it again through **Set value**. - The template install integration tests install Gmail with its secrets, and check that an install raced by another deployment leaves that app's secrets unchanged. - Ran `pnpm check`, the unit and integration suites, each changed template's tests and the browser test. - Not run: the container runtime suites. The Cloudflare suite ran on #354. Stack: #352 → #353 → #354 → #355 (this PR). The docs follow in #356. <!-- greptile_comment --> <!-- greptile_summary --> <h2><a href="https://app.greptile.com/api/retrigger?id=116868985&sig=77c5cca5d263520146b5239cfce7e6cc935679b4d72cae0f37f1ef1cc9cd1d08"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/-/switch-tenant?tenant=mendra&next=%2Fwidefleet%2Fwidefleet%2Fpull%2F355&utm_source=greptile_review&utm_medium=github&utm_campaign=view_in_greptile"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2> <!-- greptile-impact-verdict --> The PR appears safe to merge; no new actionable issues were found. <details open><summary><h3>Summary</h3></summary> Requires OAuth client secrets for Gmail, Google Calendar, Google Drive, Google Sheets, WHOOP and Strava. - Six OAuth templates ask for provider credentials before deployment. - Connection pages tell admins where to restore missing OAuth keys. - Setup guides put app creation and OAuth keys before deployment. </details> <!-- greptile_confidence_score:5 --> <sub>Reviews (3) · Last reviewed commit: ["Find the setup prompt in its own section..."](48691a1) · [Reviewed by Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub> <!-- /greptile_comment -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Wrangler's
secrets.requireddeclares the secrets a Worker cannot run without. Widefleet rejects unknown Wrangler keys, so a project that uses the key cannot be deployed, and a deployment cannot record which secrets its code needs.Change
widefleet deployand the template builder acceptsecrets.required."secrets": { "required": ["API_KEY"] }.WIDEFLEET_prefix or__proto__, unique, at most 128, and different from every binding and variable, including theASSETSbinding every deployment gets. The CLI and the builder report a mistake before building.Template installs validate the build before creating the app. A template whose build the upload would reject now fails without leaving an app behind.
Each deployed version carries its list.
required_secrets, so every stored version, including one a rollback selects, keeps its own list.The next PRs in this stack check the list when deploying (#353), ask for the values when installing a template (#354), and declare the list in the templates that need their organization's OAuth client (#355).
Tests
__proto__, 129 names andASSETSwithout anassetskey.RUN_BUILDER_TESTS=1).pnpm check, the unit and integration suites,cargo clippy --workspaceand the CLI Rust tests.Stack: #352 (this PR) → #353 → #354 → #355. The docs follow in #356.


Confidence Score: 5/5
This PR appears safe to merge; both previous findings are fixed and no new actionable issues were found.Summary
Carries Wrangler's
secrets.requiredinto each deployment asrequired_secrets, while keeping it out of runtime metadata.Reviews (2) · Last reviewed commit: "Validate a template's build before creat..." · Reviewed by Greptile