Skip to content

fix(den): revoke direct member access on removal - #4877

Merged
reachjalil merged 1 commit into
devfrom
fix/member-access-readiness
Sep 11, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/member-access-readiness

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Summary

Canonical replacement for #3274, reconstructed on current dev at c23085ad2.

Removing an organization member should revoke their direct assignments, not leave stale grants behind. This keeps the existing removal transaction, organization lock, admin-team guard, credential revocation, and fresh-membership rejoin behavior unchanged.

  • Hard-delete direct desktop-policy and external-MCP assignments; soft-revoke marketplace, config-object, plugin, connector-instance, and dashboard grants with the membership-removal timestamp.
  • Preserve other recipients, shared team/org/role assignments, resource ownership, and prior revocation history. No migration.
  • Extend the existing removal/rejoin regression to verify effective plugin access before removal and after explicit re-invitation. Old access stays denied; a grant assigned to the new invitation remains usable.
  • Extend the existing SCIM deactivation/reprovision journey with all seven grant types, plus unchanged control/shared assignments. No new journey or provider integration.

Verification

Head: 51b1ee83927bf21b863b8aecadbdef3c781fe217 (verified signature).

Check Result
pnpm --filter @openwork-ee/den-api exec bun test --conditions development test/member-removal-rejoin.test.ts 8 passed, 0 failed, 0 skipped; 65 assertions; exit 0
pnpm evals:pr specs/scim-deprovisioned-sso-reprovision.test.ts 2 passed, 0 failed, 0 skipped; 6 recorded claims; exit 0
Den DB, types, and email prerequisite builds Passed
git diff --check Passed

The runtime journey cold-boots Den through server() for both single-org and multi-org cases on the exact head. Placement: local, using dedicated disposable MySQL 8.4 and Redis containers, isolated test databases, and a deterministic mock IdP. No shared database, real provider, or cloud sandbox was used. Both cases assert that the seven direct assignment types are revoked, all 21 control/shared rows remain unchanged, and reprovision does not revive, copy, or retarget old grants.

Verdict: Passed

The selected removal/rejoin and SCIM cleanup claims pass. Current-head assertion evidence is published separately on this PR. This does not claim a full test-suite pass or approval; required CI and independent review remain merge gates.

Deferred: SAML-specific callback coverage, desktop UI, and unrelated SCIM identity/session lifecycle changes. #4803 owns the SAML follow-up. Its default-role fixture repair and test:db registration are reused identically here; the existing OIDC/protocol setup is otherwise untouched.

@vercel

vercel Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 11, 2026 12:20am UTC
openwork-den Ready Ready Preview Sep 11, 2026 12:20am UTC
openwork-diagnostics Ready Ready Preview Sep 11, 2026 12:20am UTC
openwork-landing Ready Ready Preview, v0 Sep 11, 2026 12:20am UTC

@reachjalil

reachjalil commented Sep 11, 2026 •

Copy link
Copy Markdown
Member Author

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit 51b1ee83927bf21b863b8aecadbdef3c781fe217 · selected evidence

Open review report

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 1. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (100770 ms), confidentiality-review (32175 ms), spec-provenance-review (138926 ms), desktop-den-sync-review (54639 ms).

Blockers

  • None.

Advisories

  • QEA-NDX · medium · spec-provenance-review · evals/specs/helpers/member-grant-fixture.ts:70

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (51b1ee83927bf21b863b8aecadbdef3c781fe217). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil enabled auto-merge (squash) September 11, 2026 00:22
@reachjalil
reachjalil merged commit b45546d into dev Sep 11, 2026
36 checks passed

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — 51b1ee83 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-app — 51b1ee83 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-den — 51b1ee83 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-diagnostics — 51b1ee83 Deployed Sep 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant