标签: transport-security

主机上配置的身份验证方案('Anonymous')不允许在绑定'BasicHttpBinding'('Negotiate')上配置的身份验证方案.

主机上配置的身份验证方案('Anonymous')不允许在绑定'BasicHttpBinding'('Negotiate')上配置的身份验证方案.请确保将SecurityMode设置为Transport或TransportCredentialOnly.此外,可以通过IIS管理工具,通过ServiceHost.Authentication.AuthenticationSchemes属性,在元素的应用程序配置文件中更改此应用程序的身份验证方案,通过更新绑定上的ClientCredentialType属性,或通过调整HttpTransportBindingElement上的AuthenticationScheme属性.

wcf basichttpbinding wcf-security transport-security

21
推荐指数
3
解决办法
5万
查看次数

SSL是单向加密的一种方式吗?

如果使用单向SSL(服务器证书身份验证),则使用服务器证书的公钥对从客户端发送的数据进行加密.因此,客户端发送的数据可以使用隐私保护.我的问题是

  1. 这是否意味着以一种方式从服务器发送到客户端的SSL数据未加密并以纯文本形式发送?

  2. 对于服务器到客户端以及客户端到服务器通信,数据/消息都没有签名,因此无法保证篡改保护或数据完整性.在使用基于SSL的传输安全性而不是Message安全选项时,是否还有其他方法可以实现数据完整性?

security ssl wcf-security transport-security

10
推荐指数
1
解决办法
1万
查看次数

通过HTTPS通过客户端证书验证WCF请求

在过去的一周里,我一直在为这个爆破的WCF服务配置而苦苦挣扎,而且我开始怀疑我正在尝试做的事情是不可能的,尽管有文档.

很简单,我希望WCF服务需要客户端证书(服务器将在其证书存储中具有该证书),然后使用System.ServiceModel.ServiceSecurityContext访问该身份.此外,这需要使用传输安全性.

这是我的服务器配置:

<system.serviceModel>
    <services>
      <service behaviorConfiguration="requireCertificate" name="Server.CXPClient">
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" name="wsHttpEndpoint" contract="PartnerComm.ContentXpert.Server.ICXPClient" />
        <endpoint address="mex" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" name="mexEndpoint" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="https://localhost:8371/Design_Time_Addresses/Server/CXPClient/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="requireCertificate">
          <serviceMetadata httpsGetEnabled="true" />
          <serviceCredentials>
            <serviceCertificate findValue="CyberdyneIndustries" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectName"/>
            <clientCertificate>
              <authentication certificateValidationMode="ChainTrust" trustedStoreLocation="LocalMachine" />
            </clientCertificate>
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpEndpointBinding" maxBufferPoolSize="5242880" maxReceivedMessageSize="5242880">
          <readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="1073741824" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Transport">
            <transport clientCredentialType="Certificate" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
  </system.serviceModel>
Run Code Online (Sandbox Code Playgroud)

这是我的客户端配置:

  <system.serviceModel>
    <bindings> …
Run Code Online (Sandbox Code Playgroud)

ssl configuration wcf x509certificate transport-security

9
推荐指数
1
解决办法
8261
查看次数

客户端身份验证方案"Anonymous"禁止HTTP请求

这种接缝是一个常见的问题,我在这里看了所有的答案,但没有一个有帮助.

我正在尝试使用SSL来处理在iis上托管的basichttpbinding和WCF服务.我认为问题出在iis或证书上.我在iis manager中创建了一个自签名证书.我的证书名为"mycomputer",也被置于"受信任的根证书"下.客户端找到证书没有问题.

我在iis中的设置是启用匿名身份验证,并禁用其他所有内容.还需要SSL并接受客户端证书.那是对的吗?如果我选择忽略,我会收到错误.

我看不出我的配置有什么问题,这些是正确的吗?

服务配置:

<system.serviceModel>
<services> 
  <service behaviorConfiguration="MyBehaviour" name="BasicHttpSecTest.Service1"> 
    <endpoint name="MyEndPoint" address="https://mycomputer/wp/" binding="basicHttpBinding" bindingConfiguration="ClientCertificateTransportSecurity" contract="BasicHttpSecTest.IService1" /> 
    <!--<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />-->
  </service> 
</services> 
<behaviors> 
  <serviceBehaviors> 
    <behavior name="MyBehaviour"> 
      <serviceMetadata httpsGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
      <serviceCredentials>
        <clientCertificate>
          <authentication certificateValidationMode="PeerOrChainTrust" revocationMode="NoCheck"/>
        </clientCertificate>
      </serviceCredentials>
    </behavior> 
  </serviceBehaviors> 
</behaviors> 
<bindings> 
  <basicHttpBinding> 
    <binding name="ClientCertificateTransportSecurity"> 
      <security mode="Transport"> 
        <transport clientCredentialType="Certificate" />
      </security> 
    </binding> 
  </basicHttpBinding> 
</bindings>
</system.serviceModel> 
Run Code Online (Sandbox Code Playgroud)

客户端配置:

<system.serviceModel> 
<client>
    <endpoint address="https://mycomputer/wp/Service1.svc" binding="basicHttpBinding"
        bindingConfiguration="MyEndPoint" contract="ServiceSSLref.IService1"
        name="MyEndPoint1" behaviorConfiguration="ClientCertificateCredential"/>
</client>

<bindings>
    <basicHttpBinding>
        <binding name="MyEndPoint">
            <security mode="Transport">
                <transport clientCredentialType="Certificate" />
            </security> …
Run Code Online (Sandbox Code Playgroud)

security https wcf certificate transport-security

8
推荐指数
1
解决办法
6万
查看次数

SecurityNegotiationException:对SSPI的调用失败

我有一个WCF Web服务使用NetTcpBinding带有传输安全性和clientCredientialType设置为none.我没有使用此绑定在端点上指定身份.每次尝试在服务上调用方法都会导致以下错误:

客户端:

System.ServiceModel.Security.SecurityNegotiationException:对SSPI的调用失败,请参阅内部异常.

服务方面:

System.ServiceModel.Security.SecurityNegotiationException:远程端的身份验证失败(该流可能仍可用于其他身份验证尝试).

System.ComponentModel.Win32Exception:目标主体名称不正确

对此有任何帮助表示赞赏

谢谢

SJ

wcf sspi nettcpbinding transport-security

7
推荐指数
0
解决办法
1692
查看次数

wsHttpbinding与TransportWithMessageCredential和Windows身份验证

我有一个IIS托管的WCF服务,其中包含以下绑定配置(我从空间绑定中删除了所有属性),用于wsHttpBinding和TransportWithMessageCredential

   <wsHttpBinding>
    <binding name="BindingName" .../>
      <security mode="TransportWithMessageCredential">
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>
  </wsHttpBinding>   
Run Code Online (Sandbox Code Playgroud)

服务行为:

  <serviceBehaviors>
    <behavior name="ServiceBehavior">
      <serviceCredentials>
       <userNameAuthentication userNamePasswordValidationMode="Windows" />
      </serviceCredentials>
    </behavior>
  </serviceBehaviors>
Run Code Online (Sandbox Code Playgroud)

禁用匿名身份验证并启用Windows身份验证.

在客户端,使用有效的Windows用户和密码设置凭据,但在每次调用服务时我都会收到以下异常:

HTTP请求未经授权,客户端身份验证方案为"匿名".从服务器收到的身份验证标头是"Negotiate,NTLM".---> System.ServiceModel.Security.MessageSecurityException:HTTP请求未经授权,客户端身份验证方案为"Anonymous".从服务器收到的身份验证标头是"Negotiate,NTLM".---> System.Net.WebException:远程服务器返回错误:(401)未经授权.

使用自托管版本的WCF服务,它可以在有效的Windows帐户下正常运行.

任何帮助表示赞赏.

windows-authentication wshttpbinding transport-security

6
推荐指数
1
解决办法
2314
查看次数

运输安全是否是通过互联网进行WCF服务的不良做法?

我有一个可通过Internet访问的WCF服务.它具有wsHttpBinding绑定和消息安全模式以及用户名凭据来验证客户端.msdn表示我们应该为Internet方案使用消息安全性,因为它提供了端到端的安全性,而不是像传输安全性那样的点对点安全性.

如果我通过Internet使用wcf服务的传输安全性怎么办?这是一种不好的做法吗?我的数据可以被恶意用户看到吗?

c# wcf http transport-security

6
推荐指数
2
解决办法
1737
查看次数

Windows Server 2003和XP上的TLS 1.2

我在使用传输安全性的IIS上托管了WCF服务。我需要将TLS版本限制为1.2。

我发现Windows Server 2008和Windows 7支持TLS 1.2。

是否可以将TLS的使用限制为服务器的Windows Server 2003和客户端的Windows Vista和XP的版本1.2?这些较旧的操作系统是否支持1.2?

ssl wcf transport-security

5
推荐指数
1
解决办法
2万
查看次数