Skip to content

Disable RestXqTrigger in collection configuration#5998

Merged
duncdrum merged 3 commits intodevelopfrom
dizzzz-patch-2
Jan 22, 2026
Merged

Disable RestXqTrigger in collection configuration#5998
duncdrum merged 3 commits intodevelopfrom
dizzzz-patch-2

Conversation

@dizzzz
Copy link
Copy Markdown
Member

@dizzzz dizzzz commented Jan 5, 2026

Comment out RestXqTrigger configuration in collection.xconf.init

Comment out RestXqTrigger configuration in collection.xconf.init
@dizzzz dizzzz requested a review from a team as a code owner January 5, 2026 19:30
@joewiz
Copy link
Copy Markdown
Member

joewiz commented Jan 5, 2026

LGTM, and documentation-wise, we could perhaps add a sentence to https://exist-db.org/exist/apps/doc/xquery#restxq (source at https://github.com/eXist-db/documentation/blob/master/src/main/xar-resources/data/xquery/xquery.xml#L1069-L1083) to say:

To enable RESTXQ support for a collection and its descendant collections, ensure your collection configuration file (e.g., collection.xconf) has a <trigger> element matching the structure of the following template:

<collection xmlns="http://exist-db.org/collection-config/1.0">
    <triggers>
        <trigger class="org.exist.extensions.exquery.restxq.impl.RestXqTrigger"/>
    </triggers>
</collection>

@duncdrum
Copy link
Copy Markdown
Contributor

duncdrum commented Jan 6, 2026

We need to adjust the restxq test for the containers.

@adamretter
Copy link
Copy Markdown
Contributor

adamretter commented Jan 6, 2026

Guys, just to check that - you realise of course that that will break soooo many people's apps when they upgrade to eXist-db 7?

@line-o
Copy link
Copy Markdown
Member

line-o commented Jan 6, 2026

We are aware that this is a breaking change. There is however a clear and easy to document way to either

  • re-enable it instance-wide by uncommenting the trigger in collection.xconf in /db/system/config/db or
  • adding the trigger to any application package that uses restxq annotations

@adamretter
Copy link
Copy Markdown
Contributor

adamretter commented Jan 6, 2026

We are aware that this is a breaking change.

Okay, good.

Out of interest - what is the perceived advantage(s) of disabling it by default?

@dizzzz
Copy link
Copy Markdown
Member Author

dizzzz commented Jan 6, 2026

I expect apps mostly to have their own collection.xconf anyway, effectively voiding the definition on toplevel.

So I think the impact is little.

@adamretter
Copy link
Copy Markdown
Contributor

@dizzzz That's not what I have often seen in the wild.

Do you know what is the perceived advantage(s) of disabling it by default?

@chakl
Copy link
Copy Markdown

chakl commented Jan 7, 2026

@adamretter perceived advantage(s)

(more) secure by default.

If an apps wants to expose the REST API, it must explicitly state that. No good reason to expose it for all apps on the host.

@adamretter
Copy link
Copy Markdown
Contributor

(more) secure by default.

@chakl Do you mean - Disabling this API helps reduce the external attack service?

If so, I think you can find many bigger fish to fry, e.g.: the RESTServer which exposes the entire database by default to the guest user.

@dizzzz
Copy link
Copy Markdown
Member Author

dizzzz commented Jan 8, 2026

The one does not exclude the other....

@chakl
Copy link
Copy Markdown

chakl commented Jan 9, 2026

@chakl Do you mean - Disabling this API helps reduce the external attack service?

Exactly. Disabling unused APIs reduces attack surface.

If so, I think you can find many bigger fish to fry, e.g.: the RESTServer which exposes the entire database by default to the guest user.

Agree. We (with my existsolutions.com hat on) have gone to the habit of recommending to deploy reverse proxies in front of Internet facing eXist-db systems, in order to address this and other issues. But perfectly reasonable to disable that by default in eXist-db as well.

@dizzzz dizzzz requested review from a team and line-o January 13, 2026 18:17
@dizzzz dizzzz requested a review from duncdrum January 19, 2026 21:18
duncdrum added a commit to duncdrum/distroless-exist that referenced this pull request Jan 22, 2026
@duncdrum duncdrum merged commit 39083e8 into develop Jan 22, 2026
14 of 15 checks passed
@duncdrum duncdrum deleted the dizzzz-patch-2 branch January 22, 2026 11:16
@line-o line-o mentioned this pull request Feb 2, 2026
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.

7 participants