Общая ошибка безопасности (сертификаты не найдены для расшифровки (KeyId)) - PullRequest
0 голосов
/ 04 мая 2020

Я пытаюсь вызвать веб-сервис из BizTalk с помощью адаптера WCF-Customs с пользовательской привязкой. Мне был предоставлен 1 закрытый ключ и 1 открытый ключ c сертификатов ключей.

Я настроил привязку с помощью следующих конфигураций привязок

enter image description here

enter image description here

enter image description here

Я настроил свое поведение, как показано ниже

Я указал закрытый ключ для Сертификат клиента

enter image description here

и для обслуживания я указал ключ c

enter image description here

Но я получаю ошибку ниже. любая помощь будет очень благодарна

System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. ---> System.ServiceModel.FaultException: General security error (No certificates were found for decryption (KeyId))
   --- End of inner exception stack trace ---

Server stack trace: 
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
   at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at System.ServiceModel.Channels.IRequestChannel.E

1 Ответ

0 голосов
/ 05 мая 2020

Убедитесь, что закрытый ключ сертификата доступен для учетной записи, на которой запущено клиентское приложение. Обычно для этого требуется, чтобы мы добавили текущего пользователя в группу управления личным ключом сертификата.
Кроме того, для защищенной связи https требуется временная метка в конверте SOAP. Поэтому системное время между серверной и клиентской сторонами должно быть согласованным.
Вот некоторые связанные обсуждения.
"Не найдено сертификатов для расшифровки" (Apache CXF, WS-Security)

http://cxf.547215.n5.nabble.com/General-security-error-No-certificates-were-found-for-decryption-KeyId-td4367559.html
Не стесняйтесь, дайте мне знать, если есть что-то, с чем я могу помочь.

...