You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(slack): honor implicit Search approval during authorization - #8548
Use the shared Search approval policy when choosing and verifying Slack OAuth scopes. Existing live sources retain implicit approval; explicit denial stays authoritative and detached sources no longer grant approval.
Serialize OAuth completion with explicit approval decisions, source creation/removal, and index archive/restore using the existing transaction advisory-lock helper. Acquire the organization lock before resource row locks.
Type of Change
Bug fix
Testing
38 real PostgreSQL/Redis integration tests pass. Regressions reproduce stale implicit approval, retained-document removal, and concurrent source/index/approval changes; independent negative controls verify the new guards. JSON reports generated.
172 focused tests pass across Slack authorization, connector/index lifecycle, Search approvals, and account access.
Type-check, lint, all 54 audits, block-registry audit, and docs-manifest check pass. Committed-artifact generators completed.
Checklist
Code follows project style guidelines
Self-reviewed my changes
Tests added/updated and passing (new tests pass the test-audit authoring gate)
[High risk] Adds locking around organization search approval state.
The PR appears safe to merge; no outstanding findings remain.
Summary
The PR aligns Slack authorization scopes with the shared Search approval policy and rechecks approval before saving consent. The follow-up changes exclude detached connectors and serialize consent with connector, index, and explicit-approval changes.
Adds integration coverage for implicit approval, removal, and concurrent lifecycle changes.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Start Slack authorization] --> B[Read Search approval and choose scopes]
B --> C[Slack consent]
C --> D[Acquire organization approval lock]
D --> E[Recheck approval in transaction]
E -->|unchanged| F[Save credential group configuration]
E -->|changed| G[Reject stale consent]
H[Connector, index, or approval change] --> D
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
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.
Summary
Type of Change
Testing
Checklist
test-auditauthoring gate)