Skip to content

brokered_connections: two reads carry no provider predicate (blocks the provider sunset flow) #783

Open

Description

@mxmzb

Two brokered_connections reads in server/src/plugins/store.ts carry no provider predicate, where the other 11 selects in that file all filter on the active broker:

  • retireConnectionsFor — the offboarding sweep
  • brokeredConnectionsFor — the settings-page read

Both are keyed (holder = 'person', userId) only.

Why it matters

retireConnectionsFor finds a person's connections and then calls the active broker's revoke() for each row it found. On a deployment holding rows from both providers, that is a revocation requested at the wrong vendor — which would not recognise the connection — while the audit row records vendorRevocationRequested about access that was never removed. A departed employee keeps live access and the record says otherwise.

brokeredConnectionsFor is milder: rows are resolved at the active provider's canonical URL, so another provider's connections are silently dropped from the settings page.

Why it is not urgent

Unreachable today. The startup activation refusal (assertActivatable, called from server/src/index.ts) refuses to boot when the configured provider differs from the provider on the existing rows, so a mixed deployment cannot start and neither read can see a foreign row.

Both sites were already unfiltered before the Arcade provider work began (base 7b1c20a) — this is pre-existing, not a regression.

Why it needs an issue rather than a fix now

The provider sunset flow is exactly the change that relaxes assertActivatable's refusal, and it turns both sites live. Whoever builds it must add the brokerProvider predicate to both reads. Both call sites now carry comments saying so and naming assertActivatable, but a comment is not a work item.

Also to correct

The design spec's inventory of provider-filtered sites lists the offboarding sweep among them. It is not one — the sweep has no provider filter at all. That line should be corrected when the sunset flow is specced.

Acceptance

  • Both reads filter on the active broker provider.
  • A test drives the offboarding sweep on a deployment holding a foreign-provider row and asserts it is not revoked through the active broker and not audited as revoked.

Context: filed from the Arcade provider PR (#770), which does not change either read.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions