Keeper Secrets Manager

io.github.wyre-technology由 GitHub 账号 wyre-technology 发布v1.0.0更新于 Oct 24, 2026

Read-only multitenant Streamable HTTP bridge over Keeper Secrets Manager's MCP server.

发布方自己的服务:Secrets.RealEstate

概览

AI 生成的概览

只读的多租户 HTTP 桥接服务,重新暴露 Keeper Secrets Manager 的 MCP 服务器,让助手按租户列出、搜索和读取保险库机密。

可以做什么
  • 列出机密与文件夹(仅元数据)
  • 按备注及登录名、URL、主机名、地址等值搜索机密
  • 读取单条记录或字段(可选择不遮蔽),并获取实时 TOTP 验证码
  • 在本地生成密码
  • 查询健康状态与上游服务器版本
  • 写入、删除、文件上传下载及批量未遮蔽导出均被允许清单拦截
适用场景
适用于网关或多租户环境:每个请求携带各自的 Keeper Secrets Manager 设备配置,助手只需只读访问保险库记录、字段或 TOTP 验证码。不适合创建、更新或删除机密,也不适合单人 stdio 场景。
运行要求
以本地容器或 Node.js 进程运行,并会启动上游 ksm-mcp 二进制(路径由 KSM_MCP_BIN 指定)。必须设置真实的 CONDUIT_S2S_SECRET,否则拒绝启动;每个请求需带 X-Gateway-S2S HMAC 头和 X-Keeper-Config-Base64 设备配置。需要 Keeper Secrets Manager 应用与设备。可选配置:PORT、MCP_HTTP_HOST、CHILD_HOME、IDLE_EVICT_MS、SPAWN_TIMEOUT_MS。
安装前请注意
涉及真实保险库凭据:X-Keeper-Config-Base64 头包含 clientId、privateKey 与 appKey,且桥接服务无法核实 Keeper 应用的共享是否为只读,需自行配置不可编辑的共享。可用工具包括未遮蔽读取、TOTP 验证码,以及可充当机密值确认预言机的搜索。MCP_ALLOW_INSECURE_DEV=1 会关闭服务间校验,仅限本地开发。上游批处理模式会自动批准确认操作,因此允许清单是唯一的写入边界。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Keeper Secrets Manager,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

keeper-mcp

Multitenant Streamable HTTP bridge over Keeper-Security/keeper-mcp-golang-docker — Keeper's official Secrets Manager MCP server — built so the WYRE conduit gateway can forward per-tenant Keeper credentials as HTTP headers.

Upstream pin: v2.5.0 (MIT), built from source. See Bumping the upstream pin.

v1 is READ-ONLY. See Read-only in v1 — for this vendor that is a security boundary, not a scoping decision.

Why

Keeper's server is stdio-only. There is no HTTP or SSE listener anywhere in its source — the EXPOSE 8080 in its own Dockerfile is vestigial, and its docker-entrypoint.sh is unreachable because the published image is FROM scratch with no shell. It reads its credential from KSM_CONFIG_BASE64 at process start, which makes it single-tenant per process.

Our gateway is multi-tenant: every request carries the calling org's credentials as HTTP headers, and the vendor container has to translate those headers into something the upstream understands.

Because the upstream has no HTTP mode to proxy to, this bridge holds an MCP client session over stdio to each tenant child and re-serves it over Streamable HTTP:

  1. Listens on :8080 with POST /mcp and GET /health. Refuses to start unless CONDUIT_S2S_SECRET is a real secret.
  2. 401-gates every /mcp request on X-Gateway-S2S, then on X-Keeper-Config-Base64 — including validating that it decodes to a usable KSM config. Missing/invalid credentials never fall through to environment credentials; that would be a cross-tenant leak. This bridge is gateway mode only.
  3. Lazily spawns one ksm-mcp serve --batch child per credential (keyed by a hash), with the tenant's KSM_CONFIG_BASE64 set, and connects an MCP client to it over stdio.
  4. Serves both protocol eras on /mcp via the v2 SDK's createMcpHandler(factory, { legacy: 'stateless' }) — 2025-era initialize-handshake clients (the conduit gateway today) and modern 2026-07-28 envelope clients.
  5. Filters the child's surface through a read-only allowlist in both directions.
  6. Evicts idle children after 15 minutes (IDLE_EVICT_MS).

Tool names pass through unchanged.

Read-only in v1 — deliberate, and load-bearing

Boundary 1 (the strong one): a read-only KSM application

Provision the Keeper application with non-editable shares. A KSM application's shared-folder grant is read-only unless explicitly made editable (secrets-manager share add --app <APP> --secret <FOLDER_UID>; the Vault's Application Access panel shows Read-Only vs Editable). With a non-editable grant, every write fails at Keeper's own server — regardless of this bridge, its allowlist, batch mode, or prompt injection.

This is a provisioning precondition of the credential contract, not a nice-to-have. The bridge cannot verify it: the Keeper SDK carries IsEditable per record, but ksm-mcp never reads it, so nothing here can detect an over-granted application. Scope the application to the narrowest folder set the use case needs, read-only, and treat that as the real control.

Boundary 2: this bridge's allowlist

Keeper's upstream has no read-only mode — verified against the v2.5.0 pin: serve has six flags and none restrict the surface, getAvailableTools() returns a hardcoded 19-element slice that consults no config, and Confirmation.DefaultDeny is hardcoded false with no plumbing. Nothing upstream can un-register a tool.

On batch mode. Keeper's own Docker documentation tells you to set KSM_MCP_BATCH_MODE=true, and this bridge does. What that actually changes:

Batch modeBehaviour
offget_field + unmask hard-errors (the single Confirmer call site upstream). The other eight confirm-requiring tools return a successful {status: "confirmation_required"} result pointing at the ksm_confirm_action prompt, expecting a two-phase completion.
onEvery confirmation is auto-approved, delete_secret included.

Leaving it off would not buy a confirmation boundary here, because that two-phase flow is unreachable through this bridge by construction: it is driven by an MCP prompt, and the bridge never declares the prompts capability — and the tool that completes it, ksm_execute_confirmed_action, is blocked below. So "off" yields stubs no client here can satisfy, not safety. We force it on and put the boundary in src/tools.ts instead.

What the allowlist uniquely buys, which a read-only grant does not: blocking get_all_secrets_unmasked and ksm_execute_confirmed_action. Both are reads-or-worse that a read-only grant happily permits.

Served (9)

ToolConduit tierNote
list_secretsreadRecord metadata only
list_foldersreadFolder metadata
health_checkread
get_server_versionread
search_secretsadminMetadata-shaped result, but matches on notes and login/url/hostname/address values — a confirmation oracle over secrets (CWE-200)
get_secretadminReturns a record; unmask honoured
get_fieldadminKSM notation query — the narrowest read
get_totp_codeadminLive second factor
generate_passwordadminLocal generation; record-creating args removed

Conduit classifies credential reads as admin (src/access/tool-classification.ts), which outranks write. A Keeper read is a credential read by definition.

Blocked (10)

create_secret, update_secret, delete_secret, create_folder, delete_folder, upload_file, ksm_execute_confirmed_action, get_all_secrets_unmasked, get_record_type_schema, download_file

Four are worth explaining:

  • ksm_execute_confirmed_action — not a peer of the others but the keystone. It takes original_tool_name plus a user_decision boolean the caller supplies, with no nonce and no correlation to any prompt, then dispatches straight into the confirmed executors. Allowing it would collapse every other rule here into one name. Blocked permanently.
  • get_all_secrets_unmasked — one call that returns every secret in the application's scope, unmasked, into the model's context. Blocked permanently.
  • get_record_type_schema — non-functional upstream at v2.5.0: LoadRecordTemplates() has no callers and the package has no init(), so every call returns "record templates not loaded".
  • download_file — cannot work over MCP. Upstream's DownloadFile(uid, fileUID, savePath) returns only an error and writes bytes to a server-side path; the handler returns {uid, file_uid, path, message}, never the file. Honouring save_path would let a tenant write attacker-chosen paths into a container filesystem shared with every other tenant's child, and removing it leaves nowhere to write.

Argument policy: allowlist, not blocklist

Each served tool declares the exact arguments it accepts (allowArgs in src/tools.ts), enforced on both the advertised inputSchema and the inbound tools/call. A client working from a stale or ignored schema therefore cannot reach a write path by passing an argument anyway.

The default matters more than the current entries: when an upstream bump adds a parameter to an already-served tool, it fails closed — it vanishes from the surface until someone reviews it into the table — rather than passing through silently. Today the only removals are generate_password's save_to_secret and folder_uid, which would turn a local utility into a record create.

Enabling writes is a reviewed, versioned change to src/tools.ts plus the matching VENDOR_TOOL_CONFIG rows in conduit. Not a config flip, not an env var.

Credential contract

The gateway forwards this header on every /mcp request. conduit's vendor-config must match exactly.

HeaderChild env varRequired
X-Keeper-Config-Base64KSM_CONFIG_BASE64yes

The value is the base64 device configuration from Keeper Vault → Secrets Manager → your application → Devices → Add Device (it starts ewog...).

Precondition: the application this device belongs to must hold read-only (non-editable) shares. See Boundary 1 — it is the strongest control in the system and the bridge cannot verify it for you.

Validity rule: standard base64 that decodes to a flat JSON object of string values containing clientId, privateKey and appKey. hostname is optional — verified against upstream internal/ksm/client.go InitializeWithConfig, which requires exactly those three. Anything else → HTTP 401 with a JSON-RPC error body that never echoes the supplied value back.

The bridge also forces on every child:

KSM_MCP_BATCH_MODE=true      # no TTY in a container (see above)KSM_MCP_LOG_LEVEL=errorargv: ["serve", "--batch"]

KSM_MCP_PROFILE is deliberately not set: with KSM_CONFIG_BASE64 present, upstream builds an in-memory profile and never touches the on-disk profile store, which is what keeps tenants from sharing state through the filesystem.

Configuration

Env varDefaultNotes
CONDUIT_S2S_SECRETempty (refuses to start)Service-to-service secret. HTTP logs an error and exits non-zero when this is empty or a known placeholder (changeme, secret, replace-me, your-s2s-secret, and the other example values). Generate one with openssl rand -hex 32. Compose will not start without it. The value is never logged.
MCP_ALLOW_INSECURE_DEVunsetSet to exactly 1 only for local development to start HTTP without CONDUIT_S2S_SECRET. The process logs a warning, does not enforce X-Gateway-S2S, and binds 127.0.0.1 only. A non-loopback MCP_HTTP_HOST is ignored and the override is logged. A known placeholder secret still refuses to start.
MCP_HTTP_HOST0.0.0.0 when a real secret is setBind address. A configured secret honors this value, including 0.0.0.0. Unset keeps that historical container bind. The image and Compose set 0.0.0.0 inside the container. Without a secret, the dev bypass forces 127.0.0.1 and does not honor this variable.
PORT8080Public listen port. MCP_HTTP_PORT is the fallback when PORT is unset.
KSM_MCP_BIN/usr/local/bin/ksm-mcpUpstream binary the bridge spawns.
CHILD_HOME/tmp/ksm-mcp-homeRoot under which each tenant gets its own HOME subdirectory, created at spawn.
IDLE_EVICT_MS900000Idle tenant timeout (15 min). Shorter than nutanix-mcp's 60 min on purpose: the Go child restarts in milliseconds, and every minute one stays open is a minute an authenticated KSM session sits in memory.
SPAWN_TIMEOUT_MS30000Max wait for a child to answer the MCP handshake.

Copy .env.example. Leave CONDUIT_S2S_SECRET empty in the example; put a real value only in an untracked .env or the process environment.

HTTP authentication

With CONDUIT_S2S_SECRET set, every /mcp request must include X-Gateway-S2S. The check is verifyS2sHeader in src/s2s-verify.ts: the header value is t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of the literal string t=<unix seconds> keyed with CONDUIT_S2S_SECRET (64 lowercase hex characters). The timestamp must be within 300 seconds of the server clock. A missing or invalid header is HTTP 401, before the Keeper credential header is read.

bash
TS=$(date +%s)SIG=$(printf 't=%s' "$TS" | openssl dgst -sha256 -hmac "$CONDUIT_S2S_SECRET" -hex | awk '{print $NF}')curl -sS http://127.0.0.1:8080/mcp \  -H 'Content-Type: application/json' \  -H 'Accept: application/json, text/event-stream' \  -H "X-Gateway-S2S: t=${TS},v1=${SIG}" \  -H "X-Keeper-Config-Base64: $KSM_CONFIG_BASE64" \  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'

Gateway mode is the only mode. /mcp also requires X-Keeper-Config-Base64. That header is the only credential source for the request. KSM_CONFIG_BASE64 in the process environment is not a fallback.

/health and /healthz stay unauthenticated and do not read credentials.

Docker

The image listens on 0.0.0.0 inside the container (MCP_HTTP_HOST). Publish the port on loopback and pass a real S2S secret. Keeper credentials arrive on each request as headers; they are not read from the environment.

bash
docker build -t keeper-mcp .docker run \  -e CONDUIT_S2S_SECRET="$CONDUIT_S2S_SECRET" \  -e MCP_HTTP_HOST=0.0.0.0 \  -p 127.0.0.1:8080:8080 \  keeper-mcp

Compose refuses to start when CONDUIT_S2S_SECRET is unset. The gateway service does not set KSM_CONFIG_BASE64 or env_file, and publishes 127.0.0.1:8080:8080:

bash
CONDUIT_S2S_SECRET="$CONDUIT_S2S_SECRET" docker compose up

Local HTTP without a secret is development-only. It binds 127.0.0.1 and logs a warning. A non-loopback MCP_HTTP_HOST (including 0.0.0.0) is ignored:

bash
MCP_ALLOW_INSECURE_DEV=1 npm start

Endpoints

  • POST /mcp — Streamable HTTP MCP, dual-era. Requires a valid X-Gateway-S2S header and X-Keeper-Config-Base64.
  • GET /health and GET /healthz — unauthenticated liveness. Reports mode, served tool count, and live tenant count. Never reads credentials and never spawns a child.

Development

bash
npm installnpm run lint     # tsc --noEmitnpm test         # vitestnpm run build

HTTP refuses to start until CONDUIT_S2S_SECRET is set. For a local listener without a secret:

bash
MCP_ALLOW_INSECURE_DEV=1 npm start

The test suite covers the allowlist policy, the credential contract, and the 401 gate over the real HTTP stack. None of it needs a Keeper account or a running child — the pool is pointed at a nonexistent binary so any accidental spawn fails loudly.

Bumping the upstream pin

  1. Change KSM_MCP_REF in the Dockerfile.
  2. Rebuild. scripts/check-upstream-tools.mjs runs in the Docker build, re-derives the tool surface from the pinned Go source, and fails the build on any drift — a new tool, a renamed one, or a new argument on an already-served tool. This is enforcement, not a checklist item.
  3. Triage whatever it reports into src/tools.ts and src/__tests__/fixtures.ts. New tools are default-denied by the allowlist, but they still need an explicit decision recorded.
  4. Re-run the build; both build-time smoke tests and the drift check must pass.
  5. Cut a release, then re-pin the digest in conduit's azure/vendor-fleet.conduit-prod.bicepparam.

Never track main, and never pull keeper/keeper-mcp-server:latest — the pin is a reviewed git tag we build ourselves.

License

Apache-2.0 (this bridge). The upstream Keeper server is MIT and is built from source at image build time.

来源:README.md,提交 1b22549

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 17, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Secrets 集成