fix: validate CDC access against configured streams to prevent zero LSN poisoning#77998
fix: validate CDC access against configured streams to prevent zero LSN poisoning#77998Yarden Carmeli (yardencarmeli) wants to merge 8 commits into
Conversation
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
|
/format-fix
|
|
|
/publish-connectors-prerelease
|
|
Deploy preview for airbyte-docs ready!
Deployed with vercel-action |
Detected
|
|
Note Detected that there are differences in the Gradle dependencies. |
Reviewing PR for connector safety and quality.
|
|
I’m reviewing this PR with the AI PR Review gate playbook. Session: https://app.devin.ai/sessions/c97dfdc4c3b944788e768fcd0274b882 |
|
↪️ Triggering Reason: PR is ready for review and has no complete AI review result on the current head. The active rollout warning remains a human approval gate. https://github.com/airbytehq/oncall/issues/11451 |
AI PR Review ReportReview Action: APPROVE
📋 PR DetailsConnector & PR InfoConnector(s): Risk LevelLevel: 3 — Medium (typical connector change) Risk Level is reported for downstream consumers (e.g. auto-merge policy, reviewer routing). It does not change the review action — APPROVE here means "no blocking objection," not "safe to merge unattended." Review Action DetailsAPPROVE - All enforced gates pass. This does NOT authorize auto-merge; the merge decision remains with humans or a separate policy.
🔍 Gate Evaluation DetailsGate-by-Gate Analysis
Spec Comparison:
📚 Evidence ConsultedEvidence
|
AI PR Review ReportReview Action: APPROVE
📋 PR DetailsConnector & PR InfoConnector(s): Risk LevelLevel: 3 — Medium (typical connector change) Risk Level is reported for downstream consumers (e.g. auto-merge policy, reviewer routing). It does not change the review action — APPROVE here means "no blocking objection," not "safe to merge unattended." Review Action DetailsAPPROVE - All enforced gates pass. This does NOT authorize auto-merge; the merge decision remains with humans or a separate policy.
🔍 Gate Evaluation DetailsGate-by-Gate Analysis
Spec Comparison:
📚 Evidence ConsultedEvidence
|
What
Fixes 11451
How
getAccessibleCaptureInstances()which callssys.sp_cdc_help_change_data_captureto discover the capture instances the connection user can actually read.validateConfiguredStreamsAreAccessible()which compares the configured incremental streams against the accessible capture instances. If any configured stream is missing, throwsConfigErrorExceptionnaming the missing table(s) and pointing to the MSSQL setup docs.validateLsnStillAvailable()to limit the MIN LSN query to only configured streams that are also captured, via aWHERE capture_instance IN (...)clause. This avoids using unrelated CDC-enabled tables that the user happens to have permissions on but did not configure.deserializeState(): discover → validate access → check LSN range.ConfigErrorExceptionis rethrown soCdcPartitionsCreatoraborts the sync with a config error rather than routing throughabortCdcSync()'s reset behavior (a reset wouldn't fix a permissions issue).ConfiguredAirbyteCatalogintoMsSqlServerDebeziumOperationsso the validation can read the user's configured streams.Review guide
User Impact
Can this PR be safely reverted and rolled back?
Important
Active progressive rollout warning for source-mssql.