internal SecurityBindingElement() : base() { _messageSecurityVersion = MessageSecurityVersion.Default; _includeTimestamp = defaultIncludeTimestamp; _localClientSettings = new LocalClientSecuritySettings(); _endpointSupportingTokenParameters = new SupportingTokenParameters(); _securityHeaderLayout = SecurityProtocolFactory.defaultSecurityHeaderLayout; }
internal SecurityBindingElement() : base() { _messageSecurityVersion = MessageSecurityVersion.Default; _includeTimestamp = defaultIncludeTimestamp; _localClientSettings = new LocalClientSecuritySettings(); _endpointSupportingTokenParameters = new SupportingTokenParameters(); _securityHeaderLayout = SecurityProtocolFactory.defaultSecurityHeaderLayout; throw ExceptionHelper.PlatformNotSupported("SecurityBindingElement is not supported"); }
public static void AssertLocalClientSecuritySettings ( bool cacheCookies, int renewalThresholdPercentage, bool detectReplays, LocalClientSecuritySettings lc, string label) { Assert.IsNotNull (lc, label + " IsNotNull"); Assert.AreEqual (cacheCookies, lc.CacheCookies, label + ".CacheCookies"); Assert.AreEqual (renewalThresholdPercentage, lc.CookieRenewalThresholdPercentage, label + ".CookieRenewalThresholdPercentage"); Assert.AreEqual (detectReplays, lc.DetectReplays, label + ".DetectReplays"); }
internal SecurityBindingElement() { DefaultAlgorithmSuite = SecurityAlgorithmSuite.Default; MessageSecurityVersion = MessageSecurityVersion.Default; IncludeTimestamp = true; KeyEntropyMode = SecurityKeyEntropyMode.CombinedEntropy; endpoint = new SupportingTokenParameters(); operation = new Dictionary <string, SupportingTokenParameters> (); opt_endpoint = new SupportingTokenParameters(); opt_operation = new Dictionary <string, SupportingTokenParameters> (); client_settings = new LocalClientSecuritySettings(); service_settings = new LocalServiceSecuritySettings(); }
internal SecurityBindingElement() : base() { _messageSecurityVersion = MessageSecurityVersion.Default; _keyEntropyMode = AcceleratedTokenProvider.defaultKeyEntropyMode; IncludeTimestamp = defaultIncludeTimestamp; _defaultAlgorithmSuite = defaultDefaultAlgorithmSuite; LocalClientSettings = new LocalClientSecuritySettings(); EndpointSupportingTokenParameters = new SupportingTokenParameters(); OptionalEndpointSupportingTokenParameters = new SupportingTokenParameters(); _operationSupportingTokenParameters = new Dictionary <string, SupportingTokenParameters>(); _optionalOperationSupportingTokenParameters = new Dictionary <string, SupportingTokenParameters>(); _securityHeaderLayout = SecurityProtocolFactory.defaultSecurityHeaderLayout; }
private LocalClientSecuritySettings(LocalClientSecuritySettings other) { this.detectReplays = other.detectReplays; this.replayCacheSize = other.replayCacheSize; this.replayWindow = other.replayWindow; this.maxClockSkew = other.maxClockSkew; this.cacheCookies = other.cacheCookies; this.maxCookieCachingTime = other.maxCookieCachingTime; this.sessionKeyRenewalInterval = other.sessionKeyRenewalInterval; this.sessionKeyRolloverInterval = other.sessionKeyRolloverInterval; this.reconnectTransportOnFailure = other.reconnectTransportOnFailure; this.timestampValidityDuration = other.timestampValidityDuration; this.identityVerifier = other.identityVerifier; this.cookieRenewalThresholdPercentage = other.cookieRenewalThresholdPercentage; }
internal SecurityBindingElement(SecurityBindingElement elementToBeCloned) : base(elementToBeCloned) { if (elementToBeCloned == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("elementToBeCloned"); } _includeTimestamp = elementToBeCloned._includeTimestamp; _messageSecurityVersion = elementToBeCloned._messageSecurityVersion; _securityHeaderLayout = elementToBeCloned._securityHeaderLayout; _endpointSupportingTokenParameters = elementToBeCloned._endpointSupportingTokenParameters.Clone(); _localClientSettings = elementToBeCloned._localClientSettings.Clone(); throw ExceptionHelper.PlatformNotSupported("SecurityBindingElement cloning not supported."); }
LocalClientSecuritySettings(LocalClientSecuritySettings other) { this.detectReplays = other.detectReplays; this.replayCacheSize = other.replayCacheSize; this.replayWindow = other.replayWindow; this.maxClockSkew = other.maxClockSkew; this.cacheCookies = other.cacheCookies; this.maxCookieCachingTime = other.maxCookieCachingTime; this.sessionKeyRenewalInterval = other.sessionKeyRenewalInterval; this.sessionKeyRolloverInterval = other.sessionKeyRolloverInterval; this.reconnectTransportOnFailure = other.reconnectTransportOnFailure; this.timestampValidityDuration = other.timestampValidityDuration; this.identityVerifier = other.identityVerifier; this.cookieRenewalThresholdPercentage = other.cookieRenewalThresholdPercentage; this.nonceCache = other.nonceCache; }
private LocalClientSecuritySettings(LocalClientSecuritySettings other) { _detectReplays = other._detectReplays; _replayCacheSize = other._replayCacheSize; _replayWindow = other._replayWindow; _maxClockSkew = other._maxClockSkew; _cacheCookies = other._cacheCookies; _maxCookieCachingTime = other._maxCookieCachingTime; _sessionKeyRenewalInterval = other._sessionKeyRenewalInterval; _sessionKeyRolloverInterval = other._sessionKeyRolloverInterval; _reconnectTransportOnFailure = other._reconnectTransportOnFailure; _timestampValidityDuration = other._timestampValidityDuration; _identityVerifier = other._identityVerifier; _cookieRenewalThresholdPercentage = other._cookieRenewalThresholdPercentage; _nonceCache = other._nonceCache; }
private LocalClientSecuritySettings(LocalClientSecuritySettings other) { _detectReplays = other._detectReplays; _replayCacheSize = other._replayCacheSize; _replayWindow = other._replayWindow; _maxClockSkew = other._maxClockSkew; _cacheCookies = other._cacheCookies; _maxCookieCachingTime = other._maxCookieCachingTime; _sessionKeyRenewalInterval = other._sessionKeyRenewalInterval; _sessionKeyRolloverInterval = other._sessionKeyRolloverInterval; _reconnectTransportOnFailure = other._reconnectTransportOnFailure; _timestampValidityDuration = other._timestampValidityDuration; _identityVerifier = other._identityVerifier; _cookieRenewalThresholdPercentage = other._cookieRenewalThresholdPercentage; _nonceCache = other._nonceCache; }
internal SecurityBindingElement(SecurityBindingElement elementToBeCloned) : base(elementToBeCloned) { if (elementToBeCloned == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("elementToBeCloned"); } _includeTimestamp = elementToBeCloned._includeTimestamp; _messageSecurityVersion = elementToBeCloned._messageSecurityVersion; _securityHeaderLayout = elementToBeCloned._securityHeaderLayout; _endpointSupportingTokenParameters = elementToBeCloned._endpointSupportingTokenParameters.Clone(); _localClientSettings = elementToBeCloned._localClientSettings.Clone(); _maxReceivedMessageSize = elementToBeCloned._maxReceivedMessageSize; _readerQuotas = elementToBeCloned._readerQuotas; }
public void DefaultValues () { LocalClientSecuritySettings lc = new LocalClientSecuritySettings (); Assert.IsNotNull (lc, "#1"); Assert.AreEqual (true, lc.CacheCookies, "#2"); Assert.AreEqual (60, lc.CookieRenewalThresholdPercentage, "#3"); Assert.AreEqual (true, lc.DetectReplays, "#4"); Assert.AreEqual (TimeSpan.FromMinutes (5), lc.MaxClockSkew, "#5"); Assert.AreEqual (TimeSpan.MaxValue, lc.MaxCookieCachingTime, "#6"); Assert.AreEqual (true, lc.ReconnectTransportOnFailure, "#7"); Assert.AreEqual (900000, lc.ReplayCacheSize, "#8"); Assert.AreEqual (TimeSpan.FromMinutes (5), lc.ReplayWindow, "#9"); Assert.AreEqual (TimeSpan.FromHours (10), lc.SessionKeyRenewalInterval, "#10"); Assert.AreEqual (TimeSpan.FromMinutes (5), lc.SessionKeyRolloverInterval, "#11"); Assert.AreEqual (TimeSpan.FromMinutes (5), lc.TimestampValidityDuration, "#12"); // FIXME: IdentityVerifier Assert.IsNotNull (lc.IdentityVerifier, "#13"); }
internal void InitializeFrom(LocalClientSecuritySettings settings) { if (settings == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } this.CacheCookies = settings.CacheCookies; this.DetectReplays = settings.DetectReplays; this.MaxClockSkew = settings.MaxClockSkew; this.MaxCookieCachingTime = settings.MaxCookieCachingTime; this.ReconnectTransportOnFailure = settings.ReconnectTransportOnFailure; this.ReplayCacheSize = settings.ReplayCacheSize; this.ReplayWindow = settings.ReplayWindow; this.SessionKeyRenewalInterval = settings.SessionKeyRenewalInterval; this.SessionKeyRolloverInterval = settings.SessionKeyRolloverInterval; this.TimestampValidityDuration = settings.TimestampValidityDuration; this.CookieRenewalThresholdPercentage = settings.CookieRenewalThresholdPercentage; }
internal void ApplyConfiguration(LocalClientSecuritySettings settings) { if (settings == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } settings.CacheCookies = this.CacheCookies; if (base.ElementInformation.Properties["detectReplays"].ValueOrigin != PropertyValueOrigin.Default) { settings.DetectReplays = this.DetectReplays; } settings.MaxClockSkew = this.MaxClockSkew; settings.MaxCookieCachingTime = this.MaxCookieCachingTime; settings.ReconnectTransportOnFailure = this.ReconnectTransportOnFailure; settings.ReplayCacheSize = this.ReplayCacheSize; settings.ReplayWindow = this.ReplayWindow; settings.SessionKeyRenewalInterval = this.SessionKeyRenewalInterval; settings.SessionKeyRolloverInterval = this.SessionKeyRolloverInterval; settings.TimestampValidityDuration = this.TimestampValidityDuration; settings.CookieRenewalThresholdPercentage = this.CookieRenewalThresholdPercentage; }
internal void InitializeFrom(LocalClientSecuritySettings settings) { if (settings == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("settings"); } SetPropertyValueIfNotDefaultValue(ConfigurationStrings.CacheCookies, settings.CacheCookies); this.DetectReplays = settings.DetectReplays; // can't use default value optimization here because ApplyConfiguration looks at ValueOrigin SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxClockSkew, settings.MaxClockSkew); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxCookieCachingTime, settings.MaxCookieCachingTime); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ReconnectTransportOnFailure, settings.ReconnectTransportOnFailure); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ReplayCacheSize, settings.ReplayCacheSize); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.ReplayWindow, settings.ReplayWindow); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.SessionKeyRenewalInterval, settings.SessionKeyRenewalInterval); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.SessionKeyRolloverInterval, settings.SessionKeyRolloverInterval); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.TimestampValidityDuration, settings.TimestampValidityDuration); SetPropertyValueIfNotDefaultValue(ConfigurationStrings.CookieRenewalThresholdPercentage, settings.CookieRenewalThresholdPercentage); }