Skip to content

Commit fd7bebc

Browse files
authored
Merge branch 'main' into docs/volumes-sandbox-claude-template
2 parents 65dde38 + 77348f8 commit fd7bebc

File tree

5 files changed

+54
-19
lines changed

5 files changed

+54
-19
lines changed

docs/core_concepts/12_staging_prod/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,21 @@ This can be useful for non-admin (for example, operators) to share a page to pro
7878
![Shareable page](./shareable_page.png.webp 'Shareable page')
7979

8080
> This page then allows users with the right permissions to deploy the given items.
81+
82+
## Run on behalf of
83+
84+
When deploying a script, flow, app, or trigger to another workspace, the **"run on behalf of"** selector lets you choose which user the item will execute as in the target workspace. This is useful for controlling execution permissions across environments.
85+
86+
There are three options:
87+
88+
- **Keep the target workspace's existing setting** — the item continues running as whatever user was previously configured in the target workspace. This is the default for items that already exist there.
89+
- **Use yourself** — the item will run as your own user in the target workspace.
90+
- **Pick any user from the target workspace** — select a specific user (e.g. a dedicated service account) for the item to run as.
91+
92+
Selecting a user other than yourself requires **admin** rights or membership in the **`wm_deployers`** group in the target workspace.
93+
94+
:::tip Virtual users for fine-grained permissions
95+
96+
For production workspaces, consider creating dedicated virtual users scoped to specific responsibilities. See [Permission compartmentalization with virtual users](../16_roles_and_permissions/index.mdx#permission-compartmentalization-with-virtual-users) for the recommended pattern.
97+
98+
:::

docs/core_concepts/16_roles_and_permissions/index.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,34 @@ Also, [extra permission](#extra-permissions) was given to Ruben as viewer.
170170

171171
<br />
172172

173+
## Run on behalf of
174+
175+
Scripts and flows can be configured to run **on behalf of** a specific user. When set, that user's permissions are used during execution — the runnable can only access the resources, variables, and folders that user has rights to — and all runs are attributed to that user in the [audit logs](../14_audit_logs/index.mdx).
176+
177+
For **apps**, run on behalf of is always enabled: app executions always use the permissions of the set user (usually the app's last editor).
178+
179+
**Schedules and triggers** work in a similar manner: they use the `edited_by` user as the owner of the executions they create.
180+
181+
## Permission compartmentalization with virtual users
182+
183+
By combining the run on behalf of mechanism with dedicated users, you can implement fine-grained permission compartmentalization. Instead of running everything as a single admin or shared account, create users scoped to specific logical modules. For example:
184+
185+
- A `billing-bot` user with access only to billing-related resources and folders
186+
- A `data-pipeline` user scoped to data processing folders and their associated variables
187+
188+
Then set scripts, flows, schedules, and triggers to run on behalf of these virtual users. A script running on behalf of `billing-bot` cannot accidentally read or modify resources outside its scope, even if the script code itself contains a bug or misconfiguration. The audit logs will also clearly show which virtual user initiated each execution.
189+
190+
Combined with the ["run on behalf of" selector during deployments](../12_staging_prod/index.md#run-on-behalf-of), this pattern extends across workspaces: when deploying to a production workspace, you can assign each item to the appropriate virtual user in the target environment.
191+
173192
<div className="grid grid-cols-2 gap-6 mb-4">
174193
<DocCard
175194
title="Groups and folders"
176195
description="Groups classify users with shared permissions, while folders group items and assign role-based access control."
177196
href="/docs/core_concepts/groups_and_folders"
178197
/>
198+
<DocCard
199+
title="Deploy to staging/prod"
200+
description="Deploy items to another workspace with control over which user they run as."
201+
href="/docs/core_concepts/staging_prod"
202+
/>
179203
</div>

docs/core_concepts/52_native_triggers/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ You can also create native triggers directly from a script or flow's **Triggers*
7272

7373
## Nextcloud triggers
7474

75+
Firs of all make sure you set up the [workspace integration](#workspace-integration) for Nextcloud.
76+
7577
Nextcloud native triggers watch for file, folder, and calendar changes on a [Nextcloud](https://nextcloud.com/) instance and trigger a script or flow when events occur.
7678

7779
### Prerequisites
@@ -115,6 +117,8 @@ export async function main(
115117

116118
## Google triggers
117119

120+
First of all make sure you set up the [workspace integration](#workspace-integration) for Google.
121+
118122
Google native triggers watch for changes in [Google Drive](https://drive.google.com/) or [Google Calendar](https://calendar.google.com/) and trigger a script or flow when events occur.
119123

120124
### Prerequisites
@@ -138,7 +142,7 @@ Both use push notifications via Google watch channels. Windmill automatically re
138142

139143
### Event payload
140144

141-
Google push notifications only contain metadata about the change, not the full event details. To get the actual content of the change, use the [`gworkspace` resource](../3_resources_and_types/index.mdx) created during workspace integration to query the Google API.
145+
Google push notifications only contain metadata about the change, not the full event details. To get the actual content of the change, use the [`gworkspace` resource type](../3_resources_and_types/index.mdx) created during workspace integration to query the Google API.
142146

143147
```typescript
144148
type GoogleTriggerPayload = {

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/roadmap/index.jsx

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const roadmapItems = [
2828
'Investigate having Windmill work locally for local workflow and script execution allowing better DX and AI agents to have immediate local feedback.'
2929
},
3030
{
31-
title: 'Full wmill lint for agents',
31+
title: 'Improve wmill lint for agents',
3232
category: 'Developer',
3333
issueLink: '',
3434
description:
35-
'Implement a full wmill lint to be used as a complete feedback tool for agents locally + clear OpenAPI specs for each kind of items writable locally by agents, for improved local dev.'
35+
'The wmill lint command already works for v0. Improve it to be a more complete feedback tool for agents locally + clear OpenAPI specs for each kind of items writable locally by agents, for improved local dev.'
3636
},
3737
{
3838
title: 'Unit tests support',
@@ -41,29 +41,17 @@ const roadmapItems = [
4141
description:
4242
'Investigate unit tests with Windmill, either only guidance for local tests or/and supporting it as a first class concept in Windmill.'
4343
},
44-
{
45-
title: 'True IaC support',
46-
category: 'Backend',
47-
issueLink: '',
48-
description: 'Full instance config can be set using yaml in the helm chart synced with the DB.'
49-
},
50-
{
51-
title: 'Full-code App GA',
52-
category: 'UI',
53-
issueLink: '',
54-
description: 'Finish the latest full-code app nits and move from Beta to General Availability'
55-
},
5644
{
5745
title: 'Extend multiplayer to flows and apps',
5846
issueLink: '',
5947
description: 'Extend multiplayer working for scripts to flow and apps.'
6048
},
6149
{
62-
title: 'Native triggers for common external services',
50+
title: 'Add more native triggers',
6351
category: 'Backend',
6452
issueLink: '',
6553
description:
66-
'Native triggers support to allow setting Github/Nextcloud/GWorkspace events as direct triggers by setting the webhooks on the external service, and monitor their liveness'
54+
'Native triggers for Nextcloud and Google are already done. Next steps are adding native triggers for GitHub, Linear, etc.'
6755
},
6856
{
6957
title: 'Single shard performance focus',
@@ -78,11 +66,11 @@ const roadmapItems = [
7866
description: 'Support multi-shards for unlimited scalability'
7967
},
8068
{
81-
title: 'Ruleset for deployment rules',
69+
title: 'Add more rulesets',
8270
category: 'Backend',
8371
issueLink: '',
8472
description:
85-
'Ruleset for deployment rules to match Github rules (read-only prod workspaces, approver rules, etc)'
73+
'Add more rulesets for deployment rules to match Github rules (read-only prod workspaces, approver rules, etc)'
8674
},
8775
{
8876
title: 'Data tables/PostgreSQL runtime v2',

0 commit comments

Comments
 (0)