GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(idp-provider): authorize/token/userinfo — code + PKCE flow, local door, allowlist, audit (#13409) by dezren39 · Pull Request #13737 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Slice 3, step 2 of #13409 (story #13658), following the stand-up plan (comment 7113410371) and step 1's landed shape (PR #13696).

What this adds to pkgs/idp-provider — the rest of the plan's surface:

  • GET /authorize + POST /authorize, POST /token, GET /userinfo. Authorization code + PKCE (S256 only). No password grant, no implicit flow, no dynamic registration — clients are a static registry in provider config (config.example.json registers the test RP + the devtoday local door client).
  • Signing: RS256 with the Slice 2 OIDC private key (serial 1001). The key is loaded from its on-host path under IDP_CA_HOME (~/idp-ca/issued/oidc-signing/oidc-signing.key), passphrase-encrypted; the passphrase arrives in process memory only (IDP_CA_PASSPHRASE, fetched by the launcher from the vault by name idp.ca-passphrase) and the key is decrypted in memory. Startup fails closed unless the loaded key matches the published cert behind the JWKS. No provider-local key generation.
  • Accounts + door: one account row (the owner) carrying the design(pm-stack): one identity across the stack — SSO propagation from the public entry into every layer, roles replace asserted authorship #1253 role set (owner / orchestrator / agent / read-only); roles live on the account. The stand-up door is the design's devtoday local identity linked to that row. Design §3 does not specify the local credential mechanism, so the smallest faithful version is implemented: GET /authorize serves a login form that POSTs back; the credential is verified against a PBKDF2-HMAC-SHA256 hash held in the on-host provider config (never in the repo; idp-provider hash-credential helper hashes on-host; an empty hash verifies nothing).
  • Gate + audit: deny-by-default allowlist holding only the owner's identity key, enforced in the provider before the credential check. Every authorize/token attempt — allowed, denied, and login-form challenges — is appended to an append-only SQLite audit (UPDATE/DELETE blocked by triggers; a failed audit write fails the attempt closed).
  • Tokens: authorization codes live 120 s and are single-use (consumed on first presentation). ID + access tokens live 300 s; the ID token carries the account's role claims, sub, aud, and the request nonce.

Standing constraints held: no pkgs/id keypair custody in the login path; SSO never rebinds an id key (#2060).

Tests (laptop, in the worktree): 8 passed, 0 failed — the 3 step-1 tests unchanged in behaviour, plus 5 new flow tests (full code+PKCE loop with JWKS-verified ID token + role claims + userinfo; non-allowlisted attempt denied and audited; bad credential denied and audited; PKCE failure and code reuse denied and audited; login form + unknown client). The flow tests sign with a throwaway in-test key — the real Slice 2 key is exercised only by step 3's live laptop proof.

Step 3 (test-RP loop proof against the running provider + footprint/latency) follows as its own PR.

{
  "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-23T21:06:23Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
feat(idp-provider): authorize/token/userinfo — code + PKCE flow, loca…
c16610c
…l door, allowlist, audit (#13409)

Slice 3 step 2 of the minimal OIDC provider. Adds GET/POST
/authorize, POST /token, GET /userinfo to pkgs/idp-provider:
authorization code + PKCE (S256 only), static client registry,
RS256 signing with the Slice 2 OIDC key loaded from its on-host
path and decrypted in memory only, the devtoday-local door on the
owner account row carrying the #1253 role set, the deny-by-default
allowlist enforced in the provider, and an append-only SQLite
audit of every authorize/token attempt.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 126695cd-4c58-4cac-9a2a-76457d0e291d
Commits

Reviewing files that changed from the base of the PR and between dfd7d9e and c16610c.

Files ignored due to path filters: 1

  • pkgs/idp-provider/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 12

  • pkgs/idp-provider/Cargo.toml
  • pkgs/idp-provider/README.md
  • pkgs/idp-provider/config.example.json
  • pkgs/idp-provider/default.nix
  • pkgs/idp-provider/src/audit.rs
  • pkgs/idp-provider/src/flow.rs
  • pkgs/idp-provider/src/lib.rs
  • pkgs/idp-provider/src/main.rs
  • pkgs/idp-provider/src/registry.rs
  • pkgs/idp-provider/src/signing.rs
  • pkgs/idp-provider/tests/endpoints.rs
  • pkgs/idp-provider/tests/flow.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit bf7040d into main Nov 23, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the idp-build/13409-step2-flow branch November 23, 2026 21:06
This was referenced Nov 23, 2026
SSO (#9077): stand up minimal devtoday OIDC provider with Drew-only gate #13409
Closed
story: our own OIDC/SAML/SSO identity provider #13658
Open
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
This was referenced Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Audit programme: seven-lane review of PRs, issues and designs (2026-11-23) #13871
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.