DEV Community

andreagomez
andreagomez

Posted on

OnlyOffice DocumentServer: JWT is a configuration contract, not a checkbox

OnlyOffice DocumentServer: JWT is a configuration contract, not a checkbox

OnlyOffice DocumentServer is a document editing and collaboration service that is often integrated with Nextcloud, ownCloud, and custom storage applications. Its API documentation says JWT is enabled by default in current versions and that the secret key is generated automatically. The same documentation says the connector and the DocumentServer must use the same secret to validate tokens. [1]

That is a useful security default, but it creates an operational contract. A mismatch disables functionality. A blank secret in an integration can disable authorization. A public DocumentServer with a weak or shared secret can expose document editing and conversion paths. The configuration must be checked as part of the deployment, not just once at installation.

What the measurement returned

On 2026-11-25 at 23:42 UTC, ZoomEye returned zero for app="OnlyOffice DocumentServer" and zero for title="OnlyOffice DocumentServer" using sub_type=all, page 1, and page size 1. [2] The result is an index observation, not proof that no document server is reachable. Many deployments use a generic editor title, a customer domain, or an integration path that does not expose the exact product phrase.

Validate the shared secret

Record the secret version, storage location, rotation date, and which connectors use it. Never place the secret in a client-side JavaScript bundle. The browser receives a signed configuration token, not the shared secret. The connector signs the configuration on the server and sends it to the DocumentServer. The DocumentServer validates that token before opening the document. [1]

If the secret changes, update all connectors in a controlled window. Test editing, conversion, and download paths with both old and new tokens during the transition. Do not disable JWT to solve a connector error. A temporary "blank secret" can become a permanent exposure.

Separate the document path from the management path

Public access to the editor does not imply public access to the admin panel, conversion service, or internal health endpoints. Restrict management routes to an operator network. If the DocumentServer must be reachable by users, place it behind a reverse proxy with TLS, request-size limits, and an explicit hostname. If it can fetch a document URL, apply an outbound-fetch policy so that a malicious storage integration cannot reach internal services.

Document keys, URLs, and callback endpoints should be signed together. A token that authorizes one document must not be reusable for another. Check that callback URLs are generated by the storage service and cannot be replaced by user-supplied input.

Review integration authorization

The DocumentServer often sits between an identity provider, a storage application, and the browser. Map who can open a document and who can edit or download it. Test a user from one tenant trying to open a document from another. Test an expired session and a document key that was reused after deletion.

Review the storage connector's logs for token validation failures, repeated document keys, and unusual download paths. Keep the JWT secret out of the logs and support bundles. If a token appears in a URL or a browser console message, treat it as exposed and investigate the connector configuration.

Make rotation reversible

Before changing the secret, export the current connector configuration in a protected, versioned form. Test the new value in staging with the same DocumentServer and storage versions. Keep a rollback path that does not require disabling JWT. After the change, verify a new document opens, an existing document opens, and an expired token is rejected.

OnlyOffice provides a strong default when the secret is configured correctly. The security outcome depends on the integration contract. Verify the shared secret, the token scope, the document callback path, and the network boundary together.

References

[1] ONLYOFFICE, "ownCloud integration." https://api.onlyoffice.com/docs/docs-api/get-started/ready-to-use-connectors/owncloud-integration

[2] ZoomEye title query. https://www.zoomeye.ai/searchResult?q=dGl0bGU9Ik9ubHlPZmZpY2UgRG9jdW1lbnRTZXJ2ZXIi

Top comments (0)