ws-security

In SOAP message to WCF web service, how to put KeyIdentifier directly inside SecurityTokenReference (inline, without using Reference token)

南笙酒味 提交于 2019-12-07 05:44:29
I'm successful in communicating with a WCF service via SoapUI (I was given specification on how to configure it), but I'm having trouble in copying those settings to .NET application. Turns out the shape of generated SOAP message (peeked via Fiddler) is being rejected by the web service, who expects a stricter layout of envelope. I'm very close. On this picture... ... you can see three SOAP messages: 1. With X509SecurityTokenParameters.InclusionMode set to AlwaysToRecipient 2. With X509SecurityTokenParameters.InclusionMode set to Never 3. Expected security token, tested on SoapUI. How do I

Java client calling WSE 2.0 with DIME attachment

爷,独闯天下 提交于 2019-12-07 03:00:31
I need to integrate with a legacy .NET Web Service that uses WSE 2.0 for WS-Security and DIME. The catch is I need to do this from a Java application. I'm expecting that Axis2 works fine with the WS-Security because folks around here have done it before. It's the DIME that I'm concerned about. I see a reference to DIME at http://ws.apache.org/axis/java/client-side-axis.html , but I'm wondering if anyone has actually done this with Axis and a WSE 2.0 Web Service. I can't tell you anything for sure from own expierence. And about every 2nd page on the "web" seems to state something different to

WS-Security not working with CXF

只谈情不闲聊 提交于 2019-12-07 02:42:40
问题 I' am trying to develop a WS-security enabled web service with Apache CXF. Tutorial that I am following is here. Unfortunately I am continuously getting the following error much to chagrin. I' am using Spring framework 3.0.5 and CXF 2.3.3 and also WSS4J 1.6.1. This may be a silly question but I am almost fed up with finding a solution. Please please help .... org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: org

Create WS security headers for REST web service in SoapUI Pro

跟風遠走 提交于 2019-12-06 17:41:43
问题 We are developing a REST web service with the WS security headers to be passed through as header parameters in the REST request. I am testing this in SoapUI Pro and want to create a groovy script to generate these and then use them in the REST request. These parameters include the password digest, encoded nonce and created dateTime and password digest which is created from encoding the nonce, hashed password and created date and time, i.e. the code should be the same as that which generates

SoapUI request to WCF service fails using certificates

荒凉一梦 提交于 2019-12-06 15:20:25
I have a custom binding like following for my WCF service which I am trying to call from the soapUI 4.5.1 <customBinding> <binding name="NewBinding0"> <transactionFlow /> <security authenticationMode="MutualCertificate" defaultAlgorithmSuite="Basic128" securityHeaderLayout="Lax" includeTimestamp="false" messageProtectionOrder="SignBeforeEncrypt" allowInsecureTransport="true" requireSignatureConfirmation="false" requireDerivedKeys="false" keyEntropyMode="ClientEntropy" requireSecurityContextCancellation="false" allowSerializedSigningTokenOnReply="true" messageSecurityVersion=

How to convert a pfx file into jks and then use it to sign an outgoing soap request by using the classes generated from a wsdl

家住魔仙堡 提交于 2019-12-06 14:05:24
问题 I am looking for a code example which shows how to access a secure web service over SSL using a PFX certificate. I have the certificate and its password and I started by creating a KeyStore instance using the command mentioned below. keytool -importkeystore -destkeystore "C:\Program Files\Java\jdk1.8.0_131\jre\lib\security\dvs.keystore" -srckeystore "C:\Program Files\Java\jdk1.8.0_131\jre\lib\security\key.pfx" -srcstoretype pkcs12 -deststoretype JKS -srcstorepass ******* I then used wsimport

Accepting both UsernameToken and BinarySecurityToken in WCF customBinding

时光怂恿深爱的人放手 提交于 2019-12-06 13:17:21
I am building a WCF web service with a customBinding endpoint and am getting stuck accepting the WS-Security header that is being sent to me by another party. We are both following a specification authored by the UK National Health Service, so I am unable to amend the requirements. The basic structure of the <wsse:Security> header should be as follows, according to the specification: <wsse:Security> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurityutility-1.0.xsd" wsu:Id="6CCF6A2B-11A6-11DF-86D1-236A99759561" > <wsu:Created>2012-06-12T09:00:00Z</wsu

Ws-Security headers using Metro

房东的猫 提交于 2019-12-06 12:41:44
I have a web service which implements WS-Security but does not define a policy in the WSDL. I am able to consume this web service successfully using Axis 2 as client. I am trying to consume the same web service using Metro 2 but the wsse:security headers are not going. It works only if the service defines the security policy which is not under my control. I tested this by creating a sample web service and unless I define the policy my metro client never sends the wsse:security headers. Is there anything I am missing using Metro? EDIT-------------------------------------------------------------

In Apache Axis2/Rampart, while generating wsdl and validating policy, is Ws-security Policy 1.2 assertion <sp:NoPassword/> not handled completely?

老子叫甜甜 提交于 2019-12-06 12:02:22
We are implementing WS-Security Policy on our web services with the following framework/module/specification. Apache Axis2 1.6.2 Apache Rampart 1.6.2 WS-Security Policy 1.2(namespace: http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702 ) We are facing the following issues while creating/consuming the service. Axis2 wsdl generation logic ignores <sp:NoPassword/> assertion. After debugging,I realized that it is because of the logic in org.apache.ws.secpolicy.model.UsernameToken (rampart-policy-1.6.2.jar) that expects <sp:WssUsernameToken11 /> ( or <sp:WssUsernameToken10 /> ) to be

stop WCF from caching / re-using security tokens (SecurityContextToken)

南楼画角 提交于 2019-12-06 11:49:51
I am using WCF Message level security with the following wsHttpBinding <security mode="Message"> <message clientCredentialType="Windows" establishSecurityContext="false" /> </security> Each time i call the service is a separate operation, and there is no need to keep any session state. I am running into a problem with load balancer, because WCF keeps re-using security tokens, so if the first call goes to NodeA, it creates a security token which is re-used. If that token is passed to NodeB tripping up MessageSecurityException Seems like microsofts answer to this is to use sticky sessions, which