Repository navigation
Agents over MCP, phase 1: agent keys, /mcp and read tools - #5
Merged
Merged
Conversation
eDirectory refuses the proxied-authorization control for disabled and expired accounts, but accepts it for an account locked by intruder detection: on the lab (9.3.3) the locked account's own bind returned 53 while a proxied read as it succeeded. So a locked person could sign in through single sign-on and act in the console. OidcLogin's search now reads lockedByIntruder and loginIntruderResetTime and refuses with the new code "locked". A lock whose reset time has passed counts as over: eDirectory leaves the attribute TRUE after the reset until the next login (checked on the lab with a real lockout). A single sign-on session reaching another server (Server.on) checks the same on that server before acting as the person there. The service account check covers reading the two attributes, and the live check LivePhase3Check covers a locked and a lapsed account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent keys (docs/MCP.md): a person signed in directly or with single sign-on makes a key under their name > Agent keys (password typed again, or a sign-in within 10 minutes). dc_ + 32 random bytes, SHA-256 kept in agents/keys.json on the data volume, outside the versioned configuration and outside backups. Viewer always, editor and operator only if the person has them, never admin, no task presets. 30 days by default, at most the directory's longest life (90) and 14 days with single sign-on; 14 days unused stops a key. Admins list and revoke everyone's. A key's calls run as the person the way single sign-on does: the service account's connection with the proxied-authorization control, and the engine opened acting as them. On every call the console reads the person's account as the service account and refuses a locked (intruder detection: eDirectory accepts the control for it), disabled or expired one; direct sign-in grants come from that read, single sign-on grants from the last sign-in. /mcp: JSON-RPC 2.0, Streamable HTTP, stateless. 22 read tools, each an in-process call to the existing API with the key's session (Mcp.Local), so roles, scopes and rights stay the API's. A key works only there. Per directory (Settings > Directory > Agent keys): on/off (off by default), longest life, and approveChanges, required by default, for the change tools of phase 2. Audit: agent-key.create/revoke/use, and the actor's agent (label and id) on entries made with a key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A test user made for the run (no password) signs in through a fake provider, makes a key, and its agent calls /mcp: whoami, reads under the control, the object inspector, Identity Manager under the user's rights; then a locked, an unlocked and a disabled account, and a revoked key. The container is deleted at the end. Passed on idm254 (eDirectory 9.3.3, IDM 4.10.2), 2026-10-30. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Phase 1 of docs/MCP.md: agent keys, the
/mcpendpoint and the read tools.Stacked on #4: this branch contains #4's commit (the intruder-lock check,
OidcLogin.locked, which agent keys use on every call). Merge #4 first; this diff then shrinks to its own changes.What's in it
AgentKeys,Agents): made under your name > Agent keys, with the password typed again (direct sign-in) or a sign-in within 10 minutes (single sign-on).dc_+ 32 random bytes; only the SHA-256 is kept, inagents/keys.json, outside the configuration and outside backups./mcp(Mcp): JSON-RPC 2.0, Streamable HTTP, stateless./api/v2handler with the key's session (Mcp.Local), so roles, scopes and eDirectory rights stay the API's./mcp.approveChanges, required by default (Jerry, 2026-10-30). Nothing waits yet, because phase 1 has no change tools. The design note's decision 4 is updated to match.agent-key.create,agent-key.revoke, andagent-key.use(refusals, at most once an hour per key and reason);agentfield on the actor (label and id) for entries made with a key;new AuditLog.Actor(...)built from a session now goes throughServer.who(s).Principal.proxied()replaces the"oidc".equals(via)checks for "reaches other servers without signing in again".Tests
AgentKeysTestcovers:AgentsTest(fake eDirectory, fake engine, fake identity provider) covers:/mcp:whoami,read_objectby DN and by GUID,search_objects,driver_set, with the proxied control checked;GET, a key on the API directly, a locked account, a lost role, a disabled account, keys turned off and on again, a revoked key;npm run buildpasses.DemoServer: turned keys on as admin, made a key aspat(only the rolespathas were offered), saw the key dialog, then the list and revoke./mcpwas called with a demo key:initialize,tools/list,whoami,search_objectsandlist_driver_sets.Live on idm254 (eDirectory 9.3.3, IDM 4.10.2), with
LiveAgentsCheck: all 29 steps passed. A scratch user (no password) signed in with single sign-on and made a key (15 days refused, 14 is the most).whoamisaidvia agent.read_objectworked by DN under the control, andsearch_objects,account_status,group_membershipsandobject_associationsall answered.idm_statusanswered with the engine acting as the user.driver_setwas refused withinsufficient-rights: the user has no rights there, which is correct.🤖 Generated with Claude Code