System\ServiceModel\Channels\SecurityBindingElement.cs (48)
75internal SecurityBindingElement(SecurityBindingElement elementToBeCloned)
611factory.SecurityBindingElement = (SecurityBindingElement) this.Clone();
918static public SecurityBindingElement CreateMutualCertificateBindingElement()
924internal static bool IsMutualCertificateBinding(SecurityBindingElement sbe)
951static public SecurityBindingElement CreateMutualCertificateBindingElement(MessageSecurityVersion version)
958static public SecurityBindingElement CreateMutualCertificateBindingElement(MessageSecurityVersion version, bool allowSerializedSigningTokenOnReply)
964SecurityBindingElement result;
999internal static bool IsMutualCertificateDuplexBinding(SecurityBindingElement sbe)
1027internal static bool IsMutualCertificateBinding(SecurityBindingElement sbe, bool allowSerializedSigningTokenOnReply)
1088internal static bool IsAnonymousForCertificateBinding(SecurityBindingElement sbe)
1168internal static bool IsUserNameForCertificateBinding(SecurityBindingElement sbe)
1202internal static bool IsKerberosBinding(SecurityBindingElement sbe)
1234internal static bool IsSspiNegotiationBinding(SecurityBindingElement sbe, bool requireCancellation)
1267internal static bool IsSslNegotiationBinding(SecurityBindingElement sbe, bool requireClientCertificate, bool requireCancellation)
1319internal static bool IsIssuedTokenForCertificateBinding(SecurityBindingElement sbe, out IssuedSecurityTokenParameters issuedTokenParameters)
1362internal static bool IsIssuedTokenForSslBinding(SecurityBindingElement sbe, out IssuedSecurityTokenParameters issuedTokenParameters)
1391internal static bool IsIssuedTokenForSslBinding(SecurityBindingElement sbe, bool requireCancellation, out IssuedSecurityTokenParameters issuedTokenParameters)
1448internal static bool IsUserNameForSslBinding(SecurityBindingElement sbe, bool requireCancellation)
1484internal static bool IsUserNameOverTransportBinding(SecurityBindingElement sbe)
1547internal static bool IsCertificateOverTransportBinding(SecurityBindingElement sbe)
1637internal static bool IsSspiNegotiationOverTransportBinding(SecurityBindingElement sbe, bool requireCancellation)
1690internal static bool IsIssuedTokenOverTransportBinding(SecurityBindingElement sbe, out IssuedSecurityTokenParameters issuedTokenParameters)
1726static public SecurityBindingElement CreateSecureConversationBindingElement(SecurityBindingElement bootstrapSecurity)
1732internal static bool IsSecureConversationBinding(SecurityBindingElement sbe, out SecurityBindingElement bootstrapSecurity)
1737static public SecurityBindingElement CreateSecureConversationBindingElement(SecurityBindingElement bootstrapSecurity, bool requireCancellation)
1744static public SecurityBindingElement CreateSecureConversationBindingElement(SecurityBindingElement bootstrapSecurity, bool requireCancellation, ChannelProtectionRequirements bootstrapProtectionRequirements)
1749SecurityBindingElement result;
1783internal static bool IsSecureConversationBinding(SecurityBindingElement sbe, bool requireCancellation, out SecurityBindingElement bootstrapSecurity)
1873internal static ChannelProtectionRequirements ComputeProtectionRequirements(SecurityBindingElement security, BindingParameterCollection parameterCollection, BindingElementCollection bindingElements, bool isForService)
1959SecurityBindingElement security = b as SecurityBindingElement;
2031SecurityBindingElement binding = null;
2038if (be is SecurityBindingElement)
2040binding = (SecurityBindingElement)be;
2105SecurityBindingElement binding = null;
2112if (be is SecurityBindingElement)
2114binding = (SecurityBindingElement)be;
2187static bool RequiresWsspTrust(SecurityBindingElement sbe)
2292static bool HasEndorsingSupportingTokensAtOperationScope(SecurityBindingElement binding)
2330static void ExportMessageScopeProtectionPolicy(SecurityBindingElement security, MetadataExporter exporter, PolicyConversionContext policyContext)
2333bindingParameters.Add(ChannelProtectionRequirements.CreateFromContract(policyContext.Contract, policyContext.BindingElements.Find<SecurityBindingElement>().GetIndividualProperty<ISecurityCapabilities>(), false));
2334ChannelProtectionRequirements protectionRequirements = SecurityBindingElement.ComputeProtectionRequirements(security, bindingParameters, policyContext.BindingElements, true);
2398static void ExportOperationScopeSupportingTokensPolicy(SecurityBindingElement binding, MetadataExporter exporter, PolicyConversionContext policyContext)
System\ServiceModel\Channels\SecurityBindingElementImporter.cs (8)
47void ImportOperationScopeSupportingTokensPolicy(MetadataImporter importer, PolicyConversionContext policyContext, SecurityBindingElement binding)
492void ImportEndpointScopeMessageBindingAssertions(MetadataImporter importer, PolicyConversionContext policyContext, SecurityBindingElement binding)
524bool TryImportSymmetricSecurityBindingElement(MetadataImporter importer, PolicyConversionContext policyContext, out SecurityBindingElement sbe)
548bool TryImportAsymmetricSecurityBindingElement(MetadataImporter importer, PolicyConversionContext policyContext, out SecurityBindingElement sbe)
573bool TryImportTransportSecurityBindingElement(MetadataImporter importer, PolicyConversionContext policyContext, out SecurityBindingElement sbe, bool isDualSecurityModeOnly)
612static bool HasSupportingTokens(SecurityBindingElement binding)
654SecurityBindingElement sbe = null;
670SecurityBindingElement tbe = null;
System\ServiceModel\Channels\SymmetricSecurityBindingElement.cs (8)
43this.messageProtectionOrder = SecurityBindingElement.defaultMessageProtectionOrder;
44this.requireSignatureConfirmation = SecurityBindingElement.defaultRequireSignatureConfirmation;
177protocolFactory.ProtectionRequirements.Add(SecurityBindingElement.ComputeProtectionRequirements(this, context.BindingParameters, context.Binding.Elements, isForService));
231sessionFactory.ProtectionRequirements.Add(SecurityBindingElement.ComputeProtectionRequirements(this, context.BindingParameters, context.Binding.Elements, false));
259protocolFactory.ProtectionRequirements.Add(SecurityBindingElement.ComputeProtectionRequirements(this, context.BindingParameters, context.Binding.Elements, false));
321sessionFactory.ProtectionRequirements.Add(SecurityBindingElement.ComputeProtectionRequirements(this, context.BindingParameters, context.Binding.Elements, true));
358protocolFactory.ProtectionRequirements.Add(SecurityBindingElement.ComputeProtectionRequirements(this, context.BindingParameters, context.Binding.Elements, true));
424SecurityBindingElement.ExportPolicy(exporter, context);
System\ServiceModel\Configuration\SecurityElementBase.cs (43)
24SecurityBindingElement failedSecurityBindingElement = null;
36[ConfigurationProperty(ConfigurationStrings.DefaultAlgorithmSuite, DefaultValue = SecurityBindingElement.defaultAlgorithmSuiteString)]
51[ConfigurationProperty(ConfigurationStrings.EnableUnsecuredResponse, DefaultValue = SecurityBindingElement.defaultEnableUnsecuredResponse)]
68get { return typeof(SecurityBindingElement); }
86[ConfigurationProperty(ConfigurationStrings.IncludeTimestamp, DefaultValue = SecurityBindingElement.defaultIncludeTimestamp)]
93[ConfigurationProperty(ConfigurationStrings.AllowInsecureTransport, DefaultValue = SecurityBindingElement.defaultAllowInsecureTransport)]
126[ConfigurationProperty(ConfigurationStrings.MessageProtectionOrder, DefaultValue = SecurityBindingElement.defaultMessageProtectionOrder)]
156[ConfigurationProperty(ConfigurationStrings.RequireSignatureConfirmation, DefaultValue = SecurityBindingElement.defaultRequireSignatureConfirmation)]
174SecurityBindingElement sbe = (SecurityBindingElement)bindingElement;
301SecurityBindingElement result;
305result = SecurityBindingElement.CreateAnonymousForCertificateBindingElement();
308result = SecurityBindingElement.CreateSslNegotiationBindingElement(false, this.RequireSecurityContextCancellation);
311result = SecurityBindingElement.CreateCertificateOverTransportBindingElement(this.MessageSecurityVersion);
314result = SecurityBindingElement.CreateIssuedTokenBindingElement(this.IssuedTokenParameters.Create(createTemplateOnly, this.templateKeyType));
317result = SecurityBindingElement.CreateIssuedTokenForCertificateBindingElement(this.IssuedTokenParameters.Create(createTemplateOnly, this.templateKeyType));
320result = SecurityBindingElement.CreateIssuedTokenForSslBindingElement(this.IssuedTokenParameters.Create(createTemplateOnly, this.templateKeyType), this.RequireSecurityContextCancellation);
323result = SecurityBindingElement.CreateIssuedTokenOverTransportBindingElement(this.IssuedTokenParameters.Create(createTemplateOnly, this.templateKeyType));
326result = SecurityBindingElement.CreateKerberosBindingElement();
329result = SecurityBindingElement.CreateKerberosOverTransportBindingElement();
332result = SecurityBindingElement.CreateMutualCertificateDuplexBindingElement(this.MessageSecurityVersion);
335result = SecurityBindingElement.CreateMutualCertificateBindingElement(this.MessageSecurityVersion);
338result = SecurityBindingElement.CreateSslNegotiationBindingElement(true, this.RequireSecurityContextCancellation);
341result = SecurityBindingElement.CreateSspiNegotiationBindingElement(this.RequireSecurityContextCancellation);
344result = SecurityBindingElement.CreateUserNameForCertificateBindingElement();
347result = SecurityBindingElement.CreateUserNameForSslBindingElement(this.RequireSecurityContextCancellation);
350result = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
353result = SecurityBindingElement.CreateSspiNegotiationOverTransportBindingElement(this.RequireSecurityContextCancellation);
364protected void AddBindingTemplate(Dictionary<AuthenticationMode, SecurityBindingElement> bindingTemplates, AuthenticationMode mode)
369bindingTemplates[mode] = (SecurityBindingElement)this.CreateBindingElement(true);
440internal static bool AreBindingsMatching(SecurityBindingElement b1, SecurityBindingElement b2)
445internal static bool AreBindingsMatching(SecurityBindingElement b1, SecurityBindingElement b2, bool exactMessageSecurityVersion)
549protected virtual void AddBindingTemplates(Dictionary<AuthenticationMode, SecurityBindingElement> bindingTemplates)
573bool TryInitializeAuthenticationMode(SecurityBindingElement sbe)
583Dictionary<AuthenticationMode, SecurityBindingElement> bindingTemplates = new Dictionary<AuthenticationMode, SecurityBindingElement>();
589SecurityBindingElement candidate = bindingTemplates[mode];
602void SetIssuedTokenKeyType(SecurityBindingElement sbe)
643SecurityBindingElement sbe = (SecurityBindingElement)bindingElement;
748bool DoesSecurityBindingElementContainClauseTypeofIssuerSerial( SecurityBindingElement sbe )
System\ServiceModel\Dispatcher\SecurityValidationBehavior.cs (32)
117SecurityBindingElement sbe;
151SecurityBindingElement sbe;
164void ValidateBinding(Binding binding, ContractDescription contract, out SecurityBindingElement securityBindingElement)
174void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
203static SecurityBindingElement GetSecurityBinding(Binding binding, ContractDescription contract)
205SecurityBindingElement sbe = null;
210if (element is SecurityBindingElement)
215sbe = (SecurityBindingElement)element;
231static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
331static bool IsS4URequiredForImpersonation(SecurityBindingElement sbe)
381SecurityBindingElement sbe = (element as SecurityBindingElement);
404static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
491static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
579static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
619SecurityBindingElement secBindingEle = SecurityValidationBehavior.GetSecurityBinding(issuedParameters.IssuerBinding, contract);
648static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
677static public void ValidateSecurityBinding(SecurityBindingElement securityBindingElement, Binding binding, ContractDescription contract)
687SecurityBindingElement sbe = element as SecurityBindingElement;
726static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
786static public void Validate(SecurityBindingElement sbe, Binding binding, ContractDescription contract, KeyedByTypeCollection<IServiceBehavior> behaviors)
849static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
869static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
890static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
907static public void ValidateSecurityBinding(SecurityBindingElement sbe, Binding binding, ContractDescription contract)
935SecurityBindingElement security = elements.Find<SecurityBindingElement>();
937if (security != null && duplex != null && SecurityBindingElement.IsMutualCertificateDuplexBinding(security))
1004SecurityBindingElement sbe = (element as SecurityBindingElement);
1024static private void ValidateSecurityBindingElement(SecurityBindingElement sbe, ServiceEndpoint endpoint)
System\ServiceModel\FederatedMessageSecurityOverHttp.cs (13)
132internal SecurityBindingElement CreateSecurityBindingElement(bool isSecureTransportMode,
147SecurityBindingElement result;
176SecurityBindingElement issuedTokenSecurity;
179issuedTokenSecurity = SecurityBindingElement.CreateIssuedTokenOverTransportBindingElement(issuedParameters);
187issuedTokenSecurity = SecurityBindingElement.CreateIssuedTokenForSslBindingElement(issuedParameters, version.SecurityPolicyVersion != SecurityPolicyVersion.WSSecurityPolicy11);
191issuedTokenSecurity = SecurityBindingElement.CreateIssuedTokenForCertificateBindingElement(issuedParameters);
200result = SecurityBindingElement.CreateSecureConversationBindingElement(issuedTokenSecurity, true);
231internal static bool TryCreate(SecurityBindingElement sbe, bool isSecureTransportMode, bool isReliableSession, MessageSecurityVersion version, out FederatedMessageSecurityOverHttp messageSecurity)
249SecurityBindingElement bootstrapSecurity;
251bool establishSecurityContext = SecurityBindingElement.IsSecureConversationBinding(sbe, true, out bootstrapSecurity);
262if (!SecurityBindingElement.IsIssuedTokenOverTransportBinding(bootstrapSecurity, out issuedTokenParameters))
269if (SecurityBindingElement.IsIssuedTokenForSslBinding(bootstrapSecurity, version.SecurityPolicyVersion != SecurityPolicyVersion.WSSecurityPolicy11, out issuedTokenParameters))
271else if (SecurityBindingElement.IsIssuedTokenForCertificateBinding(bootstrapSecurity, out issuedTokenParameters))
System\ServiceModel\MessageSecurityOverHttp.cs (36)
74internal SecurityBindingElement CreateSecurityBindingElement(bool isSecureTransportMode, bool isReliableSession, MessageSecurityVersion version)
81SecurityBindingElement result;
82SecurityBindingElement oneShotSecurity;
93oneShotSecurity = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
96oneShotSecurity = SecurityBindingElement.CreateCertificateOverTransportBindingElement();
99oneShotSecurity = SecurityBindingElement.CreateSspiNegotiationOverTransportBindingElement(true);
102oneShotSecurity = SecurityBindingElement.CreateIssuedTokenOverTransportBindingElement(IssuedSecurityTokenParameters.CreateInfoCardParameters(new SecurityStandardsManager(new WSSecurityTokenSerializer(emitBspAttributes)), this.algorithmSuite));
110result = SecurityBindingElement.CreateSecureConversationBindingElement(oneShotSecurity, true);
124oneShotSecurity = SecurityBindingElement.CreateSslNegotiationBindingElement(false, true);
127oneShotSecurity = SecurityBindingElement.CreateUserNameForSslBindingElement(true);
130oneShotSecurity = SecurityBindingElement.CreateSslNegotiationBindingElement(true, true);
133oneShotSecurity = SecurityBindingElement.CreateSspiNegotiationBindingElement(true);
136oneShotSecurity = SecurityBindingElement.CreateIssuedTokenForSslBindingElement(IssuedSecurityTokenParameters.CreateInfoCardParameters(new SecurityStandardsManager(new WSSecurityTokenSerializer(emitBspAttributes)), this.algorithmSuite), true);
148oneShotSecurity = SecurityBindingElement.CreateAnonymousForCertificateBindingElement();
151oneShotSecurity = SecurityBindingElement.CreateUserNameForCertificateBindingElement();
154oneShotSecurity = SecurityBindingElement.CreateMutualCertificateBindingElement();
157oneShotSecurity = SecurityBindingElement.CreateKerberosBindingElement();
161oneShotSecurity = SecurityBindingElement.CreateIssuedTokenForCertificateBindingElement(IssuedSecurityTokenParameters.CreateInfoCardParameters(new SecurityStandardsManager(new WSSecurityTokenSerializer(emitBspAttributes)), this.algorithmSuite));
170result = SecurityBindingElement.CreateSecureConversationBindingElement(oneShotSecurity, true);
211internal static bool TryCreate<TSecurity>(SecurityBindingElement sbe, bool isSecureTransportMode, bool isReliableSession, out TSecurity messageSecurity)
237SecurityBindingElement bootstrapSecurity;
238if (!SecurityBindingElement.IsSecureConversationBinding(sbe, true, out bootstrapSecurity))
267if (SecurityBindingElement.IsUserNameOverTransportBinding(bootstrapSecurity))
271else if (SecurityBindingElement.IsCertificateOverTransportBinding(bootstrapSecurity))
275else if (SecurityBindingElement.IsSspiNegotiationOverTransportBinding(bootstrapSecurity, true))
279else if (SecurityBindingElement.IsIssuedTokenOverTransportBinding(bootstrapSecurity, out infocardParameters))
304if (SecurityBindingElement.IsSslNegotiationBinding(bootstrapSecurity, false, true))
309else if (SecurityBindingElement.IsUserNameForSslBinding(bootstrapSecurity, true))
314else if (SecurityBindingElement.IsSslNegotiationBinding(bootstrapSecurity, true, true))
319else if (SecurityBindingElement.IsSspiNegotiationBinding(bootstrapSecurity, true))
324else if (SecurityBindingElement.IsIssuedTokenForSslBinding(bootstrapSecurity, true, out infocardParameters))
342else if (SecurityBindingElement.IsUserNameForCertificateBinding(bootstrapSecurity))
347else if (SecurityBindingElement.IsMutualCertificateBinding(bootstrapSecurity))
352else if (SecurityBindingElement.IsKerberosBinding(bootstrapSecurity))
357else if (SecurityBindingElement.IsIssuedTokenForCertificateBinding(bootstrapSecurity, out infocardParameters))
375else if (SecurityBindingElement.IsAnonymousForCertificateBinding(bootstrapSecurity))
System\ServiceModel\MessageSecurityOverTcp.cs (26)
62internal SecurityBindingElement CreateSecurityBindingElement(bool isSecureTransportMode, bool isReliableSession, BindingElement transportBindingElement)
64SecurityBindingElement result;
65SecurityBindingElement oneShotSecurity;
73oneShotSecurity = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
76oneShotSecurity = SecurityBindingElement.CreateCertificateOverTransportBindingElement();
79oneShotSecurity = SecurityBindingElement.CreateSspiNegotiationOverTransportBindingElement(true);
82oneShotSecurity = SecurityBindingElement.CreateIssuedTokenOverTransportBindingElement(IssuedSecurityTokenParameters.CreateInfoCardParameters(new SecurityStandardsManager(), this.algorithmSuite));
88result = SecurityBindingElement.CreateSecureConversationBindingElement(oneShotSecurity);
95oneShotSecurity = SecurityBindingElement.CreateSslNegotiationBindingElement(false, true);
99oneShotSecurity = SecurityBindingElement.CreateUserNameForSslBindingElement(true);
102oneShotSecurity = SecurityBindingElement.CreateSslNegotiationBindingElement(true, true);
106oneShotSecurity = SecurityBindingElement.CreateSspiNegotiationBindingElement(true);
109oneShotSecurity = SecurityBindingElement.CreateIssuedTokenForSslBindingElement(IssuedSecurityTokenParameters.CreateInfoCardParameters(new SecurityStandardsManager(), this.algorithmSuite), true);
115result = SecurityBindingElement.CreateSecureConversationBindingElement(oneShotSecurity, true);
141internal static bool TryCreate(SecurityBindingElement sbe, bool isReliableSession, BindingElement transportBindingElement, out MessageSecurityOverTcp messageSecurity)
163SecurityBindingElement bootstrapSecurity;
165if (!SecurityBindingElement.IsSecureConversationBinding(sbe, true, out bootstrapSecurity))
173if (SecurityBindingElement.IsUserNameOverTransportBinding(bootstrapSecurity))
175else if (SecurityBindingElement.IsCertificateOverTransportBinding(bootstrapSecurity))
177else if (SecurityBindingElement.IsSspiNegotiationOverTransportBinding(bootstrapSecurity, true))
179else if (SecurityBindingElement.IsIssuedTokenOverTransportBinding(bootstrapSecurity, out infocardParameters))
202if (SecurityBindingElement.IsUserNameForSslBinding(bootstrapSecurity, true))
204else if (SecurityBindingElement.IsSslNegotiationBinding(bootstrapSecurity, true, true))
206else if (SecurityBindingElement.IsSspiNegotiationBinding(bootstrapSecurity, true))
208else if (SecurityBindingElement.IsIssuedTokenForSslBinding(bootstrapSecurity, true, out infocardParameters))
223else if (SecurityBindingElement.IsSslNegotiationBinding(bootstrapSecurity, false, true))
System\ServiceModel\Security\WSSecurityPolicy.cs (16)
612public virtual XmlElement CreateWsspWssAssertion(MetadataExporter exporter, SecurityBindingElement binding)
644public virtual bool TryImportWsspWssAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
806public abstract bool TryImportWsspTrustAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion);
822protected bool TryImportWsspTrustAssertion(string trustName, MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding, out XmlElement assertion)
1297public virtual XmlElement CreateWsspEncryptSignatureAssertion(PolicyConversionContext policyContext, SecurityBindingElement binding)
1325bool ContainsEncryptionParts(PolicyConversionContext policyContext, SecurityBindingElement security)
1352bindingParameters.Add(ChannelProtectionRequirements.CreateFromContract(policyContext.Contract, policyContext.BindingElements.Find<SecurityBindingElement>().GetIndividualProperty<ISecurityCapabilities>(), false));
1353ChannelProtectionRequirements protectionRequirements = SecurityBindingElement.ComputeProtectionRequirements(security, bindingParameters, policyContext.BindingElements, true);
1415public virtual XmlElement CreateWsspProtectTokensAssertion(SecurityBindingElement sbe)
1458public virtual bool TryImportWsspIncludeTimestampAssertion(ICollection<XmlElement> assertions, SecurityBindingElement binding)
1490public virtual bool TryImportWsspLayoutAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding)
1581public virtual bool TryImportWsspAlgorithmSuiteAssertion(MetadataImporter importer, ICollection<XmlElement> assertions, SecurityBindingElement binding)
2633public virtual XmlElement CreateWsspBootstrapPolicyAssertion(MetadataExporter exporter, SecurityBindingElement bootstrapSecurity)
2758parameters.BootstrapSecurityBindingElement = bindingElements.Find<SecurityBindingElement>();
3050SecurityBindingElement sbe = endpoint.Binding.CreateBindingElements().Find<SecurityBindingElement>();