Skip to content

feat(security): opt-in flag for local-network-access delegation to editor iframes - #53

Open
jannefleischer wants to merge 1 commit into
Euro-Office:mainfrom
jannefleischer:feat/local-network-access-opt-in
Open

jannefleischer wants to merge 1 commit into
Euro-Office:mainfrom
jannefleischer:feat/local-network-access-opt-in

Conversation

@jannefleischer

@jannefleischer jannefleischer commented Oct 4, 2026 •

Copy link
Copy Markdown

Context

Companion to Euro-Office/web-apps#276, Euro-Office/sdkjs#95, Euro-Office/DocumentServer#399 and Euro-Office/documentation#21. While testing an AI plugin whose provider requests run as a browser fetch() from the editor to a private-network host (an internal Ollama instance), the request was silently blocked by the browser's Local Network Access checks, because the local-network-access/loopback-network Permissions Policy feature was not delegated through the editor/plugin iframe chain.

As discussed in Euro-Office/web-apps#276, delegating this unconditionally is an unwanted security risk in many business setups. It has to be an explicit opt-in by the operator.

Change

  • New config key security.allowLocalNetworkAccessIframes (default false) in Common/config/default.json.
  • DocsCoServer.js reads it via ctx.getCfg (so it is tenant-overridable like other settings) and sends it as allowLocalNetworkAccess in the license message, next to aiPluginSettings.

sdkjs (#95) and web-apps (#276) only add the allow tokens to the plugin iframes when this flag is true. Default behaviour is unchanged.

Enabling

NODE_CONFIG='{"security":{"allowLocalNetworkAccessIframes":true}}'

With the Docker image: -e ALLOW_LOCAL_NETWORK_ACCESS_IFRAMES=true (Euro-Office/DocumentServer#399, standalone and orchestrated entrypoints). Documented in Euro-Office/documentation#21.

Caveats

This is the single switch for the operator. The outer editor iframe (created by the integrator page via api.js before the editor talks to the server) always delegates the feature; that alone grants nothing, because the browser requires delegation through every frame in the chain and the plugin iframes only delegate when this flag is set. So connectors (Nextcloud, Seafile, …) need no changes. See web-apps#276 for details.

Effective in Chromium-based browsers and Firefox ≥ 153, which gate local network access on the same local-network/loopback-network Permissions Policy features; Safari/WebKit is still implementing it (see web-apps#276).

Draft until the maintainers agree on the approach in web-apps#276.

AI-assisted; disclosed per the AI Contribution Policy.

jannefleischer added a commit to jannefleischer/DocumentServer that referenced this pull request Oct 4, 2026
Maps to security.allowLocalNetworkAccessIframes (Euro-Office/server#53)
in the standalone and orchestrated entrypoints. Default false.

AI-assisted; disclosed per the AI Contribution Policy.
@jannefleischer
jannefleischer marked this pull request as ready for review October 4, 2026 07:45
@jannefleischer
jannefleischer force-pushed the feat/local-network-access-opt-in branch from cccfe61 to 494736b Compare October 4, 2026 07:52
jannefleischer added a commit to jannefleischer/DocumentServer that referenced this pull request Oct 4, 2026
Maps to security.allowLocalNetworkAccessIframes (Euro-Office/server#53)
in the standalone and orchestrated entrypoints. Default false.

AI-assisted; disclosed per the AI Contribution Policy.

Signed-off-by: jannefleischer <janne.fleischer@ils-forschung.de>
…r iframes

Adds security.allowLocalNetworkAccessIframes (default false) and sends it
to the editor alongside aiPluginSettings in the license message, so
web-apps and sdkjs only delegate local-network-access/loopback-network
to plugin iframes when the operator explicitly opts in.

AI-assisted; disclosed per the AI Contribution Policy.

Signed-off-by: jannefleischer <janne.fleischer@ils-forschung.de>
@jannefleischer
jannefleischer force-pushed the feat/local-network-access-opt-in branch from 494736b to 375aa47 Compare October 7, 2026 13:46
jannefleischer added a commit to jannefleischer/DocumentServer that referenced this pull request Oct 7, 2026
Maps to security.allowLocalNetworkAccessIframes (Euro-Office/server#53)
in the standalone and orchestrated entrypoints. Default false.

AI-assisted; disclosed per the AI Contribution Policy.

Signed-off-by: jannefleischer <janne.fleischer@ils-forschung.de>
@jannefleischer
jannefleischer changed the base branch from master to main October 7, 2026 13:46
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.

1 participant