|
From: Dannes W. <no...@gi...> - 2026-07-20 07:22:17
|
Branch: refs/heads/develop Home: https://github.com/eXist-db/exist Commit: bb8464d8e46b66668ff45fe4f21c27925a4a59ce https://github.com/eXist-db/exist/commit/bb8464d8e46b66668ff45fe4f21c27925a4a59ce Author: Juri Leino <gi...@li...> Date: 2026-07-14 (Tue, 14 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/collections/Collection.java M exist-core/src/main/java/org/exist/collections/LockedCollection.java M exist-core/src/main/java/org/exist/collections/MutableCollection.java M exist-core/src/main/java/org/exist/storage/DBBroker.java A exist-core/src/main/java/org/exist/storage/ExecutableResource.java M exist-core/src/main/java/org/exist/storage/NativeBroker.java A exist-core/src/test/java/org/exist/storage/GetResourceForExecutionTest.java Log Message: ----------- [feature] Resolve stored queries for execution on EXECUTE, not READ Adds the resolution boundary only; no execution entry point uses it yet, so behaviour is unchanged. Part of eXist-db/exist#6568 Co-Authored-By: Claude Opus 4.8 (1M context) <no...@an...> Commit: 99bce9069c1d19c318c6451208f0f00699518c2b https://github.com/eXist-db/exist/commit/99bce9069c1d19c318c6451208f0f00699518c2b Author: Juri Leino <gi...@li...> Date: 2026-07-14 (Tue, 14 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/xquery/ErrorCodes.java A exist-core/src/main/java/org/exist/xquery/ErrorDisclosure.java M exist-core/src/main/java/org/exist/xquery/XQuery.java M exist-core/src/main/java/org/exist/xquery/XQueryContext.java A exist-core/src/test/java/org/exist/xquery/ErrorDisclosureTest.java Log Message: ----------- [feature] Hide query failures from callers who cannot read the query A caller with EXECUTE but not READ must learn only that the execution failed. The full error is logged at WARN with a correlation id. The disclosure level is recomputed from the current subject on every execution, as compiled queries are pooled across users. Nothing routes errors through the filter yet. Part of eXist-db/exist#6568 Co-Authored-By: Claude Opus 4.8 (1M context) <no...@an...> Commit: acbdf5eed8833b611a187f35f245324e0c457894 https://github.com/eXist-db/exist/commit/acbdf5eed8833b611a187f35f245324e0c457894 Author: Juri Leino <gi...@li...> Date: 2026-07-14 (Tue, 14 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/xquery/XQuery.java A exist-core/src/test/java/org/exist/security/ExecuteWithoutReadTest.java Log Message: ----------- [feature] Compile stored queries on EXECUTE, not READ XQuery.compile validated READ on a DBSource, which is the barrier that makes execute-without-read impossible: the resolution boundary can hand an execute-only caller a handle, but compiling it was still refused. The source is compiled on the caller's behalf, so EXECUTE is the right gate; reading a query as data still requires READ. Dormant on existing paths: every current loader acquires its DBSource through a READ-gated getter, so nothing reaches compile without READ until Phase 1b. Part of eXist-db/exist#6568 Co-Authored-By: Claude Opus 4.8 (1M context) <no...@an...> Commit: 85d261cae67376058ce3b638953df7202181c4d4 https://github.com/eXist-db/exist/commit/85d261cae67376058ce3b638953df7202181c4d4 Author: Juri Leino <gi...@li...> Date: 2026-07-14 (Tue, 14 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/http/RESTServer.java M exist-core/src/main/java/org/exist/http/servlets/XQueryServlet.java M exist-core/src/main/java/org/exist/source/SourceFactory.java M exist-core/src/main/java/org/exist/xquery/ErrorDisclosure.java A exist-core/src/test/java/org/exist/http/RESTExecuteWithoutReadTest.java Log Message: ----------- [feature] Execute stored queries over REST and XQueryServlet without READ Switch the REST and XQueryServlet execution paths to resolve a stored query on EXECUTE instead of READ, so a caller who may run it but not read it gets to run it. Each sets the error-disclosure level from the source before compiling and routes compile and runtime failures through ErrorDisclosure.disclose, so a read-blind caller learns only that the execution failed. - RESTServer.getResourceForRequest falls back to the EXECUTE boundary only for a stored query and only when READ is denied, leaving regular resources and the ?_source data view on READ. - SourceFactory.getSourceForExecution resolves a DB source on EXECUTE; an XML resource still falls back to the READ path, as serializing it is a data read. - ErrorDisclosure.of(Source, Subject) is the shared helper both entry points use to derive the level identically. RESTExecuteWithoutReadTest drives it over real HTTP: execute-only queries run and return results, their failures come back generic with a correlation id, readable queries still get the real error, the disclosure level is per-request not cached, ?_source stays denied, and a query at default 0666 (no x bit) is refused. Part of eXist-db/exist#6568 Co-Authored-By: Claude Opus 4.8 (1M context) <no...@an...> Commit: f64b8ae2faef821a04c46c63f311a8f9f3620fc7 https://github.com/eXist-db/exist/commit/f64b8ae2faef821a04c46c63f311a8f9f3620fc7 Author: Juri Leino <gi...@li...> Date: 2026-07-18 (Sat, 18 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/storage/NativeBroker.java M exist-core/src/main/java/org/exist/xquery/ErrorDisclosure.java M exist-core/src/main/java/org/exist/xquery/XQuery.java Log Message: ----------- [bugfix] Fail closed when the executing subject is unknown in error-disclosure checks Both callerCanRead computations (XQuery#execute's per-execution recompute, and NativeBroker#getResourceForExecution's initial resolution) and ErrorDisclosure.of() treated an unknown subject as able to read the query, i.e. granted FULL error disclosure by default. Flip the default: an unresolvable subject cannot be proven to hold READ, so it gets GENERIC disclosure like any other read-blind caller. Commit: 79815bc65e4616f62de71f00349f23d26665ef38 https://github.com/eXist-db/exist/commit/79815bc65e4616f62de71f00349f23d26665ef38 Author: Juri Leino <gi...@li...> Date: 2026-07-18 (Sat, 18 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/http/RESTServer.java M exist-core/src/main/java/org/exist/http/servlets/XQueryServlet.java M exist-core/src/main/java/org/exist/source/SourceFactory.java M exist-core/src/main/java/org/exist/xquery/ErrorDisclosure.java M exist-core/src/test/java/org/exist/http/RESTExecuteWithoutReadTest.java M extensions/exquery/restxq/src/main/java/org/exist/extensions/exquery/restxq/impl/XQueryCompiler.java Log Message: ----------- [bugfix] Close the remaining execute-without-read disclosure gaps Three gaps found while hardening the four prior commits: - A query that executes fine but fails while its result is serialized (e.g. returns a non-serializable function item) escaped the disclosure filter, since that failure surfaces outside execute()'s try block. ErrorDisclosure.discloseGeneric() sanitizes any failure type, not just XPathException, and is now wired into RESTServer and XQueryServlet's serialization paths. - X-XQuery-Cached reveals whether another user recently ran the shared compiled query; suppress it for GENERIC (read-blind) callers. - SourceFactory and RESTServer's getResourceForRequest now require both the binary resource type and the xquery mime type before treating a resource as an execute-without-read target, closing a mislabeled- resource gap. Also wires XQueryCompiler (RESTXQ resource-function module resolution), missed by the earlier commits, onto the same getResourceForExecution + disclosure path as everything else. Commit: e2a01a2daf69c3190e59f300db416bcaee9354eb https://github.com/eXist-db/exist/commit/e2a01a2daf69c3190e59f300db416bcaee9354eb Author: Juri Leino <gi...@li...> Date: 2026-07-20 (Mon, 20 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/http/RESTServer.java M exist-core/src/main/java/org/exist/source/SourceFactory.java M exist-core/src/main/java/org/exist/storage/DBBroker.java M exist-core/src/main/java/org/exist/storage/ExecutableResource.java M exist-core/src/main/java/org/exist/storage/NativeBroker.java M exist-core/src/test/java/org/exist/security/ExecuteWithoutReadTest.java M exist-core/src/test/java/org/exist/storage/GetResourceForExecutionTest.java M extensions/exquery/restxq/src/main/java/org/exist/extensions/exquery/restxq/impl/XQueryCompiler.java Log Message: ----------- [refactor] Drop the unused lockMode parameter from getResourceForExecution Every caller passed LockMode.READ_LOCK: a document is only ever resolved for execution, never for writing, so there was no other value to pass. DBBroker#getResourceForExecution now always resolves with a read lock; NativeBroker's implementation no longer needs to call relativeCollectionLockMode either, since with both inputs fixed to READ_LOCK it could only ever answer READ_LOCK. Commit: 55c93cf25855ff5f96ca065f33bc536a3777ce55 https://github.com/eXist-db/exist/commit/55c93cf25855ff5f96ca065f33bc536a3777ce55 Author: Juri Leino <gi...@li...> Date: 2026-07-20 (Mon, 20 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/http/RESTServer.java M exist-core/src/main/java/org/exist/source/SourceFactory.java M exist-core/src/test/java/org/exist/security/ExecuteWithoutReadTest.java Log Message: ----------- [refactor] Naming and readability fixes from review - getSource_fromDb -> getSourceFromDb (SourceFactory): naming convention, no behavior change. - RESTServer: drop the cached local, which duplicated the compiled == null check two lines below its declaration; compute it inline at its one use site instead. - ExecuteWithoutReadTest: drop the underscores from seven test method names (readAndExecute_..., executeOnly_...) to match standard Java camelCase and quiet the naming-convention warnings Codacy flagged on this PR. Commit: 9b300de2c43e8d511601b269ed2394e834a2c475 https://github.com/eXist-db/exist/commit/9b300de2c43e8d511601b269ed2394e834a2c475 Author: Dannes Wessels <di...@us...> Date: 2026-07-20 (Mon, 20 Jul 2026) Changed paths: M exist-core/src/main/java/org/exist/collections/Collection.java M exist-core/src/main/java/org/exist/collections/LockedCollection.java M exist-core/src/main/java/org/exist/collections/MutableCollection.java M exist-core/src/main/java/org/exist/http/RESTServer.java M exist-core/src/main/java/org/exist/http/servlets/XQueryServlet.java M exist-core/src/main/java/org/exist/source/SourceFactory.java M exist-core/src/main/java/org/exist/storage/DBBroker.java A exist-core/src/main/java/org/exist/storage/ExecutableResource.java M exist-core/src/main/java/org/exist/storage/NativeBroker.java M exist-core/src/main/java/org/exist/xquery/ErrorCodes.java A exist-core/src/main/java/org/exist/xquery/ErrorDisclosure.java M exist-core/src/main/java/org/exist/xquery/XQuery.java M exist-core/src/main/java/org/exist/xquery/XQueryContext.java A exist-core/src/test/java/org/exist/http/RESTExecuteWithoutReadTest.java A exist-core/src/test/java/org/exist/security/ExecuteWithoutReadTest.java A exist-core/src/test/java/org/exist/storage/GetResourceForExecutionTest.java A exist-core/src/test/java/org/exist/xquery/ErrorDisclosureTest.java M extensions/exquery/restxq/src/main/java/org/exist/extensions/exquery/restxq/impl/XQueryCompiler.java Log Message: ----------- Merge pull request #6586 from line-o/feature/execute-without-read [feature] Unix-style execute-without-read for stored XQuery Compare: https://github.com/eXist-db/exist/compare/25d49930e54b...9b300de2c43e To unsubscribe from these emails, change your notification settings at https://github.com/eXist-db/exist/settings/notifications |