+2010-07-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ClaimTypeElement.cs
+ ClaimTypeElementCollection.cs
+ FederatedMessageSecurityOverHttpElement.cs
+ StandardBindingOptionalReliableSessionElement.cs
+ StandardBindingReliableSessionElement.cs
+ WSFederationHttpBindingElement.cs
+ WSFederationHttpSecurityElement.cs
+ WSHttpBindingBaseElement.cs : implemented ApplyConfiguration and
+ add/fix descendants' members.
+
2010-07-27 Atsushi Enomoto <atsushi@ximian.com>
* FederatedMessageSecurityOverHttpElement.cs : use correct converter.
using System.ServiceModel.MsmqIntegration;
using System.ServiceModel.PeerResolvers;
using System.ServiceModel.Security;
+using System.ServiceModel.Security.Tokens;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
namespace System.ServiceModel.Configuration
{
- [MonoTODO]
public sealed partial class ClaimTypeElement
: ConfigurationElement
{
get { return properties; }
}
-
+ internal ClaimTypeRequirement Create ()
+ {
+ return new ClaimTypeRequirement (ClaimType, IsOptional);
+ }
}
}
RemoveItemName = "remove",
ClearItemsName = "clear",
CollectionType = ConfigurationElementCollectionType.AddRemoveClearMap)]
- [MonoTODO]
public sealed partial class ClaimTypeElementCollection
: ServiceModelConfigurationElementCollection<ClaimTypeElement>, ICollection, IEnumerable
{
// Properties
-
-
}
}
static ConfigurationPropertyCollection properties;
static ConfigurationProperty algorithm_suite;
static ConfigurationProperty claim_type_requirements;
+ static ConfigurationProperty establish_security_context;
static ConfigurationProperty issued_key_type;
static ConfigurationProperty issued_token_type;
static ConfigurationProperty issuer;
typeof (ClaimTypeElementCollection), null, null/* FIXME: get converter for ClaimTypeElementCollection*/, null,
ConfigurationPropertyOptions.None);
+ establish_security_context = new ConfigurationProperty ("establishSecurityContext",
+ typeof (bool), "true", new BooleanConverter (), null,
+ ConfigurationPropertyOptions.None);
+
issued_key_type = new ConfigurationProperty ("issuedKeyType",
typeof (SecurityKeyType), "SymmetricKey", null/* FIXME: get converter for SecurityKeyType*/, null,
ConfigurationPropertyOptions.None);
properties.Add (algorithm_suite);
properties.Add (claim_type_requirements);
+ properties.Add (establish_security_context);
properties.Add (issued_key_type);
properties.Add (issued_token_type);
properties.Add (issuer);
get { return (ClaimTypeElementCollection) base [claim_type_requirements]; }
}
+ [ConfigurationProperty ("establishSecurityContext",
+ Options = ConfigurationPropertyOptions.None,
+ DefaultValue = true)]
+ public bool EstablishSecurityContext {
+ get { return (bool) base [establish_security_context]; }
+ set { base [establish_security_context] = value; }
+ }
+
[ConfigurationProperty ("issuedKeyType",
Options = ConfigurationPropertyOptions.None,
DefaultValue = "SymmetricKey")]
get { return (XmlElementElementCollection) base [token_request_parameters]; }
}
-
+ // Methods
+ internal void ApplyConfiguration (FederatedMessageSecurityOverHttp s)
+ {
+ s.AlgorithmSuite = AlgorithmSuite;
+ foreach (ClaimTypeElement cte in ClaimTypeRequirements)
+ s.ClaimTypeRequirements.Add (cte.Create ());
+ s.EstablishSecurityContext = EstablishSecurityContext;
+ s.IssuedKeyType = IssuedKeyType;
+ s.IssuedTokenType = IssuedTokenType;
+ if (Issuer.Address != null)
+ s.IssuerAddress = new EndpointAddress (Issuer.Address, Issuer.Identity.Create (), Issuer.Headers.Headers);
+ if (!String.IsNullOrEmpty (Issuer.Binding))
+ s.IssuerBinding = ConfigUtil.CreateBinding (Issuer.Binding, Issuer.BindingConfiguration);
+ if (IssuerMetadata.Address != null)
+ s.IssuerMetadataAddress = new EndpointAddress (IssuerMetadata.Address, IssuerMetadata.Identity.Create (), IssuerMetadata.Headers.Headers);
+ s.NegotiateServiceCredential = NegotiateServiceCredential;
+ foreach (XmlElementElement xee in TokenRequestParameters)
+ s.TokenRequestParameters.Add (xee.XmlElement);
+ }
}
}
namespace System.ServiceModel.Configuration
{
- [MonoTODO]
public sealed partial class StandardBindingOptionalReliableSessionElement
: StandardBindingReliableSessionElement
{
get { return properties; }
}
+ // Methods
+ internal void ApplyConfiguration (OptionalReliableSession s)
+ {
+ base.ApplyConfiguration (s);
+ s.Enabled = this.Enabled;
+ }
}
}
get { return properties; }
}
+ // Methods
+ internal void ApplyConfiguration (ReliableSession s)
+ {
+ s.InactivityTimeout = InactivityTimeout;
+ s.Ordered = Ordered;
+ }
}
}
get { return (WSFederationHttpSecurityElement) base [security]; }
}
-
-
- protected override void OnApplyConfiguration (Binding binding) {
- throw new NotImplementedException ();
+ protected override void OnApplyConfiguration (Binding binding)
+ {
+ base.OnApplyConfiguration (binding);
+ var b = (WSFederationHttpBinding) binding;
+ b.PrivacyNoticeAt = PrivacyNoticeAt;
+ b.PrivacyNoticeVersion = PrivacyNoticeVersion;
+ Security.ApplyConfiguration (b.Security);
}
}
namespace System.ServiceModel.Configuration
{
- [MonoTODO]
public sealed partial class WSFederationHttpSecurityElement
: ConfigurationElement
{
get { return properties; }
}
-
+ internal void ApplyConfiguration (WSFederationHttpSecurity security)
+ {
+ security.Mode = Mode;
+ Message.ApplyConfiguration (security.Message);
+ }
}
}
set { this ["useDefaultWebProxy"] = value; }
}
-
+ protected override void OnApplyConfiguration (Binding binding)
+ {
+ var b = (WSHttpBindingBase) binding;
+ b.BypassProxyOnLocal = BypassProxyOnLocal;
+ b.HostNameComparisonMode = HostNameComparisonMode;
+ b.MaxBufferPoolSize = MaxBufferPoolSize;
+ b.MaxReceivedMessageSize = MaxReceivedMessageSize;
+ b.MessageEncoding = MessageEncoding;
+ b.ProxyAddress = ProxyAddress;
+ b.ReaderQuotas = ReaderQuotas.Create ();
+ ReliableSession.ApplyConfiguration (b.ReliableSession);
+ b.TextEncoding = TextEncoding;
+ b.TransactionFlow = TransactionFlow;
+ b.UseDefaultWebProxy = UseDefaultWebProxy;
+ }
}
}
+2010-07-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * FederatedMessageSecurityOverHttp.cs, OptionalReliableSession.cs,
+ ReliableSession.cs, WSFederationHttpBinding.cs:
+ filled couple of missing members.
+
2010-07-08 Atsushi Enomoto <atsushi@ximian.com>
* ServiceRuntimeChannel.cs, NetNamedPipeBinding.cs,
string issued_token_type;
EndpointAddress issuer_address, metadata_address;
Binding issuer_binding;
- bool negotiate = true;
+ bool establish_sec_ctx = true, negotiate = true;
Collection<ClaimTypeRequirement> claim_type_reqs =
new Collection<ClaimTypeRequirement> ();
Collection<XmlElement> request_params = new Collection<XmlElement> ();
set { algorithm = value; }
}
+ public bool EstablishSecurityContext {
+ get { return establish_sec_ctx; }
+ set { establish_sec_ctx = value; }
+ }
+
public SecurityKeyType IssuedKeyType {
get { return issued_key_type; }
set { issued_key_type = value; }
bool enabled;
ReliableSessionBindingElement binding;
+ public OptionalReliableSession ()
+ {
+ }
+
public OptionalReliableSession (ReliableSessionBindingElement binding)
+ : base (binding)
{
+ if (binding == null)
+ throw new ArgumentNullException ("binding");
}
public bool Enabled {
{
public class ReliableSession
{
- bool ordered;
- TimeSpan inactivity_timeout;
-
public ReliableSession ()
{
}
- public TimeSpan InactivityTimeout {
- get { return inactivity_timeout; }
+ public ReliableSession (ReliableSessionBindingElement binding)
+ {
+ if (binding == null)
+ throw new ArgumentNullException ("binding");
+ InactivityTimeout = binding.InactivityTimeout;
+ Ordered = binding.Ordered;
}
- public bool Ordered {
- get { return ordered; }
- }
+ public TimeSpan InactivityTimeout { get; set; }
+
+ public bool Ordered { get; set; }
}
}
public class WSFederationHttpBinding : WSHttpBindingBase
{
WSFederationHttpSecurity security;
+ Uri privacy_notice_at;
+ int privacy_notice_ver;
bool allow_cookies;
public WSFederationHttpBinding ()
set { allow_cookies = value; }
}
+ [MonoTODO]
+ public Uri PrivacyNoticeAt {
+ get { return privacy_notice_at; }
+ set { privacy_notice_at = value; }
+ }
+
+ [MonoTODO]
+ public int PrivacyNoticeVersion {
+ get { return privacy_notice_ver; }
+ set { privacy_notice_ver = value; }
+ }
+
[MonoTODO]
public WSFederationHttpSecurity Security {
get { return security; }