Skip to content

[Docs]: Tenant isolation guide#3913

Merged
jvstme merged 5 commits into
masterfrom
tenant_isolation_guide
Jun 15, 2026
Merged

[Docs]: Tenant isolation guide#3913
jvstme merged 5 commits into
masterfrom
tenant_isolation_guide

Conversation

@jvstme

@jvstme jvstme commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Add a guide with instructions on hardening the
isolation between tenants and hosts (where
"tenants" can refer to users or jobs, not
necessarily organizations; couldn't come up with a
more concise yet descriptive title).

Add a guide with instructions on hardening the
isolation between tenants and hosts (where
"tenants" can refer to users or jobs, not
necessarily organizations; couldn't come up with a
more concise yet descriptive title).
@jvstme jvstme requested review from peterschmidt85 and un-def May 28, 2026 00:45
|---|---|---|
| `1` | `HOST_FOR_MULTINODE_ONLY` | Host for distributed tasks, bridge otherwise |
| `2` | `HOST_WHEN_POSSIBLE` | Host whenever the job occupies a full instance (default) |
| `3` | `FORCED_BRIDGE` | Always bridge, including distributed tasks |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be explicit that this prevents both distributed tasks and PD disaggregation to work

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, distributed tasks can still work with FORCED_BRIDGE, e.g., if they use some external coordinator and don't need inter-job communication.

I've updated the section to describe the difference between host and bridge networking, and mentioned that host networking facilitates distributed tasks and routers. This should help users make a more informed decision


This gives unrestricted access to the underlying instance, bypassing container boundaries.

If desired, host SSH access can be disabled server-wide by configuring the [SSH proxy](server-deployment.md#ssh-proxy) and setting the following environment variable when starting the `dstack` server:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DOn't we want to include a guide on how to set up SSH proxy here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a reference to the deployment guide, I wouldn't duplicate the guide here

@jvstme jvstme requested a review from peterschmidt85 May 28, 2026 10:56
Comment thread mkdocs/docs/guides/tenant-isolation.md Outdated
`dstack` assumes mutual trust between users of the same project. While users' jobs run in Docker containers, users and their containers may have broad access to the underlying hosts. This guide explains how to restrict access to the host when stronger boundaries are required.

!!! info "Disclaimer"
Even with all precautions, complete isolation on shared hardware is hardly achievable — container escape vulnerabilities are common. The best way to provide true isolation between users is to place them in different `dstack` projects and not share hardware between them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to make it sound less harsh? IMO its too much focusing around "hardly achievable" i don't think the main question of the reader is whether its archivable or not. Maybe we can make the text here more neutral? Or a the very least don't frame it as "Disclaimer".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the wording

Comment thread mkdocs/docs/guides/tenant-isolation.md Outdated

To block runs that request privileged mode, write a [REST plugin](../reference/plugins/rest/index.md) or a [Python plugin](../reference/plugins/python/index.md) with an apply policy.

<div editor-title="src/isolation_plugin/__init__.py">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO plugins are still experimental and I'm somewhat not super confident of pushing everyone in this direction just yet. Maybe we could make it a collapsible section? Or even better add this example to the Plugins documentation, and only use a link from here - as we do with SSH proxy?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugins documentation already has a similar example actually. I updated it and removed the inline example from this guide

@jvstme

jvstme commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

@peterschmidt85, I'm merging, but if you feel like adjusting anything else, please do

@jvstme jvstme merged commit 4f6094c into master Jun 15, 2026
24 checks passed
@jvstme jvstme deleted the tenant_isolation_guide branch June 15, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants