Skip to content

feat(pm-aggregator): validate IdP access tokens + role-gate writes (slice of #13798) #14411

Backlog

Description

@dezren39

Refs #13798 — first production-consumer slice of the pm-aggregator IdP integration. Parent tracker: #13416. Pattern: PR #13799 (pkgs/idp-provider reference consumer + per-app integration pattern, verify::TokenVerifier, examples/role-gated-app.rs).

Scope

In pm-stack/aggregator, validate IdP access tokens (pkgs/idp-provider) on write paths, following the per-app integration pattern from the provider README (as landed in #13799):

  • discovery-driven configuration, JWKS verification selecting the key by token kid (rollover-safe), issuer + expiry + token_use=access checks;
  • writes require a write role from the token's roles claim (owner or orchestrator); reads accept any valid token; enforcement server-side, never from request bodies or client state;
  • composes with Cloudflare Access (reachability) and the impl(pm-stack): break-glass — outage queueing + local owner token CLI (#1253 split 6) #9608 break-glass owner token (outage path) — neither replaced.

Terms

  • Tests run without a live IdP or credentials (local provider fixture, as in pkgs/idp-provider/tests/consumer.rs); the live provider is selected by configuration.
  • Role-denial case covered by tests.
  • House rules: secrets by name only; builds/tests via remote dispatch, never on the laptop or sandbox.

Acceptance

Filed by triage of #13798 (task 23232, lane code-h, 2026-11-24).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T14:13:35Z",
    "session_id": "ses_e5df224b130ffeIqO7mTfWJNik",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "6fd30c93b62a4b6fba19e6444c7d69f343fb93a1"
    },
    "auth_subject": "oc-code-03",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Acceptance criteria

Activity

  1. added
    kind/feature
    task/small-fix
    on Nov 24, 2026
  2. developing-today commented on Nov 24, 2026

    @developing-today
    Contributor
  3. added
    status/needs-triage
    priority/normal
    effort/m
    app/pm-stack
    meta/enriched
    on Nov 24, 2026
  4. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    Contributor

    Intake review

    Related: Parent #13798, tracker #13416, pattern PR #13799 (pkgs/idp-provider).

    Notes: Well-scoped first production-consumer slice of the IdP integration; body names the exact pattern to follow.

    Risks: Token-validation semantics drifting from the reference consumer would create per-app divergence — reuse, do not re-implement.

    Suggested approach: Mirror the reference consumer in pkgs/idp-provider; failing tests first for expired/wrong-issuer tokens and for the role gate.

    🤖 Agent note · state: filed

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-11-24 08:14 CST
    • Found via: monitor reconciliation
    • Task: intake enrichment (protocol §5) — acceptance criteria, label normalisation, related links
    • Expectation: s — done when the issue carries criteria, normalised labels and this review
    • Links: n/a
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

    app/pm-stackeffort/mkind/featuremeta/enrichedpriority/normalstatus/needs-triagetask/small-fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions