docs(miner): AMS auth/identity research — hosted login-layer options - #5763
docs(miner): AMS auth/identity research — hosted login-layer options#5763lourincedaging0-commits wants to merge 2 commits into
Conversation
…parison Research spike (JSONbored#5216): compares managed Postgres, Cloudflare D1, and a KV/document store as replacements for the miner local-store's node:sqlite DatabaseSync, evaluated against AMS's ACTUAL access patterns (interactive batchClaim transactions, single-statement atomic claims, append-only ledgers, PRAGMA user_version migrations, the api_base_url composite-key tenant seam, lease liveness). Recommends reusing ORB's existing SqliteDriver adapter (src/selfhost/d1-adapter.ts + pg-adapter.ts) with a Postgres lead and D1 alternative; KV excluded as a relational-atomicity mismatch. Research/writeup only, non-binding on the maintainer-owned storage-design issue. Closes JSONbored#5216
Research spike (JSONbored#5217): surveys auth/identity approaches for a hosted, multi-tenant AMS, evaluated against the installation-token / GitHub App patterns gittensory already operates (ORB's broker, src/orb/broker.ts's das-github-mirror token exchange + src/orb/oauth.ts maintainer-OAuth self-enrollment). Compares (1) GitHub OAuth reusing the existing self-enrollment + broker, (2) a managed identity provider alongside the broker, (3) a custom JWT/OIDC scheme, each with security + integration tradeoffs and explicit reuse/replace/alongside notes for the broker's token exchange. Recommends GitHub-OAuth-as-identity reusing the broker, IdP only for non-GitHub tenants, custom JWT/OIDC avoided. Research/writeup only, non-binding, no auth code changed. Closes JSONbored#5217
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-14 12:49:15 UTC
🛑 Suggested Action - Reject/Close Review summary Blockers
Nits — 5 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agent
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
Gittensory is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: The diff bundles a second research document (`ams-storage-abstraction-research.md`, scoped to #5216) that is not mentioned anywhere in the PR title or description, which only claims to close #5217 — per repo convention every PR must close/link an eligible issue for everything it contains, and this one is silent on the #5216 half.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Closes #5217.
What
A research-spike comparison document (
packages/loopover-miner/docs/ams-auth-identity-research.md) surveying auth/identity approaches for a hosted, multi-tenant AMS — evaluated against the GitHub App / installation-token patterns gittensory already operates, per the issue.Grounding (existing precedent, cited not changed)
src/orb/broker.ts(Orb: fleet calibration collector + analytics (retire per-instance App; feed from review_audit) #1255) — the das-github-mirror token-broker: enrollment-secret → short-lived GitHub installation tokens,installation_idbound server-side at issue time (never from the request).src/orb/oauth.ts— maintainer-OAuth self-enrollment proving installation-account admin server-side.src/orb/broker-client.ts,src/github/app.ts(token cache),src/auth/security(opaque-token/hash primitives).packages/loopover-miner— the currentGITHUB_TOKEN-env, no-login baseline.Comparison (2-3 approaches, with the required broker-interaction notes)
In every option the broker's server-side
installation_idbinding is reused, not replaced (the token path is orthogonal to tenant login).Scope
Docs-only, per the issue boundaries — no auth flow/token-exchange/provider integration implemented or decided; no change to
broker.ts; recommendation is a non-binding input to the maintainer-owned auth design issue.