implementing-delinea-secret-server-for-pam
为特权访问管理(PAM)实施 Delinea Secret Server,包括 密钥库配置、基于角色的访问策略、自动密码轮换、 会话录制,以及与 Active Directory 和云平台的集成。 适用于 PAM 部署、特权凭据保管、 密钥服务器管理或密码轮换自动化相关请求。
Best use case
implementing-delinea-secret-server-for-pam is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
为特权访问管理(PAM)实施 Delinea Secret Server,包括 密钥库配置、基于角色的访问策略、自动密码轮换、 会话录制,以及与 Active Directory 和云平台的集成。 适用于 PAM 部署、特权凭据保管、 密钥服务器管理或密码轮换自动化相关请求。
Teams using implementing-delinea-secret-server-for-pam should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/implementing-delinea-secret-server-for-pam/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How implementing-delinea-secret-server-for-pam Compares
| Feature / Agent | implementing-delinea-secret-server-for-pam | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
为特权访问管理(PAM)实施 Delinea Secret Server,包括 密钥库配置、基于角色的访问策略、自动密码轮换、 会话录制,以及与 Active Directory 和云平台的集成。 适用于 PAM 部署、特权凭据保管、 密钥服务器管理或密码轮换自动化相关请求。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 使用 Delinea Secret Server 实施 PAM
## 适用场景
- 组织需要跨混合基础设施集中管理特权凭据
- 合规要求强制执行特权访问控制(SOX、PCI-DSS、HIPAA、NIST 800-53)
- 服务账户和共享凭据存储在电子表格或明文文件中
- 需要为特权账户实施自动密码轮换
- 需要对特权用户活动进行会话录制和键盘记录
- 正在从手动 PAM 流程迁移到企业级密钥库解决方案
**不适用于**标准终端用户密码管理;Delinea Secret Server 专为需要企业级控制的特权账户和共享账户凭据管理而设计。
## 前置条件
- Delinea Secret Server 许可证(本地部署或云端)
- 本地部署需要 Windows Server 2019/2022,并安装 IIS 和 SQL Server
- 具有读取权限的 Active Directory 服务账户(用于发现)
- 用于 Web 界面加密的 SSL/TLS 证书
- 与目标系统的网络连接(用于密码轮换)
- PowerShell 5.1+ 用于自动化脚本
## 工作流程
### 步骤 1:部署 Secret Server 基础设施
安装和配置 Secret Server 应用服务器:
```powershell
# 本地部署预安装检查
# 验证 IIS 是否安装了所需功能
Import-Module ServerManager
Install-WindowsFeature Web-Server, Web-Asp-Net45, Web-Windows-Auth, Web-Mgmt-Console
# 验证 SQL Server 连接
$sqlConn = New-Object System.Data.SqlClient.SqlConnection
$sqlConn.ConnectionString = "Server=sql01.corp.local;Database=master;Integrated Security=True"
$sqlConn.Open()
Write-Host "SQL Server 连接成功:$($sqlConn.ServerVersion)"
$sqlConn.Close()
# 创建 Secret Server 数据库
Invoke-Sqlcmd -ServerInstance "sql01.corp.local" -Query @"
CREATE DATABASE SecretServer
GO
ALTER DATABASE SecretServer SET RECOVERY FULL
GO
"@
# 下载并运行 Secret Server 安装程序
# 访问 https://thy.center/ss/link/SSDownload 获取最新版本
# 运行 setup.exe 并按照安装向导操作
# 安装后:配置应用程序池
Import-Module WebAdministration
Set-ItemProperty "IIS:\AppPools\SecretServer" -Name processModel.identityType -Value SpecificUser
Set-ItemProperty "IIS:\AppPools\SecretServer" -Name processModel.userName -Value "CORP\svc-secretserver"
```
### 步骤 2:配置密钥模板和文件夹结构
定义密钥模板并组织库层次结构:
```powershell
# 连接到 Secret Server API
$baseUrl = "https://pam.corp.local/SecretServer"
$creds = @{
username = "ss-admin"
password = $env:SS_ADMIN_PASSWORD
grant_type = "password"
}
$token = (Invoke-RestMethod "$baseUrl/oauth2/token" -Method POST -Body $creds).access_token
$headers = @{ Authorization = "Bearer $token" }
# 创建用于组织密钥的文件夹结构
$folders = @(
@{ folderName = "Windows 服务器"; parentFolderId = -1; inheritPermissions = $false },
@{ folderName = "Linux 服务器"; parentFolderId = -1; inheritPermissions = $false },
@{ folderName = "网络设备"; parentFolderId = -1; inheritPermissions = $false },
@{ folderName = "云账户"; parentFolderId = -1; inheritPermissions = $false },
@{ folderName = "服务账户"; parentFolderId = -1; inheritPermissions = $false },
@{ folderName = "数据库账户"; parentFolderId = -1; inheritPermissions = $false }
)
foreach ($folder in $folders) {
Invoke-RestMethod "$baseUrl/api/v1/folders" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($folder | ConvertTo-Json)
}
# 为数据库凭据创建自定义密钥模板
$template = @{
name = "数据库凭据"
fields = @(
@{ name = "服务器"; isRequired = $true; fieldType = "Text" },
@{ name = "端口"; isRequired = $true; fieldType = "Text" },
@{ name = "数据库"; isRequired = $true; fieldType = "Text" },
@{ name = "用户名"; isRequired = $true; fieldType = "Text" },
@{ name = "密码"; isRequired = $true; fieldType = "Password" },
@{ name = "连接字符串"; isRequired = $false; fieldType = "Notes" }
)
}
Invoke-RestMethod "$baseUrl/api/v1/secret-templates" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($template | ConvertTo-Json -Depth 3)
```
### 步骤 3:配置发现和账户入库
设置跨环境自动发现特权账户:
```powershell
# 配置 Active Directory 发现源
$adDiscovery = @{
name = "企业 AD 发现"
discoverySourceType = "ActiveDirectory"
active = $true
settings = @{
domainName = "corp.local"
friendlyName = "企业域"
discoveryAccountId = 12 # 服务账户密钥 ID
ouFilters = @(
"OU=Servers,DC=corp,DC=local",
"OU=Workstations,DC=corp,DC=local"
)
}
scanInterval = 86400 # 24 小时
}
Invoke-RestMethod "$baseUrl/api/v1/discovery" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($adDiscovery | ConvertTo-Json -Depth 3)
# 为 Windows 服务器配置本地账户发现
$localDiscovery = @{
name = "Windows 本地账户发现"
discoverySourceType = "Machine"
active = $true
settings = @{
machineType = "Windows"
accountScanTemplate = "Windows 本地账户"
dependencyScanTemplate = "Windows 服务"
}
}
Invoke-RestMethod "$baseUrl/api/v1/discovery" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($localDiscovery | ConvertTo-Json -Depth 3)
# 将发现的账户导入为密钥
# 发现运行后,审查并导入找到的账户
$discoveredAccounts = Invoke-RestMethod "$baseUrl/api/v1/discovery/status" -Headers $headers
Write-Host "已发现 $($discoveredAccounts.totalAccounts) 个账户"
Write-Host " - 域管理员:$($discoveredAccounts.domainAdmins)"
Write-Host " - 本地管理员:$($discoveredAccounts.localAdmins)"
Write-Host " - 服务账户:$($discoveredAccounts.serviceAccounts)"
```
### 步骤 4:实施密码轮换策略
配置带复杂度要求的自动密码轮换:
```powershell
# 创建密码轮换策略
$rotationPolicy = @{
name = "高安全性 30 天轮换"
rotationIntervalDays = 30
passwordRequirements = @{
minimumLength = 24
maximumLength = 32
requireUpperCase = $true
requireLowerCase = $true
requireNumbers = $true
requireSymbols = $true
allowedSymbols = "!@#$%^&*()-_=+[]{}|;:,.<>?"
}
rotationType = "AutoChange"
autoChangeSchedule = @{
changeType = "RecurringSchedule"
recurrenceType = "Monthly"
dayOfMonth = 1
startTime = "02:00"
}
}
Invoke-RestMethod "$baseUrl/api/v1/remote-password-changing/configuration" -Method POST `
-Headers $headers -ContentType "application/json" -Body ($rotationPolicy | ConvertTo-Json -Depth 4)
# 为 Windows 账户配置远程密码更改(RPC)
$rpcConfig = @{
secretId = 100 # 目标密钥
autoChangeEnabled = $true
autoChangeNextPassword = $true
privilegedAccountSecretId = 50 # 用于执行更改的账户
changePasswordUsing = "PrivilegedAccount"
}
Invoke-RestMethod "$baseUrl/api/v1/secrets/100/remote-password-changing" -Method PUT `
-Headers $headers -ContentType "application/json" -Body ($rpcConfig | ConvertTo-Json)
# 配置心跳监控以验证凭据有效性
$heartbeat = @{
enabled = $true
intervalMinutes = 60
onFailure = "SendAlert"
alertEmailGroupId = 5
}
Invoke-RestMethod "$baseUrl/api/v1/secrets/100/heartbeat" -Method PUT `
-Headers $headers -ContentType "application/json" -Body ($heartbeat | ConvertTo-Json)
```
### 步骤 5:配置会话录制和监控
为特权访问会话启用会话录制:
```powershell
# 启用会话录制策略
$sessionPolicy = @{
name = "完整录制策略"
recordSessions = $true
recordKeystrokes = $true
recordApplications = $true
maxSessionDurationMinutes = 480
requireComment = $true
requireTicketNumber = $true
ticketSystemId = 1 # ServiceNow 集成
settings = @{
videoCodec = "H264"
videoQuality = "High"
captureInterval = 1000 # 毫秒
storageLocation = "\\\\fileserver\\SSRecordings"
retentionDays = 365
}
}
Invoke-RestMethod "$baseUrl/api/v1/secret-policy" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($sessionPolicy | ConvertTo-Json -Depth 3)
# 为 RDP 会话配置会话启动器
$rdpLauncher = @{
launcherType = "RDP"
enableRecording = $true
enableDualControl = $true
approverGroupId = 10 # 安全团队组
connectAsSecretId = 100
settings = @{
useSSL = $true
restrictedEndpoints = @("192.168.1.0/24")
inactivityTimeout = 30 # 分钟
}
}
Invoke-RestMethod "$baseUrl/api/v1/launchers" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($rdpLauncher | ConvertTo-Json -Depth 3)
# 配置双重控制/审批工作流
$approvalWorkflow = @{
name = "Tier-0 账户审批"
requireApproval = $true
approvers = @(
@{ groupId = 10; requiredApprovals = 1 }
)
accessRequestExpirationMinutes = 60
notifyOnApproval = $true
notifyOnDenial = $true
}
```
### 步骤 6:与 SIEM 和合规报告集成
将 Secret Server 事件连接到安全监控:
```powershell
# 配置 Syslog 转发到 SIEM
$syslogConfig = @{
enabled = $true
syslogServer = "siem.corp.local"
port = 514
protocol = "TLS"
facility = "Auth"
severity = "Informational"
events = @(
"SecretView", "SecretEdit", "SecretCreate", "SecretDelete",
"PasswordChange", "PasswordChangeFailure",
"SessionStart", "SessionEnd",
"LoginFailure", "LoginSuccess",
"PermissionChange", "ApprovalRequest"
)
}
Invoke-RestMethod "$baseUrl/api/v1/configuration/syslog" -Method PUT -Headers $headers `
-ContentType "application/json" -Body ($syslogConfig | ConvertTo-Json -Depth 2)
# 生成合规报告
$report = @{
reportType = "PasswordCompliance"
dateRange = @{
startDate = (Get-Date).AddDays(-30).ToString("yyyy-MM-dd")
endDate = (Get-Date).ToString("yyyy-MM-dd")
}
filters = @{
folderIds = @(1, 2, 3, 4, 5, 6)
includeSubFolders = $true
}
}
$reportResult = Invoke-RestMethod "$baseUrl/api/v1/reports" -Method POST -Headers $headers `
-ContentType "application/json" -Body ($report | ConvertTo-Json -Depth 3)
# 显示合规摘要
Write-Host "PAM 合规报告"
Write-Host "====================="
Write-Host "密钥总数: $($reportResult.totalSecrets)"
Write-Host "轮换合规: $($reportResult.rotationCompliant) ($($reportResult.rotationCompliancePct)%)"
Write-Host "心跳健康: $($reportResult.heartbeatHealthy) ($($reportResult.heartbeatHealthyPct)%)"
Write-Host "密码超龄 > 90 天: $($reportResult.passwordAgeViolations)"
Write-Host "孤儿账户: $($reportResult.orphanedAccounts)"
```
## 核心概念
| 术语 | 定义 |
|------|------|
| **特权访问管理(PAM)** | 通过凭据保管和会话管理来控制、监控和审计对关键系统和数据的提升访问的安全框架 |
| **密钥(Secret)** | 库中存储的凭据或敏感数据项,包括密码、SSH 密钥、API 令牌和证书 |
| **远程密码更改(RPC)** | 无需人工干预,根据定义的策略连接到目标系统轮换密码的自动化机制 |
| **心跳(Heartbeat)** | 定期检查以验证存储的凭据与目标系统的一致性,确保库内容保持同步和可用 |
| **双重控制(Dual Control)** | 在授予对高度敏感密钥的访问权限之前,需要第二个授权用户批准的安全机制 |
| **发现(Discovery)** | 跨 Active Directory、服务器和网络设备自动扫描基础设施,识别特权账户、服务账户和依赖关系 |
| **会话录制(Session Recording)** | 捕获完整的特权会话活动,包括视频、键盘输入和应用程序使用情况,用于审计和取证审查 |
## 工具与系统
- **Delinea Secret Server**:企业级 PAM 解决方案,提供凭据保管、密码轮换、会话录制和特权访问工作流
- **Delinea Distributed Engine**:部署在网络分段中的代理,用于跨防火墙环境实现密码更改和发现
- **Secret Server REST API**:用于程序化密钥管理、自动化以及与 DevOps 流水线集成的 RESTful API
- **Secret Server SDK**:用于应用程序级 Secret Server 库集成的 .NET 和 PowerShell SDK
## 常见场景
### 场景:将共享管理员凭据迁移到库
**背景**:一个组织将 500+ 个共享管理员凭据存储在 Excel 电子表格和密码保护文档中。审计人员将此标记为需要在 90 天内整改的关键发现。
**处理方式**:
1. 使用 SQL Server 后端部署 Secret Server 并配置 HTTPS 访问
2. 设计反映组织结构的文件夹层次(按部门、系统类型、环境)
3. 创建与正在使用的凭据类型匹配的密钥模板(Windows、Linux、数据库、网络设备)
4. 通过 CSV 导入或 PowerShell 批量创建导入现有凭据
5. 配置发现以查找 AD 和本地系统中未记录的特权账户
6. 从非生产账户开始启用远程密码更改以验证轮换
7. 推出会话启动器,替换直接的 RDP/SSH 连接
8. 逐步为 Tier-0 账户(域管理员、root 账户)启用双重控制
9. 配置 SIEM 集成和合规报告以提供审计证据
**注意事项**:
- 启用密码轮换前未识别所有服务账户依赖关系(会导致服务中断)
- 未先在非生产环境测试就为生产账户启用 RPC
- 为需要协调重启的服务账户设置的轮换间隔太短
- 未为防火墙隔离的网络分段配置 Distributed Engine
## 输出格式
```
DELINEA SECRET SERVER PAM 部署报告
=============================================
环境: 混合(本地 + Azure)
版本: Secret Server 11.6
部署模式: 本地(高可用性)
库统计
密钥总数: 1,247
Windows 凭据: 523
Linux/SSH 密钥: 312
数据库账户: 198
网络设备: 87
云 API 密钥: 127
密码轮换状态
自动更改已启用: 1,089 / 1,247 (87.3%)
轮换合规: 1,056 / 1,089 (97.0%)
心跳健康: 1,198 / 1,247 (96.1%)
轮换失败(30 天):12
会话管理
活跃会话: 23
录制会话(30 天):4,567
平均会话时长: 22 分钟
审批请求(30 天):189(174 已批准,15 已拒绝)
发现结果
扫描系统: 2,340
发现账户: 3,891
已入库: 1,247 (32.1%)
待审查: 892
合规性
SOX 控制满足: 12/12
PCI-DSS 要求: 8/8
密码超龄违规: 3(整改中)
```Related Skills
securing-serverless-functions
本技能涵盖 AWS Lambda、Azure Functions 和 Google Cloud Functions 等无服务器计算平台的安全加固,涉及最小权限 IAM 角色、依赖漏洞扫描、密钥管理集成、输入验证、函数 URL 认证以及运行时监控,以防范注入攻击、凭证窃取和供应链攻击。
securing-historian-server-in-ot-environment
本技能涵盖在OT环境中加固和保护过程历史数据服务器(OSIsoft PI、Honeywell PHD、GE Proficy、AVEVA Historian)。涉及跨Purdue模型各层级的网络部署、历史数据服务器接口的访问控制、通过数据二极管或PI-to-PI连接器在DMZ中进行数据复制、历史数据查询中的SQL注入防护,以及用于安全分析、法规报告和过程优化的过程数据完整性保护。
performing-serverless-function-security-review
对 AWS Lambda、Azure Functions 和 GCP Cloud Functions 中的无服务器函数(Serverless Function)执行安全审查,识别过度宽松的执行角色(Execution Role)、不安全的环境变量、注入漏洞和缺失的运行时保护措施。
implementing-zero-trust-with-hashicorp-boundary
使用 HashiCorp Boundary 实现具备动态凭据代理、会话录制和 Vault 集成的身份感知零信任基础设施访问管理。
implementing-zero-trust-with-beyondcorp
使用身份感知代理(IAP,Identity-Aware Proxy)、上下文感知访问策略、设备信任验证和 Access Context Manager,部署 Google BeyondCorp Enterprise 零信任访问控制,对 GCP 资源和内部应用强制执行基于身份和安全态势的访问。
implementing-zero-trust-network-access
通过配置身份感知代理、微分段、基于条件访问策略的持续验证,以及在 AWS、Azure 和 GCP 环境中以 BeyondCorp 风格的架构替代传统 VPN 访问,在云环境中实施零信任网络访问(ZTNA)。
implementing-zero-trust-network-access-with-zscaler
使用 Zscaler 实施零信任网络访问(Zero Trust Network Access,ZTNA),通过 Zscaler Private Access(ZPA)配置应用分段、访问策略和连接器,替代传统 VPN 架构
implementing-zero-trust-in-cloud
本技能指导组织按照 NIST SP 800-207 和 Google BeyondCorp 原则在云环境中实施零信任(Zero Trust)架构,涵盖以身份为中心的访问控制、微分段(Micro-Segmentation)、持续验证、设备信任评估,以及部署身份感知代理(Identity-Aware Proxy)以消除 AWS、Azure 和 GCP 环境中的隐式网络信任。
implementing-zero-trust-for-saas-applications
使用 CASB、SSPM、条件访问策略、OAuth 应用治理和会话控制,为 SaaS 应用实施零信任访问控制, 对云托管服务强制执行身份验证、设备合规性检查和数据保护。
implementing-zero-trust-dns-with-nextdns
将 NextDNS 实施为零信任 DNS 过滤层,提供加密解析、威胁情报阻断、隐私保护,以及跨所有端点的组织策略执行。
implementing-zero-standing-privilege-with-cyberark
部署 CyberArk Secure Cloud Access,通过基于时间、权限和审批控制的即时访问,在混合云和多云环境中消除常设权限。
implementing-zero-knowledge-proof-for-authentication
零知识证明(ZKP)允许证明者在不泄露秘密本身的情况下证明对某个秘密(如密码或私钥)的了解。本技能实现 Schnorr 身份识别协议和使用离散对数问题的简化 ZKPP,使服务器永远不需要获取用户密码即可完成认证。