Я создал сервер ADFS согласно руководству по технет . Однако при попытке добавить вторичный сервер ADFS с помощью последней части этого руководства на technet процесс завершается неудачно.
PS > Import-Module ADFS
PS > $serviceAccountCredential = Get-Credential -Message "Enter the credential for the Federation Service Account."
PS > Add-AdfsFarmNode `
>> -CertificateThumbprint:"REDACTED" `
>> -OverwriteConfiguration:$true `
>> -PrimaryComputerName:"awsfed01.ad.redacted.com" `
>> -ServiceAccountCredential:$serviceAccountCredential
>>
Add-AdfsFarmNode : MSIS7711: PolicyOperationFault
At line:1 char:1
+ Add-AdfsFarmNode `
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-AdfsFarmNode], FaultException
+ FullyQualifiedErrorId : DeploymentTask,Microsoft.IdentityServer.Deployment.Commands.JoinFarmCommand
Message Context Status
------- ------- ------
Unable to synchronize local database... DeploymentTask Error
Теперь в журнале событий на сервере, который я пытаюсь настроить, появляются следующие ошибки. каждые пять минут:
Источник: AD FS, Событие с кодом 344 :
There was an error doing synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Источник: AD FS, идентификатор события 345:
There was a communication error during AD FS configuration database synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Additional Data
Master Name : awsfed01.ad.redacted.com
Endpoint Uri : http://awsfed01.ad.redacted.com/adfs/services/policystoretransfer
Exception details:
System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
Журнал аудита безопасности основного сервера ADFS содержит отчеты об ошибках аудита каждый раз, когда вторичный сервер пытается подключиться, со следующими данными:
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
There was an error doing synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Источник: AD FS, идентификатор события 345:
There was a communication error during AD FS configuration database synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Additional Data
Master Name : awsfed01.ad.redacted.com
Endpoint Uri : http://awsfed01.ad.redacted.com/adfs/services/policystoretransfer
Exception details:
System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
Журнал аудита безопасности основного сервера ADFS содержит сбои аудита каждый раз, когда вторичный сервер пытается подключиться, со следующими данными:
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
There was an error doing synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Источник: AD FS, идентификатор события 345:
There was a communication error during AD FS configuration database synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Additional Data
Master Name : awsfed01.ad.redacted.com
Endpoint Uri : http://awsfed01.ad.redacted.com/adfs/services/policystoretransfer
Exception details:
System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
Журнал аудита безопасности основного сервера ADFS содержит сбои аудита каждый раз, когда вторичный сервер пытается подключиться, со следующими данными:
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
There was a communication error during AD FS configuration database synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Additional Data
Master Name : awsfed01.ad.redacted.com
Endpoint Uri : http://awsfed01.ad.redacted.com/adfs/services/policystoretransfer
Exception details:
System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
Журнал аудита безопасности основного сервера ADFS содержит отчеты об ошибках аудита каждый раз, когда вторичный пытается подключиться, со следующими данными:
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
There was a communication error during AD FS configuration database synchronization. Synchronization of data from the primary federation server to a secondary federation server did not occur.
Additional Data
Master Name : awsfed01.ad.redacted.com
Endpoint Uri : http://awsfed01.ad.redacted.com/adfs/services/policystoretransfer
Exception details:
System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
Журнал аудита безопасности основного сервера ADFS содержит отчеты об ошибках аудита каждый раз, когда вторичный пытается подключиться, со следующими данными:
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
An account failed to log on.
Subject:
Security ID: NULL SID
Account Name: -
Account Domain: -
Logon ID: 0x0
Logon Type: 3
Account For Which Logon Failed:
Security ID: NULL SID
Account Name: msa-adfs$
Account Domain: RDC
Failure Information:
Failure Reason: An Error occured during Logon.
Status: 0x80090302
Sub Status: 0xC0000418
Process Information:
Caller Process ID: 0x0
Caller Process Name: -
Network Information:
Workstation Name: AWSFED20
Source Network Address: -
Source Port: -
Detailed Authentication Information:
Logon Process: NtLmSsp
Authentication Package: NTLM
Transited Services: -
Package Name (NTLM only): -
Key Length: 0
Я пытался настроить это несколько раз с пустого сервера. Каждый раз вторичный сервер ADFS выдает одно и то же сообщение об ошибке.
Чтобы попытаться воспроизвести это как можно более надежно, я воссоздал то, что я делаю, с помощью PowerShell.
Предварительные требования: * Контроллер домена awsdc01 для домена ad.redcted.com aka RDC \ * Два сервера федерации: awsfed10 , awsfed20 в группе с именем Серверы ADFS
New-ADServiceAccount -Name msa-adfs `
-DNSHostName adfs.ad.redacted.com `
-PrincipalsAllowedToRetrieveManagedPassword "ADFS Servers"
-ServicePrincipalNames "http/adfs.ad.redacted.com"
Выполнено успешно.
Install-WindowsFeature adfs-federation –IncludeManagementTools
Add-WindowsFeature RSAT-AD-PowerShell
$password = ConvertTo-SecureString -String "Redacted" -Force -AsPlainText
Import-PfxCertificate -FilePath C:\files\cert.pfx cert:\localMachine\my -Password $password
Import-Module ActiveDirectory
Import-Module ADFS
Install-ADServiceAccount msa-adfs
Install-AdfsFarm -CertificateThumbprint:"XXX" -FederationServiceName:"adfs.ad.redacted.com" -GroupServiceAccountIdentifier RDC\msa-adfs$
Initialize-ADDeviceRegistration -ServiceAccountName RDC\msa-adfs$
Enable-AdfsDeviceRegistration
Все выполнено успешно.
Install-WindowsFeature adfs-federation –IncludeManagementTools
Add-WindowsFeature RSAT-AD-PowerShell
$password = ConvertTo-SecureString -String "Redacted" -Force -AsPlainText
Import-PfxCertificate -FilePath C:\files\cert.pfx cert:\localMachine\my -Password $password
Import-Module ActiveDirectory
Import-Module ADFS
Install-ADServiceAccount msa-adfs
Install-AdfsFarm -CertificateThumbprint:"XXX" -PrimaryComputerName:"awsfed10.ad.redacted.com" -GroupServiceAccountIdentifier RDC\msa-adfs$
Ошибка с теми же ошибками, что и выше.
GMSA должен быть создан с SPN узла (не http) на основе параметра FederationServiceName. Таким образом, если вы используете adfs.ad.redacted.com, то SPN будет хостом/adfs.ad.redacted.com.
Вам не следует использовать CNAME записи для указания adfs.ad.redacted.com на отдельные серверы. Это вызовет проблемы с аутентификацией Kerberos, как объяснено в https://blogs.technet.microsoft.com/askds/2009/06/22/internet-explorer-behaviors-with-kerberos-authentication/ сценарии 2.
Я предполагаю, что у вас есть некоторая балансировка нагрузки. Поэтому adfs.ad.redacted.com должен преобразовываться в виртуальный IP балансировщика нагрузки, который сидит перед узлами фермы AD FS.
Используется ли блокировка NTLM? Потому что это выглядит так. https://blogs.technet.microsoft.com/askds/2009/10/08/ntlm-blocking-and-you-application-analysis-and-auditing-methodologies-in-windows-7/ содержит более подробную информацию о блокировке NTLM.
Просто используйте пока NTLM аудит (не блокируйте) и повторите попытку добавить 2-й узел после исправления конфигурации, как предлагалось ранее.
Если у вас все еще есть проблемы, я предлагаю поднять вопрос о поддержке в Microsoft.
.Если кто-то пострадает, в моем случае это был локальный брандмауэр, отключенный для синхронизации, а также по электронной почте MS мы отключили прокси NTLM, поэтому мы включили его для синхронизации, а затем снова отключили.