adapter: authorize dependent secrets before altering connections - #38798
Draft
bosconi wants to merge 1 commit into
Draft
adapter: authorize dependent secrets before altering connections#38798bosconi wants to merge 1 commit into
bosconi wants to merge 1 commit into
Conversation
Require secret usage privileges across dependent connections before validation or catalog persistence. Recheck after asynchronous validation and use the final definition when traversing the altered connection. Document the shared-route administration contract and add SQL privilege and SSH integration regression coverage. Closes: SQL-662
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Changing a shared SSH tunnel or AWS PrivateLink connection can redirect credentials used by dependent connections even when the route owner cannot use those credentials' secrets.
Closes: SQL-662
Description
Require
USAGEon secrets used directly or transitively by dependent connections before changing connection options. Authorization includes unused connections because delegated validation can activate them later. Retain the existing checks on the altered connection's final dependencies, so removing an inaccessible dependency remains possible.Check authorization before secret inspection or external validation, and repeat it before catalog persistence to account for dependents or grants changed during validation. Route ownership alone does not delegate authority over dependent credentials. The privilege documentation explains that an inaccessible dependent secret blocks route administration and describes how to resolve that restriction.
Verification
Extend the SQL privilege tests for SSH and AWS PrivateLink routes with empty own dependency sets, direct and indirect secret dependencies, inherited privileges, ownership transfers, dependency removal, and unchanged catalog definitions after rejected alterations.
Extend the SSH/Postgres integration test to cover delegated validation before source creation, rejection with an active source, continued ingestion, and authorized route administration after a secret grant. Execution of this Docker integration coverage is pending.
Repository lint reports pre-existing unpinned
actions/checkout@v4references in the unchanged QA notification workflow and SQL parser notification workflow.