Files
viessm_h 902e5db75c
upstream-watch.yml (push) Invalid workflow file
ci / test (push) Failing after 6s
add initial skeleton
2026-11-19 13:56:13 +01:00

2.4 KiB

Architecture (target, with milestones)

Target shape

  AI clients (Claude Code, Cursor, ...)
        |  MCP over HTTPS (OAuth 2.1)
        v
  gateway: merlin-hpc-mcp  <------ this repo
        |   - curated site tools (packages/*/tools)
        |   - policy.allowlist   (default deny, no shell)
        |   - policy.provenance (--comment=ai-mcp on every job)
        |   - per-user identity (delegate mode; sudo -> real user)
        |   - context resources (/etc/agents.d)
        v
  login nodes / Slurm
        (QOS + associations + job_submit plugin = the hard fence,
         enforced regardless of submission path)

Defence in depth, in order of trustworthiness:

  1. Slurm-side fences (QOS/associations/job_submit plugin) apply to every submission path; these are the only controls we fully trust.
  2. Gateway policy (allowlist, narrow tools, provenance) shapes what is easy and auditable.
  3. Client-side behaviour (tool naming, descriptions, confirmations) is UX, never a boundary.

Milestones

  • M0 (this skeleton): organisation. Workspace, pin, compat wall policy for later, policy primitives implemented and tested, CI, drift watch, deploy templates. No upstream wiring.
  • M1 spike: verify the extension surface. Confirm against upstream docs/core + docs/slurm the tool-registration, executor and server assembly APIs; populate compat.py; wire server.py; run modes honoured from config.py. Local (local mode) first, then ssh mode for parity with upstream defaults.
  • M2: hosted gateway. Delegate mode over HTTPS behind the nginx template; per-user JWT/OIDC as upstream requires; systemd unit; rollout to a pilot group; cross-audit (gateway logs vs sacct markers).
  • M3: Kerberos-identity integration. OIDC broker (e.g. Keycloak) with Kerberos federation fronts the gateway: users authenticate with their institutional principal, downstream tokens stay standard OAuth 2.1. Kerberos is the identity source, not the MCP wire protocol.
  • M4 (exploratory): slurmrestd-backed tools. Evaluate replacing CLI-wrapping tools with REST-backed ones where narrower semantics help.

Deliberately out of scope for this repo

  • Interactive run_command/shell-style tools (see ADR-0001, goal: containment).
  • Non-SSH hardening of login nodes (that is cluster configuration, tracked elsewhere; referenced by our security notes only).