The below is a common error with Wcf clients in security interoperability scenarios:
What does it mean?
When a signed response comes back from the server it has two ways to reference the signing certificate.
Option A (key identifier):
Option B (direct reference):
The above error means that the response has key identifier but the client is configured to require a direct reference.
How to fix it?
On your client, configure allowSerializedSigningTokenOnReply to true:
An alternative can be to build a custom message encoder which changes the response from option B to A. This is possible since we know what is the certificate (using the reference) so we can create the binary token. Of course this alternative is much harder and in the general case the former should be preferred.
I am new to WCF and facing some erros while processing my client request. Could you please provide your suggestions. I am passing a DerivedKeytoken from my client. But the WCF fails with error
Cannot find a token authenticator for the 'System.ServiceModel.Security.Tokens.DerivedKeySecurityToken' token type. Tokens of that type cannot be accepted according to current security settings. at System.ServiceModel.Security.ReceiveSecurityHeader.ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver, IList`1 allowedTokenAuthenticators, SecurityTokenAuthenticator& usedTokenAuthenticator) at System.ServiceModel.Security.ReceiveSecurityHeader.ReadToken(XmlDictionaryReader reader, Int32 position, Byte[] decryptedBuffer, SecurityToken encryptionToken, String idInEncryptedForm, TimeSpan timeout) at System.ServiceModel.Security.ReceiveSecurityHeader.ExecuteReadingPass(XmlDictionaryReader reader) at System.ServiceModel.Security.LaxModeSecurityHeaderElementInferenceEngine.ExecuteProcessingPasses(ReceiveSecurityHeader securityHeader, XmlDictionaryReader
Please sens me an email with this since xml is not presented correctly in comments.
I would need to know if you are the server or client owner, and which ones can be changed. Also if there is a sample working client I need its config and the server config.
I am having same problem... I am getting type B response back.. and i am not getting why it still fails. Can you please help? I can provide you with response XML is you want.
8 comments:
Hi Yaron,
I am new to WCF and facing some erros while processing my client request. Could you please provide your suggestions.
I am passing a DerivedKeytoken from my client. But the WCF fails with error
Cannot find a token authenticator for the 'System.ServiceModel.Security.Tokens.DerivedKeySecurityToken' token type. Tokens of that type cannot be accepted according to current security settings. at System.ServiceModel.Security.ReceiveSecurityHeader.ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver, IList`1 allowedTokenAuthenticators, SecurityTokenAuthenticator& usedTokenAuthenticator)
at System.ServiceModel.Security.ReceiveSecurityHeader.ReadToken(XmlDictionaryReader reader, Int32 position, Byte[] decryptedBuffer, SecurityToken encryptionToken, String idInEncryptedForm, TimeSpan timeout)
at System.ServiceModel.Security.ReceiveSecurityHeader.ExecuteReadingPass(XmlDictionaryReader reader)
at System.ServiceModel.Security.LaxModeSecurityHeaderElementInferenceEngine.ExecuteProcessingPasses(ReceiveSecurityHeader securityHeader, XmlDictionaryReader
Request that I am passing through client is
2011-09-15T09:37:46Z2011-09-15T10:07:46ZCN=xxx1111xxxx032XJQeL6nqmBLHN267PSayOtLcpmyEKyKdly9VwOxp1W0=160xxxxxxxx
4
5
I have configured a WCF client which is working correctly. WCF client request which is passing
2011-09-16T05:00:54.326Z2011-09-16T05:05:54.326ZxxxxCN=xxxx1111xxxxxxxxxxxx
Can you please let me know exactly where I am going wrong.
What I have to change, either my client or server configs settings?
Please let me know if you more require more information on the same.
Really appreciate your help.
Thanks,
Vinay
Hi Vinay
Please sens me an email with this since xml is not presented correctly in comments.
I would need to know if you are the server or client owner, and which ones can be changed. Also if there is a sample working client I need its config and the server config.
Yes, I have send you the mail. Please check out and let me know.
Hi Yaron,
Did you get chance to like into this?
Hi Vinay
Just sent you an answer...
Yaron Shalom!
Your post was very effective for us and helped us solve an ongoing problem
Thank you
Hi,
I am having same problem... I am getting type B response back.. and i am not getting why it still fails. Can you please help? I can provide you with response XML is you want.
THanks,
JIgs
Try setting allowSerializedSigningTokenOnReply="true"
Post a Comment