SpnManager Kerberos SPN auditing and repair for Active Directory

Get-IisSpnCandidate

As a manager, the Get-IisSpnCandidate command from the SpnManager module provides valuable insights into IIS site bindings and their associated HTTP SPN ca...

As a manager, the Get-IisSpnCandidate command from the SpnManager module provides valuable insights into IIS site bindings and their associated HTTP SPN candidates. This information is crucial for ensuring proper Kerberos authentication and authorization in your organization.

  • Who uses this: IT administrators, security engineers, and DevOps teams responsible for configuring and managing IIS sites.
  • Risks:
    • Inadequate or incorrect configuration of IIS site bindings can lead to authentication failures and security breaches.
    • Failure to detect and correct SPN issues can result in delayed troubleshooting and resolution.
  • When a manager cares: During:
    • Initial setup and configuration of new IIS sites.
    • Periodic reviews and updates of existing IIS configurations.
    • Incident response and root cause analysis for authentication-related issues.

To use Get-IisSpnCandidate, follow these steps:

  1. Ensure the SpnManager module is installed on your system.
  2. Connect to an IIS server or a remote PowerShell session using the -Bindings parameter for test injection:
$bindings = @(
    [PSCustomObject]@{
        HostHeader = "example.com"
        Port       = 80
        AppPoolAccount = "myapppoolaccount"
    },
    [PSCustomObject]@{
        HostHeader = ""
        Port       = 8080
        AppPoolAccount = "anotheraccount"
    }
)
Get-IisSpnCandidate -Bindings $bindings
  1. Monitor for output indicating potential SPN issues:
SPN Candidates:
+ http/example.com
+ http/example.com:80

Get-IisSpnCandidate helps detect IIS site bindings and identifies potential HTTP SPN candidates. Follow these simple steps to use this command:

  1. Install the SpnManager module on your system.
  2. Connect to an IIS server or a remote PowerShell session.
  3. Use the -Bindings parameter for test injection (optional).
  4. Run Get-IisSpnCandidate to get the SPN candidates.

If you encounter issues, ensure:

  • The SpnManager module is installed correctly.
  • You have the necessary permissions to access IIS configurations.
  • The input bindings are formatted correctly.
Field Value
Vendor Detent Point LLC
Product SpnManager 0.4.0
Licence Proprietary - licensed, not sold. See LICENSE.
Operational impact Read-only. Queries Active Directory and reports findings; changes nothing.
Rights required Directory read access. Some providers additionally need rights to read delegation and encryption-type attributes.
Providers covered AD.IIS
Approval recommendation Approve for general operational use. It cannot alter directory state.

Licence terms are proprietary and are supplied with the purchase, subscription or evaluation agreement. No open-source licence is granted.

What Why
Windows PowerShell 5.1 or later Declared by the module manifest.
ActiveDirectory 1.0.0.0 Required module. Ships with RSAT; install the Active Directory PowerShell feature.
A reachable domain controller Every provider reads from Active Directory.
An account with directory read access Needed to enumerate accounts and their SPNs.

Data handling and compliance requirements:

  • Data transit: This command does not transmit sensitive data.
  • Data at rest: The output is stored in memory only; no files are created or modified.
  • Audit trail: Log entries are generated only for errors and warnings.
  • Compliance requirements:
    • DR-563: Default Windows Kerberos clients request HTTP/ with no port.
    • GR-522: Multiple bindings sharing the same app pool account are grouped into a single candidate.

This is the sense step. It reads the current state and produces a candidate; nothing is changed. Its output is normally piped into New-IisSpnPlan. Providers: AD.IIS.

Example 1

Get-IisSpnCandidate

Enumerates IIS bindings on the local machine and returns one SpnCandidate per unique app pool account.

Example 2

Get-IisSpnCandidate -TargetComputer 'web01.corp.example.com'

Enumerates IIS bindings on a remote machine. Requires the Microsoft.Web.Administration assembly and appropriate permissions.

Example 3

$b = @([PSCustomObject]@{HostHeader='app.corp.example.com'; Port=443; AppPoolAccount='corp\svc-web'})
Get-IisSpnCandidate -TargetComputer 'web01.corp.example.com' -Bindings $b

Uses injected binding data — no IIS assembly required. Useful in test contexts.