Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

* [Security Overview](security/security-overview.md)
* [IP Addresses](security/ip-addresses.md)
* [Sign-in & Sessions](security/sign-in-and-sessions.md)
* [Enterprise SSO](security/enterprise-single-sign-on.md)

## Product Lifecycle
Expand Down
4 changes: 2 additions & 2 deletions cli/dcd-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Authenticate with DeviceCloud via your browser. Run it once and the CLI stores y
dcd login
```

This opens your browser. Sign in with an email code, GitHub, Google, a passkey or your company's SSO, then choose **Authorize and finish login**. If you use two-factor authentication, or your team requires it, you'll also confirm with your authenticator app or a passkey. A session that doesn't meet a team's sign-in requirement can't reach that team's results (see [Sign-in and two-factor authentication](../security/security-overview.md#sign-in-and-two-factor-authentication)). If you belong to more than one team, the CLI then asks you to pick the one to use. The picker starts on the team from your last login, so pressing Enter keeps it. Your session is then saved locally (see [Where credentials are stored](#where-credentials-are-stored)).
This opens your browser. Sign in with an email code, GitHub, Google, a passkey or your company's SSO, then choose **Authorize and finish login**. If you use two-factor authentication, or your team requires it, you'll also confirm with your authenticator app or a passkey. A session that doesn't meet a team's sign-in requirement can't reach that team's results (see [Sign-in and two-factor authentication](../security/sign-in-and-sessions.md#sign-in-and-two-factor-authentication)). If you belong to more than one team, the CLI then asks you to pick the one to use. The picker starts on the team from your last login, so pressing Enter keeps it. Your session is then saved locally (see [Where credentials are stored](#where-credentials-are-stored)).

The CLI waits up to 10 minutes for you to finish in the browser. After that, it stops with "Login timed out", and you run `dcd login` again.

Expand Down Expand Up @@ -90,4 +90,4 @@ The session from `dcd login` is written to:
- `$XDG_CONFIG_HOME/dcd/config.json`, or
- `~/.dcd/config.json` if `XDG_CONFIG_HOME` is not set

The file is created with `0600` permissions (owner read/write only) and holds your session tokens and the active team. The CLI keeps the session fresh while you use it, but the session itself has a limit: it ends 30 days after you log in, or after 7 days without a `dcd` command, whichever comes first. When it ends, commands fail with a message telling you to run `dcd login` again. A process that keeps running, such as the [MCP server](../mcp/connect.md), stops working at the same point, so use an API key for long-running processes. See [Session limits](../security/security-overview.md#sessions).
The file is created with `0600` permissions (owner read/write only) and holds your session tokens and the active team. The CLI keeps the session fresh while you use it, but the session itself has a limit: it ends 30 days after you log in, or after 7 days without a `dcd` command, whichever comes first. When it ends, commands fail with a message telling you to run `dcd login` again. A process that keeps running, such as the [MCP server](../mcp/connect.md), stops working at the same point, so use an API key for long-running processes. See [Session limits](../security/sign-in-and-sessions.md#sessions).
2 changes: 1 addition & 1 deletion getting-started/api-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This opens your browser, where you sign in with an email code, GitHub, Google, a
- `$XDG_CONFIG_HOME/dcd/config.json`, or
- `~/.dcd/config.json` if `XDG_CONFIG_HOME` is not set

The file is written with `0600` permissions (owner read/write only). The CLI keeps the session fresh while you use it, but a session ends 30 days after you log in, or after 7 days without a `dcd` command, whichever comes first. Then the CLI tells you to run `dcd login` again. These limits don't apply to API keys: a key lasts until its expiry date, if you set one, or until you revoke it. So use a key for CI and for processes that keep running, such as the [MCP server](../mcp/connect.md). See [Session limits](../security/security-overview.md#sessions).
The file is written with `0600` permissions (owner read/write only). The CLI keeps the session fresh while you use it, but a session ends 30 days after you log in, or after 7 days without a `dcd` command, whichever comes first. Then the CLI tells you to run `dcd login` again. These limits don't apply to API keys: a key lasts until its expiry date, if you set one, or until you revoke it. So use a key for CI and for processes that keep running, such as the [MCP server](../mcp/connect.md). See [Session limits](../security/sign-in-and-sessions.md#sessions).

::: info
No browser on the box (e.g. over SSH)? Run `dcd login --no-browser` and the CLI prints a URL to open elsewhere.
Expand Down
2 changes: 1 addition & 1 deletion mcp/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ codex mcp add devicecloud -- dcd mcp

To run the npm package instead of an installed dcd, use `npx` as the command, with the arguments `-y`, `@devicecloud.dev/dcd` and `mcp`. That needs Node 22 or later.

`dcd mcp` signs in like the CLI: with your `dcd login` session, which it renews as it runs, or with `DEVICE_CLOUD_API_KEY`. A `dcd login` session still ends 30 days after you log in, or after 7 days without use, so use an API key for a server that stays running. See [Session limits](../security/security-overview.md#sessions).
`dcd mcp` signs in like the CLI: with your `dcd login` session, which it renews as it runs, or with `DEVICE_CLOUD_API_KEY`. A `dcd login` session still ends 30 days after you log in, or after 7 days without use, so use an API key for a server that stays running. See [Session limits](../security/sign-in-and-sessions.md#sessions).

With a `dcd login` session, the server works in your active team, the one [`dcd switch-org`](../cli/dcd-login.md#dcd-switch-org) sets. After you switch teams, restart your MCP client: a running server can keep using the old team for up to an hour.

Expand Down
2 changes: 1 addition & 1 deletion security/enterprise-single-sign-on.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ The Default Relay State is where people land when they start from your identity
* People with an email address on a protected domain must sign in through **Login with SAML SSO**. The login screen turns away an email code, GitHub, Google or a passkey for those addresses.
* Assign everyone who needs access to the DeviceCloud app in your identity provider before SSO is turned on. Anyone on a protected domain who isn't assigned can't sign in.
* People who sign in through SSO for the first time join your team automatically.
* Your identity provider handles multi-factor authentication. SSO accounts don't set up DeviceCloud two-factor authentication or passkeys, and an SSO sign-in meets every team [Sign-in requirement](security-overview.md#sign-in-and-two-factor-authentication).
* Your identity provider handles multi-factor authentication. SSO accounts don't set up DeviceCloud two-factor authentication or passkeys, and an SSO sign-in meets every team [Sign-in requirement](sign-in-and-sessions.md#sign-in-and-two-factor-authentication).
* API keys keep working as before.
28 changes: 1 addition & 27 deletions security/security-overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: "How DeviceCloud protects your data: security leadership, reporting a vulnerability, where data is held, encryption, sign-in and sessions, retention, payments, code control and the IT security policies we follow."
description: "How DeviceCloud protects your data: security leadership, reporting a vulnerability, where data is held, encryption, retention, payments, code control and the IT security policies we follow."
---

# Security Overview
Expand Down Expand Up @@ -40,32 +40,6 @@ Data held by our database and file storage providers is encrypted at rest with A

On top of TLS, your uploads get envelope encryption by default. Before anything is uploaded, the CLI encrypts your app binary, flows and environment variables on your machine, each with its own random key (AES-256-GCM). It then encrypts each of those keys with DeviceCloud's public key (X25519), so the copies held in our storage and caches are ciphertext, and only our API can recover the keys that decrypt them. To turn envelope encryption off, pass `--no-encrypt` or set `DCD_ENCRYPT=0`. The upload is still encrypted in transit.

## Sign-in and two-factor authentication

You can sign in to the console with an email code, GitHub, Google or a passkey. With [Enterprise SSO](enterprise-single-sign-on.md), you sign in through your identity provider instead.

In **Settings → Account**, each person can add:

* **Two-factor authentication**: a code from an authenticator app, asked for each time you sign in with an email code, GitHub or Google. A passkey already counts as two-factor, so the code isn't asked for after a passkey unless you turn on **Also ask for a code after signing in with a passkey**.
* **Passkeys**: sign in with your fingerprint, face, screen lock or a security key instead of an email code.

Owners and admins can set a team **Sign-in requirement** in **Settings → Team**:

| Option | Members must sign in with |
| --- | --- |
| Off | Any method |
| Two-factor | A passkey, or a code from an authenticator app |
| A passkey | A passkey |
| A passkey and a code | A passkey, then a code from an authenticator app |

A member who hasn't signed in that way still sees the team listed, but can't open its results, uploads or settings until they do. This applies to `dcd login` sessions too: run `dcd login` again with a method that meets the requirement. Any SSO sign-in meets every option. API keys aren't affected.

## Sessions

Signing in to the console, or with `dcd login`, starts a session. A session ends 30 days after you sign in, or after 7 days without use, whichever comes first, and you then sign in again. An open console tab counts as use. The limits are checked when the session renews, which happens about once an hour, so a session can last up to an hour past them.

You can see your sessions in the console under **Settings → Account → Active sessions**, sign out a single device, or sign out of all devices at once. API keys are not sessions, so these limits don't apply to them.

## Data Retention

Uploads (both binaries and workflow files) are automatically deleted 1 month after last use; result data including maestro logs, screenshots, videos and the environment variables passed with `--env` are retained for 6 months. Our database backups are kept for at most 6 months, so a backup copy of this data is gone at most 6 months after it is deleted.
Expand Down
31 changes: 31 additions & 0 deletions security/sign-in-and-sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: "How people sign in to the DeviceCloud console and CLI: sign-in methods, two-factor authentication, passkeys, team sign-in requirements, and how long sessions last."
---

# Sign-in & Sessions

## Sign-in and two-factor authentication

You can sign in to the console with an email code, GitHub, Google or a passkey. With [Enterprise SSO](enterprise-single-sign-on.md), you sign in through your identity provider instead.

In **Settings → Account**, each person can add:

* **Two-factor authentication**: a code from an authenticator app, asked for each time you sign in with an email code, GitHub or Google. A passkey already counts as two-factor, so the code isn't asked for after a passkey unless you turn on **Also ask for a code after signing in with a passkey**.
* **Passkeys**: sign in with your fingerprint, face, screen lock or a security key instead of an email code.

Owners and admins can set a team **Sign-in requirement** in **Settings → Team**:

| Option | Members must sign in with |
| --- | --- |
| Off | Any method |
| Two-factor | A passkey, or a code from an authenticator app |
| A passkey | A passkey |
| A passkey and a code | A passkey, then a code from an authenticator app |

A member who hasn't signed in that way still sees the team listed, but can't open its results, uploads or settings until they do. This applies to `dcd login` sessions too: run `dcd login` again with a method that meets the requirement. Any SSO sign-in meets every option. API keys aren't affected.

## Sessions

Signing in to the console, or with `dcd login`, starts a session. A session ends 30 days after you sign in, or after 7 days without use, whichever comes first, and you then sign in again. An open console tab counts as use. The limits are checked when the session renews, which happens about once an hour, so a session can last up to an hour past them.

You can see your sessions in the console under **Settings → Account → Active sessions**, sign out a single device, or sign out of all devices at once. API keys are not sessions, so these limits don't apply to them.