Skip to content

Close the Pathbase auth gap: broker-family lease vs stored-session secret vs upstream token flag #115

Description

@bdelanghe

Follow-up to #112 (installed + egress verified; path share still can't run unattended). Verified against path-cli 0.16.1: path auth login is grant-code only — an 8-character one-time code from pathbase.dev/auth/cli, pasted via --code — which no unattended session can complete. No token flag, no token env var, though the API's pat_… bearer tokens exist.

"Could we use the broker workflow for this?" — the maintainer's question, answered in parts:

  • Egress: no, and no need. The network allowlist is platform config, not a credential — and that lever is already pulled and verified live.
  • Credential custody: yes, that's the org-consistent shape — but as a lease (the front-desk-lease shape), not the ticket-window shape. claim-ticket.yml works by keeping the credential in the workflow, so the caller never holds it. That inverts here: the upload must run inside the session, because that's where the transcript lives — so the credential must reach the session. The analogous mechanism is a Worker holding a pat_… for a dedicated org Pathbase identity as a Worker secret, leasing it to sessions with an audit log. One custody point, one revocation point (DELETE /api/v1/auth/sessions/{id}), and the workers are already on the environment allowlist.
  • The honest caveat: a session has no identity proof to present — GitHub Actions has OIDC; sessions don't. Until the session-identity gap closes (the Merge gate: verify a PR's branch/commits trace to a Front Desk claim naming them #113 family), the lease's release check is only as strong as the network boundary. Worth stating in the lease's header the way claim-ticket.yml states its fail direction.

Dependency either way: the CLI must accept a provided token. That's upstream path-cli surface (env var or flag over the existing bearer scheme) — and the maintainer works at Empathic now, so it's ours to land. The stored-session-file-as-environment-secret shape is the stopgap that needs no upstream change (file location/portability unverified — observe after the first real login, don't guess).

Suggested order: (1) upstream token support, (2) broker lease holding the org pat_…, (3) hook wiring, (4) first live path share pasted on its own PR.

Runbook context: .github-privatedocs/handoffs/toolpath-pathbase.md (lever 2).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions