Skip to content

Commit f503835

Browse files
authored
Document hardware token signing, login config corrections (#120)
1 parent a553b63 commit f503835

10 files changed

Lines changed: 90 additions & 16 deletions

File tree

docs/Configuration/File Sharing and Storage.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ Your folders are private to you. Folders themselves are not shared; you share in
264264

265265
## Sharing Files
266266

267+
You can share a file from the **My Files** page, or from the **Share** button in the top bar of the editor workbench while a file is open.
268+
267269
### Share with a Specific User
268270

269271
From the file manager, select a file and share it with another user by their username or email address. You can choose the access role when sharing.

docs/Configuration/OAuth SSO Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Once you've verified OAuth works and promoted an OAuth user to admin, you can di
361361
| Property | Description | Default | Example |
362362
|----------|-------------|---------|---------|
363363
| `security.oauth2.issuer` | OIDC issuer URL (required for generic providers, must support `/.well-known/openid-configuration`) | - | `https://keycloak.example.com/realms/myrealm` |
364-
| `security.oauth2.autoCreateUser` | Auto-create users on first login | `false` | `true` |
364+
| `security.oauth2.autoCreateUser` | Auto-create users on first login | `true` | `false` |
365365
| `security.oauth2.blockRegistration` | Block new user registration, only allow pre-registered users | `false` | `true` |
366366
| `security.oauth2.scopes` | Space or comma-separated list of OAuth scopes | Provider-specific | `openid, profile, email` |
367367
| `security.oauth2.useAsUsername` | Claim to use as username (options depend on provider) | Provider-specific | `email`, `preferred_username`, `login` |

docs/Configuration/Other Customisations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ This means you can replace any static resource by placing a file with the matchi
1919

2020
### Finding File Paths to Override
2121

22-
Most static files in the application come from the `frontend/editor/public/` folder in the source code. To override a file, place it under `customFiles/static/` matching the same path it is served at. The mapping is direct:
22+
Most static files in the application come from the `frontend/editor/public/` folder in the source code (brand logos live in `frontend/shared/assets/brand/`). To override a file, place it under `customFiles/static/` matching the same path it is served at. The mapping is direct:
2323

2424
**Frontend source → Your override path:**
2525
- `frontend/editor/public/manifest.json``customFiles/static/manifest.json`
26-
- `frontend/editor/public/modern-logo/StirlingPDFLogoBlackText.svg``customFiles/static/modern-logo/StirlingPDFLogoBlackText.svg`
27-
- `frontend/editor/public/classic-logo/StirlingPDFLogoBlackText.svg``customFiles/static/classic-logo/StirlingPDFLogoBlackText.svg`
26+
- `frontend/shared/assets/brand/modern-logo/StirlingPDFLogoBlackText.svg``customFiles/static/modern-logo/StirlingPDFLogoBlackText.svg`
27+
- `frontend/shared/assets/brand/classic-logo/StirlingPDFLogoBlackText.svg``customFiles/static/classic-logo/StirlingPDFLogoBlackText.svg`
2828

2929
**To see what files you can override:**
3030
1. Browse the [frontend/editor/public folder on GitHub](https://github.com/Stirling-Tools/Stirling-PDF/tree/main/frontend/editor/public)

docs/Configuration/Process-Limits.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Controls how many concurrent instances of each process are allowed. Extra reques
3636
| `sessionLimit.ocrMyPdfSessionLimit` | `2` | Add OCR overlay to existing PDFs |
3737
| `sessionLimit.weasyPrintSessionLimit` | `16` | HTML/CSS → PDF (WeasyPrint) |
3838
| `sessionLimit.calibreSessionLimit` | `1` | E-book conversions |
39-
| `sessionLimit.ffmpegSessionLimit` | `2` | Video/audio processing |
4039
| `sessionLimit.installAppSessionLimit` | `1` | Internal install tasks |
4140

4241
**Increase** limits on a beefy server with concurrent users. **Decrease** them on low-RAM servers - LibreOffice in particular is memory-hungry.
@@ -64,7 +63,6 @@ How long (in minutes) a process can run before it's forcibly killed and an error
6463
| `timeoutMinutes.ocrMyPdfTimeoutMinutes` | `30` |
6564
| `timeoutMinutes.weasyPrintTimeoutMinutes` | `30` |
6665
| `timeoutMinutes.calibreTimeoutMinutes` | `30` |
67-
| `timeoutMinutes.ffmpegTimeoutMinutes` | `30` |
6866
| `timeoutMinutes.pdfToHtmlTimeoutMinutes` | `20` |
6967
| `timeoutMinutes.installAppTimeoutMinutes` | `60` |
7068

docs/Configuration/SAML SSO Configuration/SAML SSO Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Restart Stirling PDF.
262262

263263
| Property | Default | Description |
264264
|----------|---------|-------------|
265-
| `security.saml2.autoCreateUser` | `false` | Auto-create users on first SAML login |
265+
| `security.saml2.autoCreateUser` | `true` | Auto-create users on first SAML login |
266266
| `security.saml2.blockRegistration` | `false` | Block new users (only allow pre-registered) |
267267
| `security.saml2.registrationId` | `stirling` | Registration ID (must match ACS URL path) |
268268
| `security.saml2.provider` | `null` | Optional provider name for logging |

docs/Configuration/System and Security.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,33 @@ java -jar Stirling-PDF.jar
133133

134134
---
135135

136+
## Login Agreement / Disclaimer
137+
138+
Show a disclaimer that users must accept before they can use the app. It appears as a blocking dialog after a successful login (or on launch when login is disabled), and works on every edition.
139+
140+
```yaml
141+
legal:
142+
loginAgreement:
143+
enabled: false # Master on/off switch
144+
showInAnonymousMode: true # When login is disabled, set false to hide the dialog
145+
fallbackText: "" # Markdown shown when no per-language file is found
146+
```
147+
148+
**Environment Variables:**
149+
```bash
150+
LEGAL_LOGINAGREEMENT_ENABLED=true
151+
LEGAL_LOGINAGREEMENT_SHOWINANONYMOUSMODE=true
152+
LEGAL_LOGINAGREEMENT_FALLBACKTEXT="By signing in you agree to the terms..."
153+
```
154+
155+
The disclaimer is written in **Markdown**. Provide per-language versions as files at `customFiles/disclaimer/<locale>.md` (for example `en-US.md` or `de-DE.md`); the text shown follows each user's interface language and falls back to `fallbackText` when no matching file exists. If no text resolves at all (no files and no `fallbackText`), the dialog is not shown even when `enabled` is `true`. For a single-language or headless install, set `fallbackText` (env `LEGAL_LOGINAGREEMENT_FALLBACKTEXT`) and skip the per-language files. Editing the text takes effect on the next login with no restart; turning `enabled` on or off requires a restart.
156+
157+
Admins can also edit the text in-app from **Admin Settings → Legal**, which writes the same per-language files.
158+
159+
In the desktop app, the dialog can be enabled per machine through MDM - see [Managed Desktop Deployment](../Installation/Managed%20Deployment.md).
160+
161+
---
162+
136163
## Server Certificates
137164

138165
Stirling PDF can auto-generate certificates for the "Sign with Stirling PDF" feature.

docs/Configuration/UI Customisation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Stirling PDF allows straightforward customization of the application name and ap
1111

1212
## Application Name Settings
1313
These settings control the visible application name:
14-
- `appName` - Defines the visible application name shown in the window name and navbar if navbar is not defined separately
15-
- `homeDescription` - The description displayed on the homepage under the navbar that first greets the user
16-
- `appNameNavbar` - The app name shown within the navbar for all pages
14+
- `appName` - The visible application name for your instance
15+
- `homeDescription` - The description displayed on the homepage that first greets the user
16+
- `appNameNavbar` - Used as the browser tab title and as the issuer name shown in authenticator apps for two-factor (TOTP) login. Despite its name it is not shown in the navigation bar (which displays the logo), so do not leave it blank if you use TOTP. Empty falls back to "Stirling PDF".
1717

1818
## Show update notifications
1919
These settings (in Settings.yml) control system behavior and customization capabilities:
@@ -153,7 +153,7 @@ This approach requires maintaining your fork and manually merging updates.
153153
ui:
154154
appName: exampleAppName # Application's visible name
155155
homeDescription: I am a description # Short description or tagline shown on homepage
156-
appNameNavbar: navbarName # Name displayed on the navigation bar
156+
appNameNavbar: navbarName # Browser tab title and TOTP issuer label (not the navbar)
157157

158158
system:
159159
showUpdate: false # Control update notification visibility

docs/Functionality/Read-and-Annotate.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ For adding signatures (typed, drawn, or uploaded), use the dedicated [Sign PDFs]
4646
- Comments sidebar listing all comments grouped by page; within each page, comments appear in visual reading order (top-to-bottom, left-to-right)
4747
- Click to navigate to the source annotation
4848

49+
### Side Panels
50+
- Dedicated side panels for **comments**, **annotations**, and **attachments**, each with quick controls for adding items
51+
- A **clear all** button removes every comment or annotation in one action
52+
4953
---
5054

5155
## Viewer Features

docs/Functionality/Security/Certificate-Signing.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Digitally sign PDFs with X.509 certificates and validate existing signatures aga
2121

2222
1. Go to **Certificate Sign** tool
2323
2. Upload PDF
24-
3. In the **Sign Mode** step, choose **Auto (server)** (shown only when the server certificate feature is enabled)
24+
3. In the **Certificate source** step, choose **Server** (shown only when the server certificate feature is enabled)
2525
4. Configure signature appearance (optional)
2626
5. Sign and download
2727

@@ -52,7 +52,7 @@ Digitally sign PDFs with X.509 certificates and validate existing signatures aga
5252

5353
1. Go to **Certificate Sign** tool
5454
2. Upload PDF
55-
3. In the **Sign Mode** step, choose **Manual**, then pick your certificate format
55+
3. In the **Certificate source** step, choose **Upload**, then pick your certificate format
5656
4. Upload your certificate file(s) and enter the password (if any)
5757
5. Configure signature appearance
5858
6. Sign and download
@@ -77,7 +77,29 @@ Digitally sign PDFs with X.509 certificates and validate existing signatures aga
7777
organizationName: Acme Corp
7878
```
7979

80-
Once configured, users can choose **Auto (server)** in the **Sign Mode** step to sign with the shared certificate.
80+
Once configured, users can choose **Server** in the **Certificate source** step to sign with the shared certificate.
81+
</TabItem>
82+
<TabItem value="device" label="This Device (Desktop)">
83+
Sign with a certificate held on your own machine - a USB token or smart card (PKCS#11), or the Windows certificate store. The private key never leaves the device: Stirling PDF asks the token or operating system to perform the signing. This option appears only in the **desktop app** and works on every edition.
84+
85+
1. Go to **Certificate Sign** tool
86+
2. Upload PDF
87+
3. In the **Certificate source** step, choose **This device**
88+
4. Pick the hardware type:
89+
- **Windows certificate store** (Windows only) - available certificates are listed automatically; pick one. Windows prompts for the card or token PIN when you sign.
90+
- **USB token** (PKCS#11, Windows/macOS/Linux) - choose the PKCS#11 driver (common drivers such as OpenSC, YubiKey, SafeNet eToken, and Thales IDPrime are detected automatically, or enter a custom driver path), enter the token PIN, then **List certificates** and pick one.
91+
5. Configure signature appearance
92+
6. Sign and download
93+
94+
For security, you can only sign with a PKCS#11 driver that Stirling PDF auto-detects or one you explicitly allow. Add extra driver libraries with the `STIRLING_PKCS11_LIBRARIES` environment variable - absolute paths to the driver files, separated by your platform's path separator:
95+
96+
```bash
97+
STIRLING_PKCS11_LIBRARIES=/usr/lib/opensc-pkcs11.so
98+
```
99+
100+
:::note macOS and Linux
101+
The macOS Keychain is not a direct signing source. On macOS and Linux, reach a smart card or token through a PKCS#11 driver such as OpenSC.
102+
:::
81103
</TabItem>
82104
</Tabs>
83105

@@ -243,7 +265,7 @@ curl -X POST http://stirling-pdf:8080/api/v1/security/timestamp-pdf \
243265
</Tabs>
244266

245267
:::note
246-
The `system.serverCertificate.*` keys are honoured only on Pro/Enterprise editions. On the free self-hosted edition, setting `enabled: true` has no effect and the **Auto (server)** sign mode stays hidden; use a custom certificate (Manual mode) instead. All `security.validation.*` and `security.timestamp.*` settings apply to every edition.
268+
The `system.serverCertificate.*` keys are honoured only on Pro/Enterprise editions. On the free self-hosted edition, setting `enabled: true` has no effect and the **Server** certificate source stays hidden; use a custom certificate (**Upload**), or **This device** in the desktop app, instead. All `security.validation.*` and `security.timestamp.*` settings apply to every edition.
247269
:::
248270

249271
---
@@ -253,7 +275,7 @@ The `system.serverCertificate.*` keys are honoured only on Pro/Enterprise editio
253275
<Tabs>
254276
<TabItem value="sign-server" label="Sign (Server Cert)">
255277
```bash
256-
# certType must be one of PEM, PKCS12, PFX, JKS, SERVER (uppercase)
278+
# certType must be one of PEM, PKCS12, PFX, JKS, SERVER, WINDOWS_STORE, PKCS11 (uppercase)
257279
# certType=SERVER requires the Pro/Enterprise server certificate feature to be enabled
258280
curl -X POST http://stirling-pdf:8080/api/v1/security/cert-sign \
259281
-F "fileInput=@document.pdf" \
@@ -276,6 +298,19 @@ The `system.serverCertificate.*` keys are honoured only on Pro/Enterprise editio
276298
-o signed.pdf
277299
```
278300
</TabItem>
301+
<TabItem value="sign-device" label="Sign (Device)">
302+
```bash
303+
# Desktop app only; the request must come from the local machine.
304+
# WINDOWS_STORE selects a cert by alias; PKCS11 uses pkcs11LibraryPath (+ optional pkcs11Slot),
305+
# with password as the token PIN.
306+
curl -X POST http://localhost:8080/api/v1/security/cert-sign \
307+
-F "fileInput=@document.pdf" \
308+
-F "certType=PKCS11" \
309+
-F "pkcs11LibraryPath=/usr/lib/opensc-pkcs11.so" \
310+
-F "password=token-pin" \
311+
-o signed.pdf
312+
```
313+
</TabItem>
279314
<TabItem value="validate" label="Validate">
280315
```bash
281316
curl -X POST http://stirling-pdf:8080/api/v1/security/validate-signature \

docs/Installation/Managed Deployment.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,17 @@ You can write this file yourself (it is only a few lines), or on Windows let the
4646
|-------|------|--------------|
4747
| `serverUrl` | string | The server the app connects to on launch (your self-hosted instance, or a Stirling Cloud URL). Include the protocol (`http://` or `https://`); a trailing slash is optional. |
4848
| `lockConnectionMode` | boolean | `true` stops users changing the server or connection mode in Settings. Only takes effect when `serverUrl` is also set. |
49+
| `loginAgreementEnabled` | boolean | `true` enables the login agreement/disclaimer dialog. It only turns the feature on - the text is supplied separately (see note below), and with no text nothing is shown. Can be set on its own (no `serverUrl` needed), so it also applies to local, no-login desktop installs. |
4950
| `updateMode` | string | How the built-in updater behaves: `prompt` (default - ask the user), `auto` (download and install silently on startup), or `disabled` (never check or show update UI). |
5051

5152
A file with none of these fields is ignored.
5253

54+
:::note The login agreement flag only enables it
55+
`loginAgreementEnabled` / `STIRLING_LOGIN_AGREEMENT` switches the feature on; it does not carry the disclaimer text. The dialog stays hidden until text is available - from the server the desktop connects to, or for a local bundled backend from a `customFiles/disclaimer/<locale>.md` file or the `LEGAL_LOGINAGREEMENT_FALLBACKTEXT` setting. With no text configured, nothing is shown. See [Login Agreement](../Configuration/System%20and%20Security.md).
56+
57+
Passing the disclaimer text directly as an install parameter is planned for a future update.
58+
:::
59+
5360
---
5461

5562
## File locations
@@ -72,6 +79,7 @@ On Windows you do not have to write the JSON by hand. The MSI installer (and `wi
7279
|-----------|-------------|---------|
7380
| `STIRLING_SERVER_URL` | Server URL the app connects to | `http://192.168.1.53:8080` |
7481
| `STIRLING_LOCK_CONNECTION` | Lock the connection so users cannot change it (`1` = locked) | `1` |
82+
| `STIRLING_LOGIN_AGREEMENT` | Enable the login agreement/disclaimer dialog (`1` = enabled). The text is supplied separately; the flag alone shows nothing. | `1` |
7583
| `STIRLING_UPDATE_MODE` | Set and lock the update mode (`prompt`, `auto`, or `disabled`) | `disabled` |
7684
| `INSTALLDIR` | Custom install directory (MSI only) | `C:\CustomPath\Stirling-PDF` |
7785
| `ALLUSERS` | Install for all users (requires admin; `1`) | `1` |

0 commit comments

Comments
 (0)