使用说明
帕斯曼
AI代理的安全凭证代理
让AI代理 使用 你的证件从来没有 看见 他们。
SSH连接到服务器。查询数据库。调用API。发送电子邮件。 所有这些都不会向LLM暴露任何密码、密钥或令牌。
问题
目前处理凭据的每个MCP服务器 向人工智能泄露秘密 或是 仅限于单一协议。没有统一、安全、多协议的凭证代理。
解决方案
帕斯曼是一个 加密本地保险库 + 凭证代理 它位于AI代理和您的基础设施之间。AI按名称引用凭据。Passman在服务器端注入它们。人工智能会得到结果——从每个响应中清除秘密。
AI Agent Passman Your Infrastructure
┌─────────┐ ┌──────────┐ ┌─────────────────────┐
│ "Query │ credential │ Decrypt │ inject auth │ │
│ prod-db │ ────by ID───> │ + Proxy │ ────────────> │ PostgreSQL / SSH │
│ for │ │ + Scrub │ │ API / SMTP Server │
│ users" │ <──sanitized─ │ output │ <──response── │ │
└─────────┘ response └──────────┘ └─────────────────────┘
│
AI never sees │ passwords, keys,
│ tokens, or secrets
特性
多协议代理
| 协议 | 工具 | 它的作用 |
|---|---|---|
| 超文本传输协议 | http_request |
使用承载令牌、基本身份验证或mTLS证书的REST API调用 |
| 安全外壳协议 | ssh_exec |
使用SSH密钥或密码执行远程命令 |
| 结构化查询语言 | sql_query |
PostgreSQL、MySQL、SQLite上的数据库查询 |
| SMTP | send_email |
通过任何SMTP服务器发送电子邮件 |
加密保险库
- AES-256-GCM 每个凭证的身份验证加密
- Argon2d 密钥推导(64MiB内存,3次迭代,4次并行)
- 每个凭证的唯一随机非数
- 通过锁定从内存中清零加密密钥
zeroize
8凭证类型
| 类型 | 用例 |
|---|---|
| 密码 | Web登录,基本身份验证 |
| API令牌 | 承载令牌,API密钥 |
| SSH密钥 | 公钥身份验证 |
| SSH密码 | 基于密码的SSH |
| 数据库连接 | PostgreSQL、MySQL、SQLite |
| 证书 | mTLS,客户端证书 |
| SMTP帐户 | 电子邮件发送 |
| 自定义 | 任何键值机密 |
输出消毒
每个代理响应都会清除其中的凭据值 6种编码变体 在到达AI之前:
- 原始字符串,Base64(标准+URL安全),URL编码,十六进制(下+上)
策略引擎
根据凭证规则限制AI可以做什么:
- URL模式 --
https://api.github.com/* - SSH命令模式 --
ls *,cat *(阻止危险命令) - SQL只读模式 --块插入、更新、删除、删除
- SMTP收件人限制 --
*@company.com - 速率限制 --每个凭证滑动窗口
环境类别
按以下方式组织证书: local | development | staging | production
审计跟踪
记录到的每个操作 ~/.passman/audit.jsonl:
- 时间戳、使用的凭证、调用的工具、成功/失败、命令详细信息
桌面图形用户界面
Tauri v2+React应用程序,用于可视化凭证管理:
- 使用vault创建解锁屏幕
- 带有过滤功能的凭证浏览器
- 特定类型的凭据编辑器
- 策略配置
- 审核日志查看器
安全模型
┌─────────────────────────────────────────────────────────┐
│ 6 LAYERS OF DEFENSE │
├─────────────────────────────────────────────────────────┤
│ 1. NO RAW SECRET ACCESS No tool returns secret values │
│ 2. OUTPUT SANITIZATION 6 encoding variants scrubbed │
│ 3. POLICY ENGINE Per-credential allow/deny │
│ 4. RATE LIMITING Sliding window per credential │
│ 5. AUDIT TRAIL Every operation logged │
│ 6. MEMORY SAFETY zeroize-on-drop for all keys │
└─────────────────────────────────────────────────────────┘
快速开始
安装
# One command — downloads pre-built binary, no Rust required
curl -fsSL https://raw.githubusercontent.com/ahmadzein/passman/main/install.sh | bash
或者从源代码构建:
git clone https://github.com/ahmadzein/passman.git
cd passman
cargo build --release -p passman-mcp-server
cp target/release/passman-mcp-server ~/.local/bin/
AI可读参考: 看
skill.md为AI代理优化的完整工具参考。
配置您的AI客户端
Claude Code
claude mcp add --transport stdio passman -- ~/.local/bin/passman-mcp-server
或添加到 .mcp.json:
{
"mcpServers": {
"passman": {
"command": "~/.local/bin/passman-mcp-server",
"args": [],
"transport": "stdio"
}
}
}
Cursor
在光标设置>MCP服务器中:
{
"mcpServers": {
"passman": {
"command": "~/.local/bin/passman-mcp-server"
}
}
}
VS Code (Copilot)
在 .vscode/mcp.json:
{
"servers": {
"passman": {
"type": "stdio",
"command": "~/.local/bin/passman-mcp-server"
}
}
}
Claude Desktop
在 claude_desktop_config.json:
{
"mcpServers": {
"passman": {
"command": "~/.local/bin/passman-mcp-server",
"args": []
}
}
}
Windsurf
在MCP配置中:
{
"mcpServers": {
"passman": {
"command": "~/.local/bin/passman-mcp-server",
"args": []
}
}
}
用它
You: "Unlock my vault"
AI: vault_unlock({password: "..."}) → Vault unlocked. 5 credentials.
You: "List my credentials"
AI: credential_list() → [{name: "GitHub Token", kind: "api_token"}, ...]
You: "Use my GitHub token to check my repos"
AI: http_request({credential_id: "abc-123", method: "GET", url: "https://api.github.com/user/repos"})
→ {status: 200, body: [{name: "my-project", ...}]}
// Token was injected server-side. AI never saw it.
You: "SSH into prod and check nginx status"
AI: ssh_exec({credential_id: "def-456", command: "systemctl status nginx"})
→ {exit_code: 0, stdout: "● nginx.service - active (running)..."}
// Password/key never exposed.
14 MCP工具
| 类别 | 工具 | 描述 |
|---|---|---|
| 金库 | vault_unlock |
使用主密码解锁保险库 |
vault_lock |
锁保险库,记忆中的零键 | |
vault_status |
检查保险库状态 | |
| 发现 | credential_list |
列出凭据(可筛选) |
credential_search |
按名称、标签、注释搜索 | |
credential_info |
获取凭证元数据(无秘密) | |
| 存储 | credential_store |
存储新凭据 |
credential_delete |
删除凭据 | |
| 代理 | http_request |
经过身份验证的HTTP请求 |
ssh_exec |
SSH命令执行 | |
sql_query |
数据库查询(Postgres/MySQL/SQLite) | |
send_email |
通过SMTP发送电子邮件 | |
| 审计 | audit_log |
查看使用历史记录 |
建筑
passman/
├── crates/
│ ├── passman-types/ # Shared types, enums, traits
│ ├── passman-vault/ # Encrypted vault: crypto, CRUD, audit
│ ├── passman-proxy/ # Protocol proxies + output sanitizer
│ └── passman-mcp/ # MCP server (rmcp), 14 tools, policy engine
├── bins/
│ └── passman-mcp-server/ # Standalone MCP binary (stdio transport)
├── app/ # Tauri v2 + React desktop app
└── skill.md # AI-readable feature reference
技术栈
| 组件 | 技术 |
|---|---|
| 语言 | Rust |
| MCP SDK | rmcp 0.15+ |
| 加密 | aes gcm+argon2 |
| HTTP代理 | reqwest |
| SSH代理 | russh |
| SQL代理 | sqlx(任何驱动程序) |
| SMTP代理 | lettre |
| 桌面GUI | Tauri v2+React |
| 内存安全 | 清零+保密 |
桌面图形用户界面
一款功能齐全的桌面应用程序,用于可视化凭证管理,使用Tauri v2+React构建。与MCP服务器共享同一保管库。
下载
下载自 GitHub发布:
| 平台 | 格式 |
|---|---|
| macOS(苹果硅) | .dmg |
| macOS(英特尔) | .dmg |
| 窗户 | .exe 安装程序, .msi |
| Linux | .AppImage, .deb, .rpm |
macOS: 安装后,运行此命令一次以绕过Gatekeeper(该应用程序未使用Apple Developer证书签名):
xattr -cr /Applications/Passman.app
或者通过CLI安装程序进行安装:
curl -fsSL https://raw.githubusercontent.com/ahmadzein/passman/main/install.sh | GUI=1 bash
从源代码构建
cd app
npm install
npm run tauri dev # Development
npm run tauri build # Production build
屏幕
解锁| Vault浏览器|凭据编辑器|策略编辑器|审核日志|设置
注: GUI和MCP服务器共享同一个保险库
~/.passman/vault.json一个的变化在另一个中立即可见。
运行测试
cargo test --workspace # All unit tests
文件位置
| 文件 | 目的 |
|---|---|
~/.passman/vault.json |
加密凭证保管库 |
~/.passman/audit.jsonl |
仅附加审核日志 |
为什么是帕斯曼?
| Passman | Janee | mcp秘密库 | 1密码 op run |
谷歌工具箱 | |
|---|---|---|---|---|---|
| 协议 | HTTP+SSH+SQL+SMTP | 仅限HTTP | HTTP(仅限GET/POST) | 仅限环境变量 | 仅限SQL |
| 凭证代理 | 完整代理 | HTTP代理 | HTTP代理人 | Env注入 | SQL代理 |
| 加密保管库 | AES-256-GCM | AES-256-GCSM | 仅限环境变量 | 1密码库 | 配置文件 |
| 输出净化 | 6种编码 | 基本(8+个字符) | 基本 | stdout掩码 | 无 |
| 自托管 | 是(本地优先) | 是 | 是 | 需要1Password | 谷歌云偏见 |
| 桌面图形用户界面 | Tauri+React | 否 | 否 | 1密码应用程序 | 否 |
| 开源 | 麻省理工学院 | MIT | 专有 | Apache 2.0 | |
| 策略引擎 | 按凭据规则 | 按功能 | 按秘密域 | 无 | 数据库权限 |
| 成本 | 免费 | 免费 | 免费 | 3-8美元/月 | 免费 |
贡献
欢迎投稿!请先打开一个问题,讨论您想更改的内容。
# Development setup
git clone https://github.com/ahmadzein/passman.git
cd passman
cargo build
cargo test --workspace
许可证
麻省理工学院 -用它,叉它,在它上面建造。
用Rust构建。通过设计确保安全。永远开源。
