Re: Nonce and Created Values. General Questions
From: Hervey Wilson [MSFT] (herveyw.nospam_at_online.microsoft.com)
Date: 09/29/04
- Next message: John Jenkins: "Re: Nonce and Created Values. General Questions"
- Previous message: JW: "RE: wsa:Action and WSDL"
- In reply to: Bakunin: "Re: Nonce and Created Values. General Questions"
- Next in thread: John Jenkins: "Re: Nonce and Created Values. General Questions"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 11:42:48 -0700
Bakunin wrote:
> I have the exact same issue.
>
> I have set the replaydetection setting in my config file to false, and the
> constructor of my usernamemanager implementation sets everything to base
> implementation passing in XMLNode. I only override the ValidateToken method.
>
> public myUsernameTokenManager(XMLNodeList nodes) : base(nodes)
>
> protected override string validateToken(usernametoken p_token)
> However I get an error stating:
>
> The token must contain both a nonce and timestamp ....
>
The only place this exact error is issued is if replayDetection is
enabled for the UsernameToken and the incoming token does not contain a
Nonce and Created. Of course, if you have used the Hashed Password
option, or you have signed with the UsernameToken, then the Nonce and
Created will be required since they are used for key generation.
The replayDetection setting is read from configuration, if you have a
custom UsernameTokenManager you must implement the constructor that
accepts the configuration node list (as you appear to have done above):
public MyUsernameTokenManager(XmlNodeList configData) : base(configData)
{
...
}
The configuration entry in your app.config / web.config, for the default
UsernameTokenManager, would be:
<microsoft.web.services2>
<security>
<securityTokenManager
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
qname="wsse:UsernameToken"
<replayDection enabled="false" windowInSeconds="300" />
</securityTokenManager>
</security>
</microsoft.web.services2>
If you want a custom UsernameTokenManager, you should also specify the
type="" attribute on the <securityTokenManager> element.
I hope this helps.
-- This posting is provided "AS IS", with no warranties, and confers no rights.
- Next message: John Jenkins: "Re: Nonce and Created Values. General Questions"
- Previous message: JW: "RE: wsa:Action and WSDL"
- In reply to: Bakunin: "Re: Nonce and Created Values. General Questions"
- Next in thread: John Jenkins: "Re: Nonce and Created Values. General Questions"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|