
Identity AIops
io.github.AIops-tools由 GitHub 帳號 AIops-tools 發布v0.12.0更新於 Oct 30, 2026
Governed Keycloak + authentik identity ops: users, events, clients, MFA, RCA. 29 tools.
概覽
針對自架 Keycloak 與 authentik 身分平台的受稽核 AI 維運工具:檢視使用者、事件與用戶端,執行根因分析,並進行受管控的寫入操作。
- 可以做什麼
- 檢視領域與系統設定、身分提供者,以及驗證事件與管理事件
- 搜尋使用者,查看詳細資料、數量、工作階段、憑證、群組與鎖定狀態
- 列出 OAuth 用戶端、用戶端詳細資料、單一用戶端工作階段與工作階段統計
- 執行分析:登入失敗根因、閒置存取稽核、用戶端設定錯誤稽核、MFA 覆蓋率
- 執行受管控寫入:停用/啟用使用者、撤銷工作階段、要求重設密碼、更新重新導向 URI、輪換用戶端密鑰
- 列出並套用可逆寫入的復原紀錄
- 適用情境
- 適合自行維運 Keycloak 或 authentik 的團隊,想讓助理排查登入失敗、稽核長期未登入帳號與 MFA 缺口、檢查用戶端設定,並在留下稽核紀錄的前提下完成少量身分變更。
- 執行需求
- 本機 Python 套件,透過 uvx 或 pipx 執行;以外掛方式安裝時 PATH 需有 uv。需以 init 精靈建立目標設定(base URL、realm)。Keycloak 需啟用服務帳號角色的機密用戶端,authentik 需 API 權杖。加密憑證庫的主密碼須在 MCP 的 env 區塊中以 IDENTITY_AIOPS_MASTER_PASSWORD 提供。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Identity AIops,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Identity AIops
Audit availability: Real writes require a committed
pendingaudit row and stop before contacting the platform if storage is unavailable. Reads and previews may continue with a warning; new audit rows store outcome summaries rather than full responses.
Governed AI-ops for self-hosted identity providers — Keycloak + authentik.
identity-aiops gives AI agents (and the humans supervising them) a safe,
audited way to operate the identity plane of self-built and small/mid-size
infrastructure: who can sign in, what failed and why, which OAuth clients are
misconfigured, and who still has no second factor. It is built for teams
running their own Keycloak or authentik who want agent-driven identity
operations with receipts — every tool call is audited, and writes carry
risk-tier labels with dry-run previews and undo tokens.
Verification status: modelled on the public Keycloak admin REST API and authentik API v3 and exercised against mocked responses; there is no recorded end-to-end run against a live instance yet.
identity-aiops doctoris the fastest live check — seedocs/VERIFICATION.md.
What it does
29 MCP tools: 21 reads (including the 4 analyses) + 6 governed writes + 2 undo
tools (undo_list, undo_apply). The
same tools work on both platforms — a per-target platform field selects the
API shape (auth flow + resource paths).
Supported platforms
Platform notes: require_password_reset, rotate_client_secret,
client_sessions, client_session_stats, and user_lockout_status are
Keycloak-shaped (authentik has no equivalent endpoint — the tools return a
teaching error there). authentik contributes the global session list used by
the stale-access audit's orphaned-session check.
Missing a platform (Authelia, Zitadel, Ory...), an endpoint, or an analysis you need? 缺功能提 issue/PR 欢迎留言 — open an issue or PR at https://github.com/AIops-tools/Identity-AIops, feature requests welcome.
What this tool does, and does not, decide
It delivers identity-provider operations — reads and writes — accurately and
records every one of them. It does not decide whether a write is allowed to
happen. That is the agent's judgement, or the permission of the account you
connect it with: give the Keycloak service account (or authentik token) only
the roles you want the agent to have — view-users / view-events /
view-clients and no manage-* — and the writes fail at the server, the place
that actually owns the permission.
So there is no read-only switch, no policy file, no approval gate to configure.
The one thing the tool guarantees is that nothing is silent: every call, over
MCP and over the CLI alike, lands an audit row in
~/.identity-aiops/audit.db, and reversible writes still capture their
before-state (fetched, never guessed) and record a replayable inverse.
Each tool declares a
risk_level, carried into the audit row as a descriptive tier — so a reviewer can see at a glance that a row was, say, a high-risk secret rotation. It is a label, not a gate.
Running a smaller / local model? See agent-guardrails.md — it lists the guardrails this tool now enforces for you (so you don't spend prompt budget restating them) and gives a ready-made system prompt for what's left.
Quick start
As a Claude Code plugin
One install gives an agent both the skill and the MCP server:
The MCP server is fetched with uv and pinned to the
package version this plugin declares, so an audit row can be traced back to the
code that wrote it. Credentials are still configured with identity-aiops init — see below.
As an OpenClaw plugin
The same bundle is published on ClawHub, where one install delivers the skill and its MCP server together:
Restart the OpenClaw gateway afterwards so it loads the plugin. The MCP server is
fetched with uv, pinned to this exact release, so
uvx has to be on PATH — without it the skill still installs but reports
Visible to model: no. Credentials are configured exactly as below.
As a CLI or standalone MCP server
For Keycloak, create a confidential client with Service accounts roles
enabled and grant its service account the realm-management roles you want the
agent to have (start with view-users, view-events, view-clients; add
manage-users / manage-clients only if you want the governed writes). For
authentik, create an API token for a (least-privileged) admin user.
CLI surface: users (list/show/sessions/credentials + disable/enable/
revoke-sessions/require-reset), clients (list/show + set-redirect-uris/
rotate-secret), events, overview, doctor, secret, init, mcp.
Write commands take --dry-run and always double-confirm; execution is
delegated to the governed MCP twins so CLI writes land in the audit log too.
MCP configuration
env-block caveat: MCP clients launch the server with a minimal environment — variables from your shell profile are NOT inherited. Anything the server needs (
IDENTITY_AIOPS_MASTER_PASSWORD, an alternateIDENTITY_AIOPS_HOME,IDENTITY_AUDIT_APPROVED_BYto attribute writes on the audit trail) must be set in theenvblock above.
Governance
Every MCP tool runs through the vendored governance harness
(identity_aiops/governance/, zero external dependencies):
- Audit — every call (including errors) lands in
~/.identity-aiops/audit.dbwith params, status, and risk level, plus any optional approver/rationale annotation. It records; it does not authorize. - Budget — per-session call/time budgets and a runaway breaker
(
IDENTITY_MAX_TOOL_CALLS,IDENTITY_MAX_TOOL_SECONDS,IDENTITY_RUNAWAY_MAX) — a safety backstop, not an authorization gate. - Risk tier — reads are
low; containment/hygiene writes (disable_user,revoke_user_sessions,require_password_reset) aremedium; access-granting or boundary-replacing writes (enable_user,update_client_redirect_uris,rotate_client_secret) arehigh. The tier is a descriptive label carried onto the audit row, not a gate — whether a write runs is the agent's judgement or the connecting account's permissions.IDENTITY_AUDIT_APPROVED_BY/IDENTITY_AUDIT_RATIONALEare optional annotations recorded when set, never required. - Undo — reversible writes capture the REAL prior state (fetched before
mutating, never guessed) and record a replayable inverse descriptor in
~/.identity-aiops/undo.db. Irreversible writes (revoke_user_sessions,rotate_client_secret) record priorState only — the secret is stored masked, never in clear. - Sanitize — every string an IdP returns is folded through an injection-safe normaliser (bounded length, control characters stripped) before an agent sees it.
- Secrets — credentials live Fernet-encrypted (scrypt-derived key) in
~/.identity-aiops/secrets.enc, never plaintext on disk; a legacyIDENTITY_<TARGET>_SECRETenv var is honoured as fallback andidentity-aiops secret migratemoves it in. TLS verification defaults ON.
Configuration
~/.identity-aiops/config.yaml (created by init):
Set IDENTITY_AIOPS_HOME to relocate all state (config, secrets, audit,
undo). IDENTITY_AIOPS_CONFIG points the MCP server at an alternate
config file.
Development
MIT License. Part of the AIops-tools line — governed AI-ops tooling for self-hosted infrastructure.
來源:README.md,提交 5e7d775
工具
0版本歷史
5- v0.12.0最新Oct 30, 2026
- v0.11.0Oct 15, 2026
- v0.9.0Oct 15, 2026
- v0.8.5Sep 17, 2026
- v0.8.4Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分