Repository navigation
feat: add native LLM endpoint OIDC login - #1388
Conversation
d263789 to
f3a8e1a
Compare
jhrozek
left a comment
There was a problem hiding this comment.
Panel review (Spec / Standards / Test-adequacy / Domain — secure-code-reviewer, oauth-expert, go-security-reviewer, software-architect, code-duplication-reviewer, library-reuse-reviewer). No ship-blockers: encryption/CAS/identity-binding, dual-layer gateway origin confinement, PKCE/state/RFC 9207 iss/RFC 8414 discovery, refresh/rotation/invalid_grant, RFC 7009 revocation, and the secret-free error paths all checked out. Posting the 2 important and the low/informational domain findings inline below; a couple of Spec/Standards advisories are included too since they're concrete enough to act on. Full report available on request.
6395d96 to
81004fd
Compare
|
Thanks for the thorough review. I rebased the branch onto current Addressed:
For the keyring and transaction-lock duplication observations: I reviewed a shared extraction and am deliberately not taking it in this PR. The native OIDC keyring, endpoint-identity transaction lock, and The post-lock The remaining notes are acknowledged. Same-origin discovered endpoints and the fixed loopback port are deliberate, documented hardening/operability tradeoffs; the runtime remains cohesive; the local-status tests cover separate adapter and CLI seams; and native endpoint status stays passive by design rather than emitting startup diagnostics for an endpoint that may never be selected. |
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
7523161 to
21b4649
Compare
Co-Authored-By: mecatl <[email protected]>
JSON round trips preserve expiry instants, not time.Time location identity. Compare credential fields explicitly and use Time.Equal for expiry. Force a distinct zero-offset fixture location so the regression is independent of the host timezone, and assert refresh returns the bearer only after the durable commit callback. Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Addresses the 2026-09-23 review round: - Document the /oauth/callback redirect_uri registration requirement for preregistered/CIMD clients in user-docs (AGENTS.md requires this in the same PR as the behavior change). - Fix a comment in cmd/mecated/mcplogin.go that referenced opts.Client.DCR on a local oauthlogin.Options value that has no Client field; the DCR field actually lives on the unrelated mcp.OAuthOptions built in internal/cliconfig/mcpprofile.go. - Add TestRunMCPLoginProductionOptionsKeepDCRPriorityThroughRealRuntime: an app-wiring-layer test that captures the real production oauthlogin.Options, obtains a genuine registration-bound callback path from mcp.PrepareOAuthDCRLogin against a real DCR fixture, and drives both through a real oauthlogin.Runtime -- proving the priority holds beyond the isolated mcp/oauthlogin package. - Replace the port-distinctness assertion in TestPinCallbackPathUsesFixedPathEphemeralPort (flaky if the OS legally reuses a just-released ephemeral port) with an assertion on the bind address requested via the injected listener seam. - Extract assertUnauthenticatedFloodDoesNotSpendAttempts, shared by TestExactRedirectUnauthenticatedFloodDoesNotSpendAttempts and TestPinCallbackPathUnauthenticatedFloodDoesNotSpendAttempts, which had drifted into a near-duplicate. - Return a callbackMode struct from resolveCallbackMode instead of five positional string/enum values, matching the file's existing fixedRedirectConfig convention and removing a silent-reorder risk. - Extract exactRedirectAddress so "127.0.0.1:18473" has one source instead of three duplicated literals that must stay byte-identical. Two other findings from the same review round were pushed back on with reasoning posted to the PR rather than implemented: - The "CIMD cannot work with this mode" blocker: CIMD is a public/native client mechanism by design and by this codebase's own config schema (no secret field), so RFC 8252 loopback matching applies to a CIMD-declared redirect_uri the same as it does to a preregistered one. - The "needs a superseding ADR" claim: two prior PRs (#847, #1388) already added new fixed-callback Options fields to this exact runtime without a superseding ADR, establishing that this is within-mechanism extension, not an architectural decision. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Implementation
Implements the approved native LLM endpoint OIDC login contract.
Stage: Implementation
Plan / Interface PR: #1297
Plan amendment: #1335
Approved baseline:
bc8d0202ed7fd6db0b202130c44b5e94ee2d4fc4Completed
llm.endpointsconfiguration facademecatui llm login|status|logout ENDPOINTUXInterfaces match approved contract: Yes
Verification
task linttask testtask docstask site:buildtask api:checkgo run ./cmd/mecademoThe final panel's initially reported security and UX blockers were repaired in
88cced20f; subsequent reviewer invocations failed at the review infrastructure layer. The directing human explicitly instructed the workflow to continue rather than block on those infrastructure failures.