ws-security

Issues with WCF and SOAP WS-Security PlainText Username (No SSL)

安稳与你 提交于 2019-12-04 14:24:09
We need to consume a SOAP 1.1 Web Service, developed using Java, from within a C#/.Net 4.0 application. We have no access to the service programming or the server it resides on. The service is exposed over a non SSL connection and requires WS-Security, Username/PasswordText. Using SoapUI (http://soapui.org/) we are able to consume the web service simply by creating a project, pointing it to the WSDL and setting up a simple Username/PasswordText WS-Security configuration. The issue is that we are unable to consume the Web Service using WCF. After some researching, we found information that

Creating Signed SOAP Message as a String with C#

那年仲夏 提交于 2019-12-04 13:49:56
I need to call web service that I have to send such soap request below by using C#. SoapBody and TimeStamp must be signed. <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://xyzt.com/"> <soap:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:BinarySecurityToken EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs

WSIT/Metro doesn't understand Security SOAP header

自闭症网瘾萝莉.ら 提交于 2019-12-04 12:12:03
问题 I'm using WSIT/Metro to create a simple web-service. I'm getting the following error on the server when a client tries to connect with a simple username/passowrd authentication scheme: 2010.03.31. 19:10:33 com.sun.xml.ws.protocol.soap.MUTube getMisUnderstoodHeaders INFO: Element not understood={http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security I have no idea how to make WSIT understand the Security block. The request I get from the client: <?xml

Web Service authentication in Java EE

白昼怎懂夜的黑 提交于 2019-12-04 11:41:52
When developing a Web service(Hospital Management System) using Java EE, is it necessary that for each Web Service call, it has to be checked that the user is logged in?? Which authentication method is the best JAAS, WS-Security, SAML, or a combination or using own tokens ?? It all depends on how is your web service implemented/or its going to be. If you still have a choice I would recommend going with REST approach, authenticate the user with some kind of login functionality and then maintain users session. Timo89 You can use filters. Here's an example of how to use filters: http://viralpatel

UsernameToken WS-Security with Apache CXF Annotations (WSS4J)

南楼画角 提交于 2019-12-04 07:59:37
I'm trying to create a "java first" webservice that will use plain and simple UsernameToken WS-Security. I've attempted to follow the examples from CXF. When I query my wsdl I see no mention of anything ws-security related. I'm using CXF 2.7.5 and I'm trying to do everything with annotations. The following is my failed attempt: SampleService.java: import java.util.ArrayList; import java.util.Date; import javax.jws.WebParam; import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import org.apache.cxf.annotations.EndpointProperties; import org.apache.cxf

Validation of encrypted SOAP request throws the error fault

耗尽温柔 提交于 2019-12-04 06:26:18
问题 This picture shows my simple ws-security configuration of soapui: And I apply this configuration to soap request: Then <arg0> content of soap request is encrypted. This is encrypted soap messsage. <soapenv:Envelope xmlns:soap="http://soap.aaa.com/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401

load balancing WCF with wsHttpBinding and Message Security with client credentials type windows

空扰寡人 提交于 2019-12-04 04:10:37
We have got a normal WCF service which has a binding that looks like this: <wsHttpBinding> <binding name="ServiceBinding" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxReceivedMessageSize="20971520" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <security mode="Message"> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="false" /> </security> </binding> </wsHttpBinding> this service sits in 2 servers

How to do WSSE Authentication implementation in android java according to php part within webserver?

微笑、不失礼 提交于 2019-12-03 21:52:03
I use symfony2 for web server and use wsse authentication with x-wsse header. The question actually is about which exact functions I should use in Java to give the same result as in PHP. PHP part for header generation: $nonce = substr( md5( uniqid( 'nonce_', true ) ), 0, 16 ); $nonceHigh = base64_encode( $nonce ); $passwordDigest = base64_encode( sha1( $nonce . $created . $password . "{" . $user->getSalt() . "}", true ) ); $header = "UsernameToken Username=\"{$username}\", PasswordDigest=\"{$passwordDigest}\", Nonce=\"{$nonceHigh}\", Created=\"{$created}\""; PHP part for header verify:

Getting “WS Security Header in the message is invalid.” when calling ACAGetTransmitterBulkRequestStatus

大兔子大兔子 提交于 2019-12-03 21:35:43
I've been able to make successfull call to first ACA web service and I thought, that getting status would be a breeze. Bo-o-oy how I have been wrong! I've used same settings for the status service as I did for the submit one... and I got "WS Security header is invalid error!" What gives?!?! Signature generation code is the same as I been using for submission! I would appreciate if any one would be able shed some light what possibly is wrong here? I am aware, that following tags should be digitally signed(and I do signed them): ACABusinessHeader ACABulkRequestTransmitterStatusDetailRequest

Configure WCF for WS-Security with Username over https

假如想象 提交于 2019-12-03 21:22:49
I'm trying to call a Java based, WS-Security enabled web service over https using a WCF client and can't seem to get the security configuration right. Using SvcTraceViewer, I don't see the expected security header with any of the security configurations I have tried. My most recent security configuration is: <wsHttpBinding> <binding name="MySoapBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"