Skip to content

[Security] Keep replication-slot status diagnostics confidential #261

Description

@seonghobae

Defect

Protected develop exposes ReplicationSlotProbe.safeMessage(...) through GET /api/cdc/status. Despite the method comment saying connection strings should not leak, it currently only truncates the most-specific exception message to 200 characters. A JDBC/driver exception containing a URL, username, credential fragment, host, filesystem path, or other operational detail therefore remains client-visible.

RCA

  • Immediate cause: safeMessage equates truncation with sanitization.
  • Root cause: fail-open operator diagnostics were designed without an explicit trust-boundary contract for the status API.
  • Impact: connection/credential-shaped diagnostics can cross the public HTTP status boundary during database failures.

Bounded acceptance

Use strict test-first repair from the exact current protected develop head. Inject a DataAccessException whose most-specific message includes unmistakable connection/credential-shaped data and prove probeSlot keeps available=false and error=query_failed without returning the raw diagnostic. GREEN should expose only a stable, non-sensitive failure message/category while retaining useful structured status. Do not log the injected secret-shaped value. Run focused/full hosted validation and keep inherited scanner/coverage/literal-source governance blockers separate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions