2014-01-12 37 views
1

我们有一个要求,下面给出:该绑定包含一个AsymmetricSecurityBindingElement和一个安全传输绑定元素。

ESB集成需求:

客户端使用ESB服务(IBM)为集成应用程序和服务提供连接“ 我们有一个服务(WCF),这将是。由另一个供应商通过ESB集成调用 将WCF服务与ESB集成的安全要求是,用于签名但用于加密的WS-Security应使用HTTPS 根据他们与我们共享的策略文件,我们应该使用带有令牌的非对称绑定发送给接收者但不是发起者 消息版本是SOAP11 他们给我们一个证书(X509),这是我们在WCF服务配置文件作为客户端证书配置和我们用自己的证书,为我们的WCF服务 WCF实现,以配合其预期的WS-Policy:

我们开发了一个WCF服务(.net 3.5,有技术要求选择.net 3.5) WCF服务被配置为使用认证模式MutualCertificateDuplex和它使用的消息安全版本“WSSecurity10WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10” 它也被配置为使用CustomBinding与ESB的要求 下面给出的是我们用于WCF服务的配置:

<behaviors> 

    <serviceBehaviors> 

    <behavior name="My.Services.ResourceManagementServiceBehavior"> 

     <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="true" 

     serviceAuthorizationAuditLevel="SuccessOrFailure" messageAuthenticationAuditLevel="SuccessOrFailure" /> 

     <serviceMetadata httpsGetEnabled="true" /> 

     <serviceDebug includeExceptionDetailInFaults="true" /> 

     <serviceCredentials> 

     <clientCertificate> 

      <certificate findValue="CN=SOAPUIClientCert" storeLocation="LocalMachine" 

      storeName="My" x509FindType="FindBySubjectDistinguishedName" /> 

     </clientCertificate> 

     <serviceCertificate findValue="CN=MyWCFServiceCert" storeLocation="LocalMachine" 

      storeName="My" x509FindType="FindBySubjectDistinguishedName" /> 

     </serviceCredentials> 

    </behavior> 

    </serviceBehaviors> 

</behaviors> 

<bindings> 

    <customBinding> 

    <binding name="MyServicesCustomBinding"> 

     <transactionFlow/> 

     <textMessageEncoding messageVersion="Soap11" /> 

     <security defaultAlgorithmSuite="Basic128Rsa15" allowSerializedSigningTokenOnReply="true" 

     authenticationMode="MutualCertificateDuplex" 

     requireDerivedKeys="false" securityHeaderLayout="Strict" includeTimestamp="true" 

       messageSecurityVersion="WSSecurity10WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10" 

     requireSignatureConfirmation="false"> 

     <issuedTokenParameters keyType="AsymmetricKey"> 

      <issuer address="" binding="customBinding" bindingConfiguration="MyServicesCustomBinding" /> 

      <issuerMetadata address=""> 

      <identity> 

       <certificateReference findValue="CN=MyWCFServiceCert" isChainIncluded="false" /> 

      </identity> 

      </issuerMetadata> 

     </issuedTokenParameters> 

     </security> 

    <httpsTransport requireClientCertificate="false"/> 

    </binding> 

    </customBinding> 

</bindings> 

<services> 

    <service behaviorConfiguration="My.Services.ResourceManagementServiceBehavior" 

    name="My.Services.ResourceManagementService"> 

    <endpoint address="" binding="customBinding" bindingConfiguration="MyServicesCustomBinding" 

     name="MyBinding" contract="My.Services.IResourceManagementService"> 

     <!--<identity> 

     <dns value="localhost" /> 

     </identity>--> 

    </endpoint> 

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 

    <host> 

     <baseAddresses> 

     <add baseAddress="ResourceManagementService.svc" /> 

     </baseAddresses> 

    </host> 

    </service> 

</services> 

问题正在同时与上述配置测试的WCF服务所产生的:

“安全策略导出失败。该绑定包含一个AsymmetricSecurityBindingElement和一个安全传输绑定元素。不支持此类绑定的策略导出。 ----> System.InvalidOperationException:安全策略导出失败。该绑定包含一个AsymmetricSecurityBindingElement和一个安全传输绑定元素。不支持此类绑定的策略导出。 at System.ServiceModel.Channels.SecurityBindingElement.ExportPolicy(MetadataExporter exporter,PolicyConversionContext context)

我看了很多博客和文章,但没有一篇可能真的有帮助。如果我使用“CertificateOverTransport”之类的身份验证模式,它看起来好像工作正常(至少不会引发上述错误),但它生成的策略(在.svc?wsdl中)与ESP所需的策略不匹配。这个问题似乎是使用HTTPS与身份验证模式“MutualCertificateDuplex”。

我曾经在一些博客中说过,如果我们使用公钥基础设施(PKI),我们不需要使用HTTP,但是为了满足我们客户的需求(与他们的策略相匹配)是否有任何方法可以让我配置我的WCF服务?

请建议我,我真的很感谢你对此的帮助。

感谢,

nivas

回答

0

试评出来的ServiceMetadataBehavior部分,它可能生成WSDL策略时会导致问题。客户需要将自己配置为相同的设置,但这应该没问题。

相关问题