public WSSecurityOneDotOneReceiveSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, int headerIndex, MessageDirection direction) : base(message, actor, mustUnderstand, relay, standardsManager, algorithmSuite, headerIndex, direction) { }
internal RequestSecurityTokenResponse(SecurityStandardsManager standardsManager, XmlElement rstrXml, string context, string tokenType, int keySize, SecurityKeyIdentifierClause requestedAttachedReference, SecurityKeyIdentifierClause requestedUnattachedReference, bool computeKey, DateTime validFrom, DateTime validTo, bool isRequestedTokenClosed) : base(true) { _standardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(standardsManager))); _rstrXml = rstrXml ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(rstrXml)); _context = context; _tokenType = tokenType; _keySize = keySize; _requestedAttachedReference = requestedAttachedReference; _requestedUnattachedReference = requestedUnattachedReference; _computeKey = computeKey; ValidFrom = validFrom.ToUniversalTime(); ValidTo = validTo.ToUniversalTime(); _isLifetimeSet = true; _isRequestedTokenClosed = isRequestedTokenClosed; // this.issuedTokenBuffer = issuedTokenBuffer; IsReceiver = true; IsReadOnly = true; }
public SecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager , SecurityAlgorithmSuite algorithmSuite, MessageDirection transferDirection) { if (message == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(message)); } if (actor == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(actor)); } if (standardsManager == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(standardsManager)); } if (algorithmSuite == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(algorithmSuite)); } this.message = message; this.actor = actor; this.mustUnderstand = mustUnderstand; this.relay = relay; this.standardsManager = standardsManager; this.algorithmSuite = algorithmSuite; this.transferDirection = transferDirection; }
internal override SendSecurityHeader CreateSendSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction) { return(new WSSecurityOneDotOneSendSecurityHeader(message, actor, mustUnderstand, relay, standardsManager, algorithmSuite, direction)); }
public SecuritySessionFilter(UniqueId securityContextTokenId, SecurityStandardsManager standardsManager, bool isStrictMode, params string[] excludedActions) { _excludedActions = excludedActions; SecurityContextTokenId = securityContextTokenId ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(securityContextTokenId))); _standardsManager = standardsManager; _isStrictMode = isStrictMode; }
internal SecurityProtocolFactory(SecurityProtocolFactory factory) : this() { if (factory == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(factory)); } ActAsInitiator = factory.ActAsInitiator; _addTimestamp = factory._addTimestamp; _detectReplays = factory._detectReplays; _incomingAlgorithmSuite = factory._incomingAlgorithmSuite; _maxCachedNonces = factory._maxCachedNonces; _maxClockSkew = factory._maxClockSkew; _outgoingAlgorithmSuite = factory._outgoingAlgorithmSuite; _replayWindow = factory._replayWindow; ChannelSupportingTokenAuthenticatorSpecification = new Collection <SupportingTokenAuthenticatorSpecification>(new List <SupportingTokenAuthenticatorSpecification>(factory.ChannelSupportingTokenAuthenticatorSpecification)); ScopedSupportingTokenAuthenticatorSpecification = new Dictionary <string, ICollection <SupportingTokenAuthenticatorSpecification> >(factory.ScopedSupportingTokenAuthenticatorSpecification); _standardsManager = factory._standardsManager; _timestampValidityDuration = factory._timestampValidityDuration; // this.auditLogLocation = factory.auditLogLocation; _suppressAuditFailure = factory._suppressAuditFailure; // this.serviceAuthorizationAuditLevel = factory.serviceAuthorizationAuditLevel; // this.messageAuthenticationAuditLevel = factory.messageAuthenticationAuditLevel; if (factory._securityBindingElement != null) { _securityBindingElement = (SecurityBindingElement)factory._securityBindingElement.Clone(); } _securityTokenManager = factory._securityTokenManager; _privacyNoticeUri = factory._privacyNoticeUri; _privacyNoticeVersion = factory._privacyNoticeVersion; _endpointFilterTable = factory._endpointFilterTable; ExtendedProtectionPolicy = factory.ExtendedProtectionPolicy; _nonceCache = factory._nonceCache; }
public WSSecurityOneDotZeroSendSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction) : base(message, actor, mustUnderstand, relay, standardsManager, algorithmSuite, direction) { }
internal RequestSecurityToken(SecurityStandardsManager standardsManager, XmlElement rstXml, string context, string tokenType, string requestType, int keySize, SecurityKeyIdentifierClause renewTarget, SecurityKeyIdentifierClause closeTarget) : base(true) { if (standardsManager == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("standardsManager")); } this.standardsManager = standardsManager; if (rstXml == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("rstXml"); } this.rstXml = rstXml; this.context = context; this.tokenType = tokenType; this.keySize = keySize; this.requestType = requestType; this.renewTarget = renewTarget; this.closeTarget = closeTarget; this.isReceiver = true; this.isReadOnly = true; }
protected SendSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, MessageDirection transferDirection) : base(message, actor, mustUnderstand, relay, standardsManager, algorithmSuite, transferDirection) { ElementContainer = new SendSecurityHeaderElementContainer(); }
internal RequestSecurityToken(SecurityStandardsManager standardsManager, bool isBuffered) : base(isBuffered) { _standardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(standardsManager))); _requestType = _standardsManager.TrustDriver.RequestTypeIssue; _requestProperties = null; IsReceiver = false; IsReadOnly = false; }
public RequestSecurityTokenResponse(SecurityStandardsManager standardsManager, XmlElement rstrXml, string context, string tokenType, int keySize, SecurityKeyIdentifierClause requestedAttachedReference, SecurityKeyIdentifierClause requestedUnattachedReference, bool computeKey, DateTime validFrom, DateTime validTo, bool isRequestedTokenClosed, XmlBuffer issuedTokenBuffer) : this(standardsManager, rstrXml, context, tokenType, keySize, requestedAttachedReference, requestedUnattachedReference, computeKey, validFrom, validTo, isRequestedTokenClosed) { IssuedTokenBuffer = issuedTokenBuffer; }
internal RequestSecurityTokenResponse(SecurityStandardsManager standardsManager) : base(true) { _standardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(standardsManager))); ValidFrom = SecurityUtils.MinUtcDateTime; ValidTo = SecurityUtils.MaxUtcDateTime; _isRequestedTokenClosed = false; _isLifetimeSet = false; IsReceiver = false; IsReadOnly = false; }
internal override ReceiveSecurityHeader CreateReceiveSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction, int headerIndex) { return(new WSSecurityOneDotZeroReceiveSecurityHeader( message, actor, mustUnderstand, relay, standardsManager, algorithmSuite, headerIndex, direction)); }
public SecuritySessionFilterTable(SecurityStandardsManager standardsManager, bool isStrictMode, string[] excludedActions) { if (excludedActions == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(excludedActions)); } _standardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(standardsManager)); _excludedActions = new string[excludedActions.Length]; excludedActions.CopyTo(_excludedActions, 0); _isStrictMode = isStrictMode; _contextMappings = new Dictionary <UniqueId, KeyValuePair <MessageFilter, FilterData> >(); _filterMappings = new Dictionary <MessageFilter, FilterData>(); }
internal RequestSecurityToken(SecurityStandardsManager standardsManager, bool isBuffered) : base(isBuffered) { if (standardsManager == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("standardsManager")); } this.standardsManager = standardsManager; this.requestType = this.standardsManager.TrustDriver.RequestTypeIssue; this.requestProperties = null; this.isReceiver = false; this.isReadOnly = false; }
public SecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager , SecurityAlgorithmSuite algorithmSuite, MessageDirection transferDirection) { Message = message ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(message)); _actor = actor ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(actor)); _mustUnderstand = mustUnderstand; _relay = relay; StandardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(standardsManager)); AlgorithmSuite = algorithmSuite ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(algorithmSuite)); MessageDirection = transferDirection; }
internal RequestSecurityTokenResponse(SecurityStandardsManager standardsManager) : base(true) { if (standardsManager == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(standardsManager))); } this.standardsManager = standardsManager; effectiveTime = SecurityUtils.MinUtcDateTime; expirationTime = SecurityUtils.MaxUtcDateTime; isRequestedTokenClosed = false; this.isLifetimeSet = false; this.isReceiver = false; this.isReadOnly = false; }
internal RequestSecurityToken(SecurityStandardsManager standardsManager, XmlElement rstXml, string context, string tokenType, string requestType, int keySize, SecurityKeyIdentifierClause renewTarget, SecurityKeyIdentifierClause closeTarget) : base(true) { _standardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(standardsManager))); _rstXml = rstXml ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(rstXml)); _context = context; _tokenType = tokenType; _keySize = keySize; _requestType = requestType; _renewTarget = renewTarget; _closeTarget = closeTarget; IsReceiver = true; IsReadOnly = true; }
public RequestSecurityTokenResponseCollection(IEnumerable <RequestSecurityTokenResponse> rstrCollection, SecurityStandardsManager standardsManager) : base(true) { if (rstrCollection == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(rstrCollection)); } int index = 0; foreach (RequestSecurityTokenResponse rstr in rstrCollection) { if (rstr == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(string.Format(CultureInfo.InvariantCulture, "rstrCollection[{0}]", index)); } ++index; } RstrCollection = rstrCollection; _standardsManager = standardsManager ?? throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException(nameof(standardsManager))); }
// The security always look for Empty soap role. If not found, we will also look for Ultimate actors (next incl). // In the future, till we support intermediary scenario, we should refactor this api to do not take actor parameter. internal ReceiveSecurityHeader TryCreateReceiveSecurityHeader(Message message, string actor, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction) { int headerIndex = message.Headers.FindHeader(HeaderName.Value, HeaderNamespace.Value, actor); if (headerIndex < 0 && string.IsNullOrEmpty(actor)) { headerIndex = message.Headers.FindHeader(HeaderName.Value, HeaderNamespace.Value, message.Version.Envelope.UltimateDestinationActorValues); } if (headerIndex < 0) { return(null); } MessageHeaderInfo headerInfo = message.Headers[headerIndex]; return(CreateReceiveSecurityHeader(message, headerInfo.Actor, headerInfo.MustUnderstand, headerInfo.Relay, standardsManager, algorithmSuite, direction, headerIndex)); }
public TokenElement(SecurityToken token, SecurityStandardsManager standardsManager) { Token = token; _standardsManager = standardsManager; }
internal static RequestSecurityToken CreateFrom(SecurityStandardsManager standardsManager, XmlReader reader) { return(standardsManager.TrustDriver.CreateRequestSecurityToken(reader)); }
public DriverFeb2005(SecurityStandardsManager standardsManager) : base(standardsManager) { }
internal RequestSecurityToken(SecurityStandardsManager standardsManager) : this(standardsManager, true) { // no op }
internal abstract SendSecurityHeader CreateSendSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay, SecurityStandardsManager standardsManager, SecurityAlgorithmSuite algorithmSuite, MessageDirection direction);
public abstract XmlElement CreateUseKeyElement(SecurityKeyIdentifier keyIdentifier, SecurityStandardsManager standardsManager);
public TokenElement(SecurityToken token, SecurityStandardsManager standardsManager) { this.token = token; this.standardsManager = standardsManager; }