Wenn über den Powershell-Befehl „New-Website“ eine Site mit Application-Pool angelegt wird, wird der zugehörige Application-Pool nicht in die Lokale Richtlinie „Generate security audits“ eingetragen. Dies scheint hingegen beim manuellen Anlegen über den IIS Manager der Fall zu sein. Dass der Application-Pool nicht eingetragen ist, führt bei der Installation der AD FS 1.1 Web Agents-Rolle zu folgendem Fehler:
The AD FS auditing subsystem could not register itself with the system. The auditing privilege is not held. The AD FS component will not be able to start unless it is granted the auditing privilege. User Action AD FS components that write audits must be configured to run as LocalSystem, NetworkService, or a domain principal that has explicitly been granted the "Generate Security Audits" privilege (SeAuditPrivilege). If the failing component is the Federation Service, configure the application pool (AD FS AppPool) to run as an appropriate principal. If the failing component is the AD FS Web Agent Authentication Service, configure the Windows NT service to run as an appropriate principal. If the failing component is the AD FS Web Agent for claims-aware applications, configure the application pool for the protected application to run as an appropriate principal.
Lösung:
Im Group Policy Object Editor (dt.: Gruppenrichlinienobjekt-Editor) unter:
Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Generate Security Audits (dt.: Richtlinien für Lokaler Computer > Computerkonfiguration > Windows-Einstellungen > Sicherheitseinstellungen > Lokale Richtlinien > Zuweisen von Benutzerrechten > Generieren von Sicherheitsüberwachungen) den jeweiligen Application Pool oder die zum Pool gehörende ApplicationPoolIdentity hinzufügen.
Wenn die Website beispielsweise im Farmbetrieb organisiert ist, lohnt es sich hier eine Gruppenrichtlinie auf dem Domaincontroller anzulegen. Bevor die Gruppenrichtlinie erstellt wird, macht es Sinn die ApplicationPoolIdentity(’s) durch ein Dienstkonto abzulösen, damit das Ganze (auch rechtetechnisch) besser konfiguriert werden kann.