Код ошибки 2148204809

Я пытаюсь реализовать проверку подлинности сертификата клиента в IIS 8. Я развернул свою конфигурацию на машине разработки и проверил, что она работает так, как ожидалось. Однако после настройки на сервере, когда я перехожу на сайт и запрос сертификата клиента, я выбираю его и сразу ошибка 403.16. Журнал неудачных запросов выдает код ошибки 2148204809 и сообщение » цепочка сертификатов обработана, но завершена в корневом сертификате, который не является доверенным поставщика доверия.»

У меня есть действительный сертификат клиента, а также действительный сертификат CA. Сертификат CA устанавливается в доверенных корневых центрах на учетной записи компьютера Как на сервере, так и на клиентском компьютере, а сертификат клиента устанавливается в личной области текущей учетной записи Пользователя на клиентском компьютере.

сертификат клиента подписан непосредственно корневым ЦС, и, как я уже сказал, оба действительны. В цепочке нет других сертификатов, и в цепочке нет промежуточных сертификатов Доверенная область корневых органов.

конфигурация IIS имеет sslFlags = SslNegotiateCert и iisclientcertificatemappingauthentication включена.

сервер не настроен для отправки CTL, и у нас есть SendTrustedIssuerList = 0.

Я не понимаю, почему сертификат клиента не должен быть доверенным.

3 ответов


Windows 2012 представила более строгие проверки хранилища сертификатов. Согласно KB 2795828: служба переднего плана Lync Server 2013 не может запускаться в Windows Server 2012, Доверенные корневые центры сертификации (т. е. корневое хранилище) могут иметь только самозаверяющие сертификаты. Если это хранилище содержит сертификаты, проверки подлинности сертификата клиента под IIS возвращает код ошибки 403.16.

чтобы решить проблему, вы должны удалить все не самоподписанные сертификаты от корневого хранилища. Эту команду PowerShell будет определять не самоподписанные сертификаты:

Get-Childitem cert:LocalMachineroot -Recurse | 
    Where-Object {$_.Issuer -ne $_.Subject}

В моей ситуации, мы перенесли эти самоподписанные сертификаты в промежуточные центры сертификации (т. е. ЦА) магазин:

Get-Childitem cert:LocalMachineroot -Recurse | 
    Where-Object {$_.Issuer -ne $_.Subject} | 
    Move-Item -Destination Cert:LocalMachineCA

По данным KB 2801679: проблемы связи SSL / TLS после установки KB 931125, у вас также может быть слишком много доверенных сертификатов.

[T]он максимальный размер списка доверенных центров сертификации, который поддерживает пакет безопасности Schannel, составляет 16 килобайт (КБ). Наличие большого количества сторонних корневых сертификационных органов превысит предел 16k, и вы столкнетесь с проблемами связи TLS/SSL.

решение в этой ситуации заключается в удалении любых сертификатов центра сертификации, которым вы не доверяете, или остановить отправку списка доверенных certifiation, установив HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNEL@SendTrustedIssuerList запись в реестре для 0 (значение по умолчанию, если его нет, равно 1).


в моем случае я добавлял корневой сертификат в хранилище сертификатов «текущий пользователь» на сервере и получал ошибку 403.16.

добавление моего корневого сертификата в хранилище доверенных корневых полномочий для локальной машины решило проблему.

выполните следующие действия на сервере с IIS.

Для Windows Server 2008 R2:

  1. щелкните правой кнопкой мыши файл сертификата и выберите «Установить сертификат». Щелчок следующий.
  2. выберите поместить все сертификаты в следующее хранилище и нажмите кнопку Обзор…’
  3. Проверьте «показать физические магазины»
  4. разверните «Доверенные корневые центры сертификации» и выберите «локальный компьютер». нажимать OK.
  5. Нажмите Кнопку Далее/Нажмите Кнопку Готово.

Для Windows Server 2012 R2:

  1. щелкните правой кнопкой мыши файл сертификата и выберите » Установить
    Сертификат».
  2. Выберите «Локальная Машина». Щелчок Следующий.
  3. выберите поместить все сертификаты в следующее хранилище и нажмите кнопку Обзор…’
  4. Выберите Доверенные Корневые Центры Сертификации. нажимать OK.
  5. Нажмите Кнопку Далее/Нажмите Кнопку Готово.

Для Windows 7:

  1. Пуск — > Выполнить — > mmc.exe
  2. File — > ‘добавить или удалить Оснастки’. Выберите «сертификаты», нажмите «Добавить >» и выберите «Учетная запись компьютера», а затем «локальный компьютер». Нажмите кнопку Готово / OK
  3. развернуть Сертификаты (Локальный Компьютер) — > Доверенные Корневые Центры Сертификации — > Сертификаты. Щелкните правой кнопкой мыши сертификаты и выберите Все задачи — > импорт.
  4. Выберите файл сертификата и нажмите кнопку Далее.
  5. выберите поместить все сертификаты в следующее хранилище и нажмите кнопку Обзор…’
  6. Проверьте «показать физические магазины»
  7. разверните «Доверенные корневые центры сертификации» и выберите «локальный компьютер». нажимать OK.
  8. Нажмите Кнопку Далее / Click Заканчивать.

Я получил эту ошибку в IIS Express:

ошибка HTTP 403.16-запрещено

сертификат клиента либо не является доверенным, либо недействительным.

смотреть на!—1—> я увидел следующую ошибку:

<RenderingInfo Culture="en-US">
 <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
 <Keywords>
  <Keyword>RequestNotifications</Keyword>
 </Keywords>
 <freb:Description Data="Notification">BEGIN_REQUEST</freb:Description>
 <freb:Description Data="ErrorCode">A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
(0x800b0109)</freb:Description>
</RenderingInfo>

оказалось, когда я установил Razer Synapse установка также поставить сертификат для chromasdk.io В доверенных корневых центрах сертификации под учетной записью компьютера — > локальный компьютер. Я удалил это, а затем все работал.


  • Remove From My Forums
  • Question

  • I have imported HP updates using system center update publisher and used a self signed certificate.. Now I wanted to use them in a OSD Task sequence.

    I have imported the cert into trusted publisher and trusted roots stores in the task sequence and verified fif they exist in the store and they do..

    I can see the updates being downloaded but then I receive …

    The operating system reported error 2148204809: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.

    • Moved by

      Wednesday, October 20, 2010 11:07 AM
      moved to SUM subforum (From:Configuration Manager Software Distribution)

Answers

  • Found that the updates where signed by HP when downloading them with metadata only.. adding the HP certifcate to trusted publishers and root ca did not work.. they have to be downloaded with full content and then they are signed with the certifcate of
    the scup server..

    • Marked as answer by
      LA1976
      Friday, November 5, 2010 7:42 AM

  • Remove From My Forums
  • Question

  • I have imported HP updates using system center update publisher and used a self signed certificate.. Now I wanted to use them in a OSD Task sequence.

    I have imported the cert into trusted publisher and trusted roots stores in the task sequence and verified fif they exist in the store and they do..

    I can see the updates being downloaded but then I receive …

    The operating system reported error 2148204809: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.

    • Moved by

      Wednesday, October 20, 2010 11:07 AM
      moved to SUM subforum (From:Configuration Manager Software Distribution)

Answers

  • Found that the updates where signed by HP when downloading them with metadata only.. adding the HP certifcate to trusted publishers and root ca did not work.. they have to be downloaded with full content and then they are signed with the certifcate of
    the scup server..

    • Marked as answer by
      LA1976
      Friday, November 5, 2010 7:42 AM

В Windows 2012 введены более строгие проверки хранилищ сертификатов. Согласно KB 2795828: внешняя служба Lync Server 2013 не может быть запущена в Windows Server 2012, хранилище доверенных корневых центров сертификации (т. Е. Корневых) может иметь только сертификаты, которые являются самозаверяющими. Если это хранилище содержит неподписанные сертификаты, проверка подлинности клиентских сертификатов в IIS возвращает код ошибки 403.16.

Чтобы решить эту проблему, вы должны удалить все неподписанные сертификаты из корневого хранилища. Эта команда PowerShell идентифицирует неподписанные сертификаты:

Get-Childitem cert:LocalMachineroot -Recurse | 
    Where-Object {$_.Issuer -ne $_.Subject}

В моей ситуации мы переместили эти неподписанные сертификаты в хранилище промежуточных центров сертификации (например, CA):

Get-Childitem cert:LocalMachineroot -Recurse | 
    Where-Object {$_.Issuer -ne $_.Subject} | 
    Move-Item -Destination Cert:LocalMachineCA

В соответствии с KB 2801679: проблемы связи SSL/TLS после установки KB 931125, у вас также может быть слишком много доверенных сертификатов.

[T] Максимальный размер списка доверенных центров сертификации, который поддерживает пакет безопасности Schannel, составляет 16 килобайт (КБ). Наличие большого количества сторонних корневых центров сертификации превысит ограничение в 16 КБ, и у вас возникнут проблемы со связью TLS/SSL.

Решение в этой ситуации состоит в том, чтобы удалить все сертификаты центра сертификации, которым вы не доверяете, или прекратить отправку списка доверенных центров сертификации, установив HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNEL@SendTrustedIssuerList запись реестра в 0 (по умолчанию, если не присутствует, 1).

I am trying to implement client certificate authentication on IIS 8. I have deployed my configuration on a development machine and verified it working as expected there. However after setting up on the server, whenever I navigate to the site and am prompted for the client cert, I select it and immediately get the 403.16 error. The failed requests log gives the error code 2148204809 and message «A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.»

I have a valid client cert and also a valid CA cert. The CA cert is installed in Trusted Root Authorities on the computer account on both the server and the client machine, and the client cert is installed in the Personal area of the Current User account on the client machine.

The client cert is signed directly by the root CA and as I said, both are valid. There are no other certs in the chain and there are no intermediate certs in the Trusted Root Authorities area.

The IIS configuration has sslFlags = SslNegotiateCert and iisClientCertificateMappingAuthentication is enabled.

The server is not configured to send a CTL and we have SendTrustedIssuerList = 0.

I cannot see why the client cert should not be trusted.

asked Oct 8, 2014 at 0:36

Eric's user avatar

EricEric

8801 gold badge7 silver badges9 bronze badges

3

Windows 2012 introduced stricter certificate store validations. According to KB 2795828: Lync Server 2013 Front-End service cannot start in Windows Server 2012, the Trusted Root Certification Authorities (i.e. Root) store can only have certificates that are self-signed. If that store contains non-self-signed certificates, client certificate authentication under IIS returns with a 403.16 error code.

To solve the problem, you have to remove all non-self-signed certificates from the root store. This PowerShell command will identify non-self-signed certificates:

Get-Childitem cert:LocalMachineroot -Recurse | 
    Where-Object {$_.Issuer -ne $_.Subject}

In my situation, we moved these non-self-signed certificates into the Intermediate Certification Authorities (i.e. CA) store:

Get-Childitem cert:LocalMachineroot -Recurse | 
    Where-Object {$_.Issuer -ne $_.Subject} | 
    Move-Item -Destination Cert:LocalMachineCA

According to KB 2801679: SSL/TLS communication problems after you install KB 931125, you might also have too many trusted certificates.

[T]he maximum size of the trusted certificate authorities list that the Schannel security package supports is 16 kilobytes (KB). Having a large amount of Third-party Root Certication Authorities will go over the 16k limit, and you will experience TLS/SSL communication problems.

The solution in this situation is to remove any certification authority certificates you don’t trust, or to stop sending the list of trusted certifiation authorities by setting the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecurityProvidersSCHANNEL@SendTrustedIssuerList registry entry to 0 (the default, if not present, is 1).

If the issue continues to persist after the above steps, restart the machine.

Marcel Gruber's user avatar

answered Jan 25, 2016 at 20:42

Aaron Jensen's user avatar

Aaron JensenAaron Jensen

25.7k15 gold badges81 silver badges90 bronze badges

10

In my case I’d been adding the root cert into the ‘current user’ certificate store on the server and was getting the 403.16 error.

Adding my root cert to the Trusted Root Authorities store for the local machine resolved the issue.

Follow the steps below on the server running IIS.

For Windows Server 2008 R2:

  1. Right click on the certificate file and select ‘Install Certificate’. Click next.
  2. Select ‘Place all certificates in the following store’ and click ‘Browse…’
  3. Check ‘Show physical stores’
  4. Expand ‘Trusted Root Certification Authorities’ and select ‘Local Computer’. Click OK.
  5. Click Next/Click Finish.

For Windows Server 2012 R2:

  1. Right click on the certificate file and select ‘Install
    Certificate’.
  2. Select ‘Local Machine’. Click Next.
  3. Select ‘Place all certificates in the following store’ and click ‘Browse…’
  4. Select ‘Trusted Root Certification Authorities’. Click OK.
  5. Click Next/Click Finish.

For Windows 7:

  1. Start -> Run -> mmc.exe
  2. File -> ‘Add or Remove Snap-ins’. Select ‘Certificates’, click ‘Add >’ and select ‘Computer account’ and then ‘Local computer’. Click Finish/OK
  3. Expand Certificates (Local Computer) -> Trusted Root Certification Authorities -> Certificates. Right click on Certificates and select All Tasks -> Import.
  4. Select the certificate file and click next.
  5. Select ‘Place all certificates in the following store’ and click ‘Browse…’
  6. Check ‘Show physical stores’
  7. Expand ‘Trusted Root Certification Authorities’ and select ‘Local Computer’. Click OK.
  8. Click Next/Click Finish.

answered Oct 1, 2015 at 15:26

PST's user avatar

PSTPST

1211 silver badge5 bronze badges

2

I got this error in IIS Express:

HTTP Error 403.16 — Forbidden

Your client certificate is either not trusted or is invalid.

Looking at the TraceLogFiles I saw the following error:

<RenderingInfo Culture="en-US">
 <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
 <Keywords>
  <Keyword>RequestNotifications</Keyword>
 </Keywords>
 <freb:Description Data="Notification">BEGIN_REQUEST</freb:Description>
 <freb:Description Data="ErrorCode">A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
(0x800b0109)</freb:Description>
</RenderingInfo>

Turned out when I installed Razer Synapse the installation also put a certificate for chromasdk.io in Trusted Root Certification Authorities under Computer Account -> Local computer. I removed this and then everything worked.

answered Feb 2, 2018 at 9:28

Ogglas's user avatar

OgglasOgglas

60.3k36 gold badges320 silver badges412 bronze badges

Just sharing my experience with Windows 2019 server and IISExpress in combination with a self-signed certificate. I couldn’t get it working with editing the registry and in the end I didn’t need to.

The following three steps got me there:

  1. Generate a root certificate for the localmachine cert store with powershell:
    $cert = New-SelfSignedCertificate -Type Custom -KeySpec Signature -Subject "CN=TestRootCert" -KeyExportPolicy Exportable -HashAlgorithm sha256 -KeyLength 2048 -CertStoreLocation "Cert:LocalMachineMy" -KeyUsageProperty Sign -KeyUsage CertSign

  2. Generate a client certificate for the localuser cert store, based on the root cert with powershell:
    New-SelfSignedCertificate -Type Custom -Subject "CN=TestChildCert" -Signer $cert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2","2.5.29.17={text}upn=test@local") -KeyUsage DigitalSignature -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation "Cert:CurrentUserMy"

  3. Move the root cert from PersonalCertificates to Trusted Root CertificationCertificates

After this I could select the TestChildCert and it was accepted just fine.

answered Aug 25, 2020 at 13:59

Bouke Woudstra's user avatar

Понравилась статья? Поделить с друзьями:
  • Код ошибки 22103
  • Код ошибки 2147942405
  • Код ошибки 221000
  • Код ошибки 2147614719 dr web cureit что это
  • Код ошибки 221 дом ру