Creating the Service Account
Secret Template
Template = Schema
A template defines what fields a secret stores. For service accounts, you need more than username + password — you need ownership, scope, and dependency metadata.
Template = Behavior
The template also binds the password changer, heartbeat configuration, and launcher — defining how Secret Server manages credentials, not just what it stores.
One Template, Consistent Governance
All service accounts vaulted under the same template will share the same rotation policies, heartbeat schedules, and audit behavior. Consistency is the goal.
Service Account — Windows (Managed).| Field Name | Type | Required | Purpose |
|---|---|---|---|
| Domain | Text | Yes | FQDN of the account's domain (pre-populated by discovery import) |
| Username | Text | Yes | SamAccountName — the core identifier |
| Password | Password | Yes | Encrypted credential field — binds to the password changer |
| Application Owner | Text | Yes | Name/team responsible for the associated application |
| Supporting Application | Text | Yes | Application or service this account authenticates |
| Notes | Notes | No | Rotation impact notes, exception rationale, etc. |
| Dependency Count | Text | No | Informational — number of mapped dependencies |
Service Account — Standard Policy with: Requires approval for view (Owners exempt), auto-change password enabled, heartbeat enabled, and expiration interval of 90 days. This policy will apply automatically to every secret created from this template.Vaulting the
Credential
CORP\svc_sqlprod01). Click Add Secret. A wizard opens. Select your custom template: Service Account — Windows (Managed).Service Accounts → [Domain] → [Application Team]. Assign the secret Owner to the application team group (not an individual). Set View/Edit permissions for the PAM team. Do not leave the secret in the root folder — folder-level policies and permissions are the primary governance control.# Recommended structure — apply permissions at each level Service Accounts/ ├── CORP.CONTOSO.COM/ │ ├── Database/ # Owned by: DBA Team group │ │ ├── svc_sqlprod01 ● Vaulted ✓ │ │ ├── svc_sqlagent02 ● Vaulted ✓ │ │ └── svc_ssrs_report ● Vaulted ✓ │ ├── Web Platform/ # Owned by: Web Ops group │ │ ├── svc_iiswebapp ● Vaulted ✓ │ │ └── svc_appcache ● Vaulted ✓ │ ├── Identity/ # Owned by: Identity Team group │ │ └── svc_adconnect ● Vaulted ✓ │ └── _Orphaned/ # Quarantine folder — pending investigation │ └── svc_legacy_backup ● Under Review
| Role | View Secret | Edit Secret | Rotate Password | View Password |
|---|---|---|---|---|
| PAM Admin Team | ✓ Yes | ✓ Yes | ✓ Yes | ✓ Yes |
| Application Owner (Group) | ✓ Yes | Limited | With Approval | With Approval |
| Auditors | ✓ Yes | ✗ No | ✗ No | ✗ No |
| Helpdesk | ✗ No | ✗ No | ✗ No | ✗ No |
| Service (API/automation) | API Only | ✗ No | ✗ No | API Only |
Configuring the
Password Changer
Generates New
Password
to DC via
LDAP/ADSI
Changed
on Account
Written to
Vault
Updated
(Ch. 04)
Confirms
Success
# 1. Verify Distributed Engine site assignment Admin → Distributed Engine → Engine Sites — Confirm the engine for the target subnet is assigned and Online # 2. Test DC connectivity from the engine host Test-NetConnection dc01.corp.contoso.com -Port 389 # LDAP Test-NetConnection dc01.corp.contoso.com -Port 636 # LDAPS Test-NetConnection dc01.corp.contoso.com -Port 3268 # GC # 3. Verify the RPC privileged account has "Reset Password" right Get-ACL "AD:\CN=svc_sqlprod01,OU=ServiceAccounts,DC=corp,DC=contoso,DC=com" | Select-Object -ExpandProperty Access | Where-Object { $_.ActiveDirectoryRights -match "ExtendedRight" }
# List all FGPPs and the accounts/groups they apply to Get-ADFineGrainedPasswordPolicy -Filter * | Select-Object Name, MinPasswordLength, PasswordHistoryCount, MaxPasswordAge, Precedence | Format-Table -AutoSize # Check which FGPP applies to a specific account Get-ADUserResultantPasswordPolicy -Identity svc_sqlprod01
| Setting | Location | Recommended Value |
|---|---|---|
| RPC Timeout | Admin → Remote Password Changing → Timeout | 120 seconds (default: 30) |
| Dependency Timeout Per Host | Admin → Discovery → Dependency Timeout | 60 seconds |
| Max Concurrent Dependencies | Engine Site settings | 10 (reduce if hosts are slow) |
Mapping Account
Dependencies
Windows Services
Services with "Log on as" configured to a domain account. Password stored in the Windows Services Control Manager (SCM). Secret Server updates SCM directly on rotation.
IIS Application Pools
Pools with identity type "Custom Account." Password stored in the IIS configuration (applicationHost.config). SS writes the new password to IIS and recycles the pool.
Scheduled Tasks
Tasks with "Run As" set to a domain account. Credential stored in the Windows Credential Manager on the host. SS uses the Task Scheduler API to update the stored credential.
COM+ / DCOM Applications
Older middleware components with a configured identity. Less common in modern environments but present in legacy infrastructure. SS uses the COM+ catalog API.
| Dependency Type | SS Template Name | Required Rights on Target | Restart Behavior |
|---|---|---|---|
| Windows Service | Windows Service | Local Admin or Service Control Manager rights | Service is stopped, credential updated, service restarted |
| IIS Application Pool | IIS App Pool | Local Admin on IIS host | Pool is stopped, credential updated, pool started |
| Scheduled Task | Scheduled Task | Local Admin or Task Scheduler access | Task is paused, credential updated — does NOT restart task |
| COM+ Application | Windows COM+ | Local Admin | Application stopped, updated, restarted |
| PowerShell Script | PowerShell Script | WinRM / remote execution rights | Custom — defined by the script |
| SSH Command | SSH | SSH access to host | Custom command sequence |
Configuring
Heartbeat
Out-of-Band Change Alert
If someone resets the AD password manually (ADUC, PowerShell, etc.), heartbeat will detect the mismatch within its configured interval and raise an alert — before the next rotation cycle.
Continuous Validation
Even without a rotation event, heartbeat confirms the vaulted credential still works. Catches account lockouts, disablements, and unexpected domain policy changes.
Compliance Evidence
Heartbeat logs provide auditable proof that credentials were continuously validated — a key requirement for PCI-DSS, SOC 2, and NIST 800-53 controls.
# Search Security log for password change events on a specific account Get-WinEvent -ComputerName dc01 -FilterHashtable @{ LogName = 'Security' Id = 4723, 4724 # 4723=self, 4724=admin reset StartTime = (Get-Date).AddDays(-7) } | Where-Object {$_.Message -match 'svc_sqlprod01'} | Select-Object TimeCreated, Id, Message | Format-List
If unauthorized change (potential breach): Escalate to security. Do not simply resync. Treat as a security incident — investigate who changed it, review all systems this account touches, and follow your incident response playbook.
Module 04 Complete
You've walked through the complete end-to-end lifecycle for bringing a service account under PAM management — from template design and initial vaulting through rotation automation, dependency mapping, and continuous heartbeat validation. These five chapters form the operational foundation for every service account your organization vaults in Delinea Secret Server.