private void CheckNonce(ArraySegment <byte> nonce) { if (NonceCache != null) { if (!NonceCache.MarkNonce(nonce)) { throw new InvalidOperationException("A duplicate nonce was detected"); } } }
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; }
public LocalClientSecuritySettings() { this.DetectReplays = SecurityProtocolFactory.defaultDetectReplays; this.ReplayCacheSize = SecurityProtocolFactory.defaultMaxCachedNonces; this.ReplayWindow = SecurityProtocolFactory.defaultReplayWindow; this.MaxClockSkew = SecurityProtocolFactory.defaultMaxClockSkew; this.TimestampValidityDuration = SecurityProtocolFactory.defaultTimestampValidityDuration; this.CacheCookies = IssuanceTokenProviderBase <IssuanceTokenProviderState> .defaultClientCacheTokens; this.MaxCookieCachingTime = IssuanceTokenProviderBase <IssuanceTokenProviderState> .DefaultClientMaxTokenCachingTime; this.SessionKeyRenewalInterval = SecuritySessionClientSettings.defaultKeyRenewalInterval; this.SessionKeyRolloverInterval = SecuritySessionClientSettings.defaultKeyRolloverInterval; this.ReconnectTransportOnFailure = SecuritySessionClientSettings.defaultTolerateTransportFailures; this.CookieRenewalThresholdPercentage = SpnegoTokenProvider.defaultServiceTokenValidityThresholdPercentage; this.IdentityVerifier = IdentityVerifier.CreateDefault(); this.nonceCache = null; }
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 LocalServiceSecuritySettings(LocalServiceSecuritySettings other) { this.detectReplays = other.detectReplays; this.replayCacheSize = other.replayCacheSize; this.replayWindow = other.replayWindow; this.maxClockSkew = other.maxClockSkew; this.issuedCookieLifetime = other.issuedCookieLifetime; this.maxStatefulNegotiations = other.maxStatefulNegotiations; this.negotiationTimeout = other.negotiationTimeout; this.maxPendingSessions = other.maxPendingSessions; this.inactivityTimeout = other.inactivityTimeout; this.sessionKeyRenewalInterval = other.sessionKeyRenewalInterval; this.sessionKeyRolloverInterval = other.sessionKeyRolloverInterval; this.reconnectTransportOnFailure = other.reconnectTransportOnFailure; this.timestampValidityDuration = other.timestampValidityDuration; this.maxCachedCookies = other.maxCachedCookies; this.nonceCache = other.nonceCache; }
private LocalServiceSecuritySettings(LocalServiceSecuritySettings other) { _detectReplays = other._detectReplays; _replayCacheSize = other._replayCacheSize; _replayWindow = other._replayWindow; _maxClockSkew = other._maxClockSkew; _issuedCookieLifetime = other._issuedCookieLifetime; _maxStatefulNegotiations = other._maxStatefulNegotiations; _negotiationTimeout = other._negotiationTimeout; _maxPendingSessions = other._maxPendingSessions; _inactivityTimeout = other._inactivityTimeout; _sessionKeyRenewalInterval = other._sessionKeyRenewalInterval; _sessionKeyRolloverInterval = other._sessionKeyRolloverInterval; _reconnectTransportOnFailure = other._reconnectTransportOnFailure; _timestampValidityDuration = other._timestampValidityDuration; _maxCachedCookies = other._maxCachedCookies; _nonceCache = other._nonceCache; }
public LocalServiceSecuritySettings() { this.DetectReplays = SecurityProtocolFactory.defaultDetectReplays; this.ReplayCacheSize = SecurityProtocolFactory.defaultMaxCachedNonces; this.ReplayWindow = SecurityProtocolFactory.defaultReplayWindow; this.MaxClockSkew = SecurityProtocolFactory.defaultMaxClockSkew; this.IssuedCookieLifetime = NegotiationTokenAuthenticator <NegotiationTokenAuthenticatorState> .defaultServerIssuedTokenLifetime; this.MaxStatefulNegotiations = NegotiationTokenAuthenticator <NegotiationTokenAuthenticatorState> .defaultServerMaxActiveNegotiations; this.NegotiationTimeout = NegotiationTokenAuthenticator <NegotiationTokenAuthenticatorState> .defaultServerMaxNegotiationLifetime; this.maxPendingSessions = SecuritySessionServerSettings.defaultMaximumPendingSessions; this.inactivityTimeout = SecuritySessionServerSettings.defaultInactivityTimeout; this.sessionKeyRenewalInterval = SecuritySessionServerSettings.defaultKeyRenewalInterval; this.sessionKeyRolloverInterval = SecuritySessionServerSettings.defaultKeyRolloverInterval; this.reconnectTransportOnFailure = SecuritySessionServerSettings.defaultTolerateTransportFailures; this.TimestampValidityDuration = SecurityProtocolFactory.defaultTimestampValidityDuration; this.maxCachedCookies = NegotiationTokenAuthenticator <NegotiationTokenAuthenticatorState> .defaultServerMaxCachedTokens; this.nonceCache = null; }
public LocalServiceSecuritySettings() { this.DetectReplays = SecurityProtocolFactory.defaultDetectReplays; this.ReplayCacheSize = SecurityProtocolFactory.defaultMaxCachedNonces; this.ReplayWindow = SecurityProtocolFactory.defaultReplayWindow; this.MaxClockSkew = SecurityProtocolFactory.defaultMaxClockSkew; // Replace with defaults we define that aren't in the original source. this.IssuedCookieLifetime = defaultServerIssuedTokenLifetime; this.MaxStatefulNegotiations = defaultServerMaxActiveNegotiations; this.NegotiationTimeout = defaultServerMaxNegotiationLifetime; _maxPendingSessions = defaultMaximumPendingSessions; _inactivityTimeout = defaultInactivityTimeout; _sessionKeyRenewalInterval = defaultKeyRenewalInterval; _sessionKeyRolloverInterval = defaultKeyRolloverInterval; _reconnectTransportOnFailure = defaultTolerateTransportFailures; this.TimestampValidityDuration = SecurityProtocolFactory.defaultTimestampValidityDuration; _maxCachedCookies = defaultServerMaxCachedTokens; _nonceCache = null; }
/// <summary>Initializes a new instance of the <see cref="T:System.ServiceModel.Channels.LocalServiceSecuritySettings" /> class. </summary> public LocalServiceSecuritySettings() { this.DetectReplays = true; this.ReplayCacheSize = 900000; this.ReplayWindow = SecurityProtocolFactory.defaultReplayWindow; this.MaxClockSkew = SecurityProtocolFactory.defaultMaxClockSkew; this.MaxStatefulNegotiations = 128; this.maxPendingSessions = 128; #if FEATURE_CORECLR // SecuritySessionServerSettings not supported this.IssuedCookieLifetime = TimeSpan.Parse("10:00:00"); this.NegotiationTimeout = TimeSpan.Parse("00:01:00"); #else this.IssuedCookieLifetime = NegotiationTokenAuthenticator <NegotiationTokenAuthenticatorState> .defaultServerIssuedTokenLifetime; this.NegotiationTimeout = NegotiationTokenAuthenticator <NegotiationTokenAuthenticatorState> .defaultServerMaxNegotiationLifetime; this.inactivityTimeout = SecuritySessionServerSettings.defaultInactivityTimeout; this.sessionKeyRenewalInterval = SecuritySessionServerSettings.defaultKeyRenewalInterval; this.sessionKeyRolloverInterval = SecuritySessionServerSettings.defaultKeyRolloverInterval; #endif this.reconnectTransportOnFailure = true; this.TimestampValidityDuration = SecurityProtocolFactory.defaultTimestampValidityDuration; this.maxCachedCookies = 1000; this.nonceCache = (NonceCache)null; }