Skip to content

Commit b6ba203

Browse files
committed
Correct docs for current access rules
1 parent 84b44c6 commit b6ba203

12 files changed

Lines changed: 89 additions & 19 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ No pairing. No cloud dependency.
7777
- **User-managed access**
7878
Built-in local users with super-admin, admin, and user roles plus per-user API keys.
7979

80+
- **Workspace access controls**
81+
Public, password-protected, and explicit-user workspaces. Admins and super-admins can manage restricted workspaces, but user passwords never override workspace passwords.
82+
8083
---
8184

8285
## How it compares

SECURITY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ DassieDrop is designed for trusted local networks.
77
- If you need remote access, put it behind a reverse proxy with TLS and require user login.
88
- New installs create a local super-admin user named `admin` with password `password`; change it after first login.
99
- Authenticator app codes can be enabled per user for an extra login factor.
10+
- API automation uses per-user `X-API-Key` values. Browser login passwords are not API keys.
11+
- Workspace passwords are separate from user passwords. Admin and super-admin passwords do not unlock password-protected workspaces.
1012
- Files and messages expire after 24 hours by default unless the workspace policy says otherwise.
1113
- Passwords and API keys are stored as salted hashes, not plaintext.

dassiedrop/openapi.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,19 @@ paths:
126126
delete:
127127
tags: [Workspaces]
128128
summary: Delete a workspace
129-
description: Only workspace managers can delete workspaces. The default workspace can only be deleted by a super-admin user.
129+
description: |
130+
Only workspace managers can delete restricted workspaces. Workspace owners,
131+
admins, and super-admin users do not need to provide the workspace password
132+
when deleting a password-protected or explicit-access workspace. The default
133+
workspace can only be deleted by a super-admin user.
130134
security:
131135
- sessionCookie: []
132136
- apiKeyAuth: []
133137
parameters:
134138
- $ref: '#/components/parameters/WorkspaceIdPath'
135139
requestBody:
136140
required: false
141+
description: Optional legacy password payload. Authorized workspace managers do not need this.
137142
content:
138143
application/json:
139144
schema:

docs/api-usage.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ curl -X POST \
106106
## Notes
107107

108108
- The API is intended for local-network use.
109+
- `X-API-Key` must be a user's configured API key. A browser login password is not an API key.
110+
- Browser session cookies can also authenticate API requests, but cookie-backed `POST` and `DELETE` requests must include the page's `X-CSRF-Token`; `X-API-Key` requests do not need CSRF.
109111
- Use `X-Workspace` or `workspace` when targeting a non-default workspace.
112+
- Password-protected workspaces require `X-Workspace-Password` when selected by API header or query parameter. Admin and super-admin user passwords do not override workspace passwords.
110113
- Workspace names and usernames must be unique after normalisation.
111114
- Workspace access modes are `public`, `password`, and `explicit`.
112-
- For explicit-access workspaces, API clients can authenticate with a user's `X-API-Key`; the key's user must be the workspace owner or included in the workspace `explicit_usernames`.
115+
- For explicit-access workspaces, API clients can authenticate with a user's `X-API-Key`; the key's user must be the workspace owner or included in the workspace `explicit_usernames`. Admins and super-admins can manage access, but they must add themselves before entering an explicit workspace.
113116
- If you expose DassieDrop externally, put it behind proper TLS and access controls.

docs/bash-api.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Protected workspaces can also use:
2828

2929
- `X-Workspace-Password: <workspace-password>`
3030

31+
User login passwords do not work as workspace passwords. Admin and super-admin users can manage restricted workspaces, but entering a password-protected workspace still requires the workspace password. For explicit-access workspaces, admins and super-admins can add themselves through access management before entering.
32+
3133
List workspaces:
3234

3335
```bash
@@ -233,24 +235,30 @@ curl -sS \
233235
http://127.0.0.1:8000/api/share-text
234236
```
235237

236-
If you still want browser-style session auth from bash, you can log in first and reuse the session cookie:
238+
If you still want browser-style session auth from bash, you can log in first, fetch a page to read the CSRF token, and reuse both the session cookie and `X-CSRF-Token`:
237239

238240
```bash
239241
curl -sS -c cookies.txt \
240242
-H 'Content-Type: application/json' \
241243
-X POST \
242244
-d '{"username":"admin","password":"password"}' \
243245
http://127.0.0.1:8000/login
246+
247+
CSRF_TOKEN="$(
248+
curl -sS -b cookies.txt http://127.0.0.1:8000/ \
249+
| sed -n 's/.*name="dassiedrop-csrf-token" content="\([^"]*\)".*/\1/p'
250+
)"
244251
```
245252

246-
Then pass `-b cookies.txt` on later requests:
253+
Then pass both values on later cookie-authenticated mutation requests:
247254

248255
```bash
249256
curl -sS -b cookies.txt \
250257
-H 'Content-Type: application/json' \
258+
-H "X-CSRF-Token: $CSRF_TOKEN" \
251259
-X POST \
252260
-d '{"text":"hello again"}' \
253261
http://127.0.0.1:8000/api/share-text
254262
```
255263

256-
`X-API-Key` is for authenticated API routes. LAN links under `/s/{SHORT-CODE}` do not use `X-API-Key`; use `X-Access-Password` there only when a password is required.
264+
For automation, prefer `X-API-Key`; it does not need CSRF. User passwords are only for browser login, not API authentication. LAN links under `/s/{SHORT-CODE}` do not use `X-API-Key`; use `X-Access-Password` there only when a password is required.

docs/developer-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Rules:
3636

3737
- Update `VERSION` when preparing a user-visible release change.
3838
- The UI header reads from `VERSION` unless `APP_VERSION` is provided in the environment.
39-
- The Ubuntu install script deploys the `VERSION` file and also supports `APP_VERSION` override in the service environment.
39+
- Static asset URLs use the app version plus an asset-content hash, so browsers pick up changed JavaScript and CSS without requiring a display-version bump for every internal fix.
40+
- The Ubuntu and CentOS Stream install scripts deploy the `VERSION` file and also support `APP_VERSION` override in the service environment.
4041

4142
## Main Branch Release Rule
4243

docs/installation.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ HTTPS_SELF_SIGNED_HOST=192.168.1.24
9292
On a new installation DassieDrop creates a super-admin user named `admin` with password `password`.
9393
Change that password from the Users page after first login.
9494

95-
Super-admin users can manage all local user accounts. Admin users can access any workspace. Regular users can access public workspaces, password-protected workspaces with the password, and explicit-access workspaces they have been granted.
95+
Super-admin users can manage all local user accounts. Admin and super-admin users can manage restricted workspace access and passwords, but they still need the workspace password to enter a password-protected workspace and must grant themselves access before entering an explicit-access workspace. Regular users can access public workspaces, password-protected workspaces with the workspace password, and explicit-access workspaces they have been granted.
9696

9797
Users can enable an optional authenticator app from their own edit-user page. DassieDrop uses standard TOTP codes, so apps such as Google Authenticator, Microsoft Authenticator, 1Password, Bitwarden, and Aegis can scan the displayed QR code or add the displayed secret manually. Super-admin users can disable authenticator protection for any user if someone loses access to their authenticator device.
9898

@@ -374,6 +374,24 @@ curl -fsSL https://raw.githubusercontent.com/vossie/DassieDrop/master/scripts/gi
374374

375375
In `--silent` mode, the installer keeps optional prompts disabled and uses default values.
376376

377+
Uninstall the Ubuntu service from a checked-out repo:
378+
379+
```bash
380+
sudo bash ./scripts/uninstall-ubuntu-service.sh
381+
```
382+
383+
Or uninstall directly from GitHub:
384+
385+
```bash
386+
curl -fsSL https://raw.githubusercontent.com/vossie/DassieDrop/master/scripts/uninstall-ubuntu-service.sh | sudo bash
387+
```
388+
389+
Remove the uploaded data and service user too:
390+
391+
```bash
392+
curl -fsSL https://raw.githubusercontent.com/vossie/DassieDrop/master/scripts/uninstall-ubuntu-service.sh | sudo REMOVE_DATA=1 REMOVE_USER=1 bash
393+
```
394+
377395
Use the Ubuntu service install for a native `systemd` deployment. Use Docker for a portable container runtime.
378396

379397
## Install On CentOS Stream From GitHub
@@ -423,8 +441,20 @@ Uninstall the CentOS Stream service:
423441
sudo bash ./scripts/uninstall-centos-stream-service.sh
424442
```
425443

444+
Or uninstall directly from GitHub:
445+
446+
```bash
447+
curl -fsSL https://raw.githubusercontent.com/vossie/DassieDrop/master/scripts/uninstall-centos-stream-service.sh | sudo bash
448+
```
449+
426450
Remove the uploaded data and service user too:
427451

428452
```bash
429453
sudo REMOVE_DATA=1 REMOVE_USER=1 bash ./scripts/uninstall-centos-stream-service.sh
430454
```
455+
456+
Directly from GitHub:
457+
458+
```bash
459+
curl -fsSL https://raw.githubusercontent.com/vossie/DassieDrop/master/scripts/uninstall-centos-stream-service.sh | sudo REMOVE_DATA=1 REMOVE_USER=1 bash
460+
```

docs/openapi.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,19 @@ paths:
126126
delete:
127127
tags: [Workspaces]
128128
summary: Delete a workspace
129-
description: Only workspace managers can delete workspaces. The default workspace can only be deleted by a super-admin user.
129+
description: |
130+
Only workspace managers can delete restricted workspaces. Workspace owners,
131+
admins, and super-admin users do not need to provide the workspace password
132+
when deleting a password-protected or explicit-access workspace. The default
133+
workspace can only be deleted by a super-admin user.
130134
security:
131135
- sessionCookie: []
132136
- apiKeyAuth: []
133137
parameters:
134138
- $ref: '#/components/parameters/WorkspaceIdPath'
135139
requestBody:
136140
required: false
141+
description: Optional legacy password payload. Authorized workspace managers do not need this.
137142
content:
138143
application/json:
139144
schema:

templates/help.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ <h3>Basic setup</h3>
181181
<pre class="help-code"><code>curl -sS -O "$API_HOST/openapi.yaml"</code></pre>
182182

183183
<p>If the app is protected, send your automation secret as:</p>
184-
<pre class="help-code"><code>-H 'X-API-Key: your-api-key-or-access-code'</code></pre>
184+
<pre class="help-code"><code>-H 'X-API-Key: your-user-api-key'</code></pre>
185+
<p>User passwords are only for browser login. They are not API keys and they do not unlock workspace passwords.</p>
185186

186187
<h3>Share text</h3>
187188
<p>Share a text snippet:</p>
@@ -220,7 +221,7 @@ <h3>Share text</h3>
220221
<p>Share text into a protected workspace:</p>
221222
<pre class="help-code"><code>curl -sS \
222223
-H 'Content-Type: application/json' \
223-
-H 'X-API-Key: your-api-key-or-access-code' \
224+
-H 'X-API-Key: your-user-api-key' \
224225
-H 'X-Workspace: ops-desk' \
225226
-H 'X-Workspace-Password: workspace-secret' \
226227
-X POST \
@@ -257,7 +258,7 @@ <h3>Share files</h3>
257258

258259
<p>Share a file into a protected workspace:</p>
259260
<pre class="help-code"><code>curl -sS \
260-
-H 'X-API-Key: your-api-key-or-access-code' \
261+
-H 'X-API-Key: your-user-api-key' \
261262
-H 'X-Workspace: ops-desk' \
262263
-H 'X-Workspace-Password: workspace-secret' \
263264
-X POST \
@@ -271,14 +272,14 @@ <h3>Using API auth</h3>
271272
<p><strong>Text example with API auth</strong></p>
272273
<pre class="help-code"><code>curl -sS \
273274
-H 'Content-Type: application/json' \
274-
-H 'X-API-Key: your-api-key-or-access-code' \
275+
-H 'X-API-Key: your-user-api-key' \
275276
-X POST \
276277
-d '{"text":"hello again"}' \
277278
"$API_HOST/api/share-text"</code></pre>
278279

279280
<p><strong>File example with API auth</strong></p>
280281
<pre class="help-code"><code>curl -sS \
281-
-H 'X-API-Key: your-api-key-or-access-code' \
282+
-H 'X-API-Key: your-user-api-key' \
282283
-X POST \
283284
-F 'file=@./example.txt' \
284285
"$API_HOST/api/share-file"</code></pre>
@@ -350,9 +351,9 @@ <h3>Deleting a workspace</h3>
350351
<ul>
351352
<li>Open the workspace picker and find the workspace you want to remove.</li>
352353
<li>Click <strong>Delete</strong>.</li>
353-
<li>If the workspace is protected, enter the workspace password to confirm deletion.</li>
354+
<li>Confirm the prompt. Workspace owners, admins, and super-admin users can delete restricted workspaces without entering the workspace password.</li>
354355
</ul>
355-
<p>The default workspace cannot be deleted.</p>
356+
<p>The default workspace can only be deleted by a super-admin user.</p>
356357

357358
<h3 id="sharing-text">Sharing text</h3>
358359
<ol>

templates/user_edit.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h2>Edit User</h2>
5353
<label class="settings-field" for="editUserPassword">
5454
<span class="settings-label-row">
5555
<span>Password</span>
56-
<span class="settings-help" tabindex="0" data-tooltip="Leave blank to keep the current password. Root and admin passwords can unlock protected workspaces.">?</span>
56+
<span class="settings-help" tabindex="0" data-tooltip="Leave blank to keep the current password. User passwords do not unlock workspace passwords.">?</span>
5757
</span>
5858
<div class="password-field-wrap">
5959
<input id="editUserPassword" class="inline-input settings-input" type="password" autocomplete="new-password" placeholder="New password">
@@ -77,7 +77,7 @@ <h2>Edit User</h2>
7777
<label class="settings-field" id="editUserRoleField" for="editUserRole">
7878
<span class="settings-label-row">
7979
<span>Role</span>
80-
<span class="settings-help" tabindex="0" data-tooltip="User can access unprotected or password-known workspaces. Admin can access any workspace. Super-admin can also manage all users.">?</span>
80+
<span class="settings-help" tabindex="0" data-tooltip="User can access public, password-known, and granted explicit workspaces. Admin can manage workspace access. Super-admin can also manage users.">?</span>
8181
</span>
8282
<select id="editUserRole" class="inline-input settings-input">
8383
<option value="user">user - password-protected workspace access</option>

0 commit comments

Comments
 (0)