Skip to content

[Security/Privacy] Remove raw CDC engine diagnostics from service logs #190

Description

@seonghobae

Buyer / acquisition risk

Protected develop@622e5e6c3d534f230c390f10e3832efadfc01825 still contains two ordinary CDC-service logging paths that serialize runtime-controlled diagnostics rather than finite failure classifications:

// CdcService.shutdown()
log.warn("Error while stopping CDC engine during shutdown", e);

// CdcService.maybeMapCanonical(...)
log.debug("Canonical map failed for topic={}: {}", topic, e.toString());

The first records an IOException plus nested cause/stack state from Debezium shutdown. Connector/offset/file/network failures can include filesystem locations, brokers, database coordinates, provider diagnostics or credential-adjacent values. The second writes the raw Kafka/Debezium topic plus RuntimeException.toString(); topic names may encode tenant/schema/table or customer context, while mapper exceptions can echo parser/event diagnostics. Neither is required to preserve CDC correctness.

Status: known_gap on protected develop; source mutation is currently defer_until_trigger because active PR #139 owns CdcService.java and issue #141 owns the stop lifecycle contract. This issue must not race that branch or broaden #139 while it remains independently reviewable.

RCA

Distinct remedies / feasibility

  1. Preferred after the CdcService writer lane is clear: replace raw exception/topic transport with stable finite classifications, retaining the existing counters and exception propagation/lifecycle behavior where needed. For example, shutdown can log only a bounded cdc_engine_stop_failed classification; canonical-map failures can increment the existing failure counter and log only a finite canonical_map_failed event.
  2. Alternative: if operators need deeper diagnostics, emit them only through a separately designed privileged diagnostic facility with purpose-bound authorization, bounded retention, access auditing and explicit field allowlisting. Do not make ordinary application logs that facility.
  3. Reject: regex-only masking of exception messages/topics. Unknown provider/parser formats make masking incomplete and can destroy diagnostic truth while still leaking values.
  4. Reject: suppressing the failures entirely. Operators still need finite failure evidence and existing counters/lifecycle outcomes must remain observable.

No new secret, credential, dependency, cross-repository change, or PII masking is needed.

TDD acceptance

When the active CdcService.java writer lane is clear, add fail-first captured-log tests that reach the actual production methods and inject realistic sensitive diagnostics, including a credential-bearing JDBC/offset-store path and a tenant-like topic. Final acceptance must prove:

Sequencing

Do not modify CdcService.java while #139 or another live writer owns it. Once the file/branch lane is stable or #139 integrates, re-read protected source and active PR diffs before deciding whether to implement here, fold into a necessary CdcService successor, or close as already superseded by an equivalent exact-source repair. Waiting on this lane never blocks other path-disjoint mightyETL work.

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

    area: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dependenciesDependency or lockfile maintenancearea: securitySecurity boundary, hardening, or vulnerability preventionbugSomething isn't workingpriority: mediumNormal-priority or P2 workstatus: blockedBlocked by conflict, dependency, or required prerequisitetype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions