wcf-security

How to make X.509 certificate?

六月ゝ 毕业季﹏ 提交于 2019-12-06 11:39:27
问题 I am trying to make a X.509 certificate. I am using makecert.exe to make this. I use this command to make my X.509 certificate makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=MyServerCert -sky exchange –pe But i don`t know there X.509 certificate is storeing. I need to use this X.509 certificate in my c# code. The code is : host.Credentials.ServiceCertificate.Certificate = new X509Certificate2("MyServerCert.p12", "password"); But i don`t know what is password and it throw this exception

WCF Service Security for Authentication and Authorization

人走茶凉 提交于 2019-12-06 07:19:28
First of all I apologize for my english... As I wrote in title I need to secure my WCF Service. I always used message security mode using ClientCredentialType="Certificate", checking in this way: <serviceCertificate findValue="cn=abc" storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectDistinguishedName"/> <clientCertificate> <authentication certificateValidationMode="PeerTrust"/> </clientCertificate> This configuration worked well, but now I need to assign different privileges to the authenticated clients, I need Authorization in other words. Any idea? Thanks,

How secure is WCF wsHttpBinding's Windows authentication?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 05:14:42
I have created WCF and I have used wsHttpBinding and MTOM as message transport with authentcation as "Windows". Now my service is not current SECURE, its plain HTTP, running on custom port. Is Windows Authentication of WCF's wsHttpBinding secure? can anyone see the password or guess through network trace? Environment Information: Hosted on Internet No Active Directory, its single server Connecting from my office with server's admin username and password On the client side, Password is not mentioned in config file, it is entered at runtime. It works correctly becausing entering wrong

WCF netTCPBinding

只愿长相守 提交于 2019-12-06 04:04:39
问题 WCF's netTCPBinding is "secured by default". As I understand it this means that.. Callers are authenticated using their windows credentials. Messages are signed Messages are encrypted. However, I can set up a very basic WCF client service set up on my localhost. The authentication will work as its on the same machine, but how does the signing and encryption work? WCF needs a certificate to sign and encrypt messages. If I dont have a certificate then how does my service manage to work? How

Sending SOAP messages WCF client that include a username token and digital signature but are NOT encrypted

放肆的年华 提交于 2019-12-06 03:43:31
WCF does my head in. What I'm trying to do is create a WCF client that will send SOAP messages that contain a username token and are signed with a certificate, but are not encrypted. I've found many articles and blogs with code which almost does what I want, but not quite, and now I'm stumped. Can anyone give me a simple example of how to do this? What I've done so far is: Use svcutil to generate a config file and WCF code from a wsdl and xsd Install certificates and load from the certificate store I've tried many different things and had many different errors and would like a an example which

Can a custom UserNamePasswordValidator be used as a role provider?

怎甘沉沦 提交于 2019-12-06 03:25:45
Related to this question , I've got a custom UserNamePasswordValidator that logs in to our internal API. As part of this logging-in, I can discover the user's roles in our system. I'd like to later use these in PrincipalPermissionAttribute demands on the service methods, e.g.: [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = "System Administrator")] public string HelloWorld() { /* ... */ } To expand on Ladislav's answer: No. A custom UserNamePasswordValidator cannot be used as a role provider. The UserNamePasswordValidator runs in a separate context (or thread, or

WCF No connection could be made because the target machine actively refused

夙愿已清 提交于 2019-12-06 00:58:28
问题 I just implemented a simple WCF server using net.tcp . First, I use 127.0.0.1 as server address and client able to connect the WCF service. Everything is Ok. But when I try to use the internal IP 192.x.x.x I get an error: No connection could be made because the target machine actively refused it Any idea what may cause this? Best Wishes PS: I disabled auth on WCF. Even turn off firewall all...Not worked... 回答1: Do you use 192.x.x.x on both client and server? I remember seeing an issue a while

WCF - There was no endpoint listening at net.tcp://…/Querier.svc that could accept the message

吃可爱长大的小学妹 提交于 2019-12-05 23:39:51
问题 WCF - There was no endpoint listening at net.tcp://myserver:9000/SearchQueryService/Querier.svc that could accept the message. I have the net.tcp protocol enabled on the IIS application Windows firewall is off The net.tcp binding is set to port 9000 for the entire IIS application. My web.config is very standard: <system.serviceModel> <diagnostics> <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" /> </diagnostics> <services>

WCF client security header error “An invalid security token was provided”

↘锁芯ラ 提交于 2019-12-05 23:33:00
According to our provider we need to send this kind of Header: <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss- wssecurity-secext-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-12" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>string</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">string</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> But when checking out with

WCF client configuration for 3rd party SOAP 1.1 service with plain text username credentials over SSL

守給你的承諾、 提交于 2019-12-05 18:02:23
I am trying to connect to a third party SOAP 1.1 service that requires SSL security and username/password credentials. An example of what is expected is: <soapenv:Header> <wsse:Security> <wsse:UsernameToken> <wsse:Username>username</wsse:Username> <wsse:Password>password</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> My client configuration is as follows: <system.serviceModel> <bindings> <basicHttpBinding> <binding name="thirdpartyservicebindingconfig"> <security mode="TransportWithMessageCredential"> <message clientCredentialType="UserName" algorithmSuite="Default" /