Skip to content

Production mode conceals the error text but ships the same detail in exceptionArgs / gRPC trailers - one decision, both transports #7760

Closed

Description

@lvca

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: buildErrorBody omits detail but emits exceptionArgs in 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-index and arcadedb-dup-keys trailers 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:

  1. Conceal only DUP_KEYS_KEY / the keys segment of exceptionArgs in production, keeping the class, the index name and the RID. Narrowest, and it keeps the typed-exception reconstruction working - a driver can still rebuild a DuplicatedKeyException and say which index, just not echo the value.
  2. Conceal every free-form-derived trailer and field, and make the driver's reconstruction degrade to the type alone in production.
  3. 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

Activity

  1. added this to the 26.10.1 milestone on Sep 17, 2026
  2. self-assigned this
    on Sep 17, 2026
  3. added
    grpc
    server
    on Sep 17, 2026
  4. added a commit that references this issue on Sep 17, 2026
  5. added
    severity:major
    on Sep 19, 2026
  6. added
    in progress
    on Sep 30, 2026
  7. added 3 commits that reference this issue on Sep 30, 2026
  8. lvca commented on Sep 30, 2026

    @lvca
    MemberAuthor

    Fixed in #8742 (26.10.1). In production server 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]. development and test modes are unchanged. The /ws insert 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.

  9. removed
    in progress
    on Sep 30, 2026
  10. added a commit that references this issue on Sep 30, 2026
  11. added 3 commits that reference this issue on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

grpcsecurityserverseverity:major

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions