Repository navigation
Description
The inconsistency
arcadedb.server.mode=production conceals the FREE-FORM error text on every surface (#7472 finished the job for gRPC and the SSE stream). What it does not conceal is the STRUCTURED detail beside it, and for a DuplicatedKeyException that detail is the same information in another field:
- HTTP:
buildErrorBodyomitsdetailbut emitsexceptionArgsin every mode, and for a duplicated key that is
dup.getIndexName() + "|" + dup.getKeys() + "|" + dup.getCurrentIndexedRID()- the index name, the offending KEY VALUES, and the RID. - gRPC: the description is concealed, and
arcadedb-exception-class,arcadedb-dup-indexandarcadedb-dup-keystrailers still carry the class name, the index and the keys.
So an operator who turns production mode on to stop internal detail reaching callers still ships indexed key values - actual stored data - to any authenticated caller who triggers a unique-constraint violation. Raised by CodeRabbit on PR #7755.
Why it was not changed there
The two transports AGREE today, which is what #7472 set out to achieve. Concealing the gRPC trailers alone would make gRPC stricter than HTTP and re-create the divergence in the opposite direction - the same fault, a surface where the setting means something different.
And the current behaviour is deliberate rather than accidental: buildErrorBody's javadoc states that exception and exceptionArgs are "a wire contract consumed by the remote Java driver (RemoteHttpComponent.manageException) and by HA leader-exception reconstruction (RaftReplicatedDatabase.reconstructLeaderException)" and are emitted in every mode because those consumers rely on them. Changing it is a wire-contract change, not a tightening.
The decision this needs
Whether the structured detail is "bounded, non-sensitive" - which is what the javadoc asserts - or whether the duplicated-key KEYS specifically are not, being user data rather than schema metadata. The class name, the index name and the leader address are arguably fine; the key values are the ones that carry a customer's data.
Options worth weighing:
- Conceal only
DUP_KEYS_KEY/ the keys segment ofexceptionArgsin production, keeping the class, the index name and the RID. Narrowest, and it keeps the typed-exception reconstruction working - a driver can still rebuild aDuplicatedKeyExceptionand say which index, just not echo the value. - Conceal every free-form-derived trailer and field, and make the driver's reconstruction degrade to the type alone in production.
- Decide it is fine as documented, and say so explicitly in the production-mode documentation so an operator knows what the setting does and does not cover.
Whichever is chosen must land on BOTH transports in one change, with a test per transport, or the setting stops meaning one thing again.
Related
- Three low-severity items: the control plane's SSE and gRPC errors bypass production-mode concealment, an unscheduled database's on-demand backup is never pruned, and COPY's NULL option is not validated against the delimiter or quote #7472 - where production-mode concealment was extended to gRPC and SSE.
- fix(#7588,#7501,#7500,#7499,#7472): separator audit, NUL sentinel, remote-fetch deadline, supplied-header skip, and three low-severity items #7755 - where this was raised, and where the description-level concealment landed.
Activity
docs(#7472): say what concealment does not cover, and reconcile the o…
fix(#7754,#7760): native orderBy falls back to string order on an uno…
docs(#7760): note that new surfaces must apply the duplicated-key pla…
Merge pull request #8742 from ArcadeData/fix/issues-7754-7760-7937
lvca commentedon Sep 30, 2026
Fixed in #8742 (26.10.1). In
productionserver mode the duplicated-key values are now hidden on both HTTP and gRPC: clients still get the exception type, the index name and the existing record's RID, but the keys read[concealed].developmentandtestmodes are unchanged. The/wsinsert session, Bolt and Redis are not covered yet, tracked in #8749.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(ArcadeData#7754,ArcadeData#7760,ArcadeData#7937): refuse BOOLEAN …
fix(#7754,#7760,#7937): refuse BOOLEAN vs timestamp in both direction…
fix(#7754,#7760): native orderBy falls back to string order on an uno…
docs(#7760): note that new surfaces must apply the duplicated-key pla…