ws-security

JAVA - CXF WS-security “A security error was encountered when verifying the message”

流过昼夜 提交于 2019-12-06 08:21:56
Sorry for this question, it can appear recurrent by I'm completely blocked. I'm trying to implement a Web Service Server on top of CXF framework. Jax-ws is very helpful to handle a web service, it's easy to implement it. But, the problem come when you want to introduce security . To handle security in implement the following source code : EndpointImpl jaxWsEndpoint = (EndpointImpl) Endpoint.publish(endPointAddress, httpWebService); inProps.put("action", "UsernameToken Timestamp"); inProps.put("passwordType", "PasswordText"); inProps.put("passwordCallbackClass", "com.company.webService

WCF error calling WS-Security web service: Cannot find a token authenticator for the X509SecurityToken

半腔热情 提交于 2019-12-06 08:09:36
问题 I'm trying to connect with an external Java Web service with WS-Security enabled over https with a WCF client. The service use UserNameToken authentication. When the client call the service, I get this exception: Cannot find a token authenticator for the 'System.IdentityModel.Tokens.X509SecurityToken' token type. Tokens of that type cannot be accepted according to current security settings. I use a custom binding with this configuration: The endpoint: <endpoint address="https://des-afirma

WCF client connecting to Java SOAP web service using WS-Security

亡梦爱人 提交于 2019-12-06 06:03:32
I'm having a problem with a .NET WCF client connecting to a Java web service using SOAP 1.1. The service requires both transport level encryption over SSL and SOAP security using the WS-Security protocol, both using the same certificate. I have the certificate installed and I can connect to the server however, I get a HTTP 500 response when I post the request. I have been able to compare the SOAP produced by WCF with a working example from the developers of the web service. The WCF SOAP message has additional Timestamp and BinarySecurityToken elements which don't occur in the supplied example.

Web Service authentication in Java EE

醉酒当歌 提交于 2019-12-06 04:57:02
问题 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?? 回答1: 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

UsernameToken WS-Security with Apache CXF Annotations (WSS4J)

给你一囗甜甜゛ 提交于 2019-12-06 03:19:58
问题 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

WCF configuration for SOAP plain text password authentication over SSL

点点圈 提交于 2019-12-06 02:42:54
I have an application that connects via https to a SOAP-based web service that implements WS-Security. The web service is written in Java, expects a plain text password as well as a properly set timestamp. After a great deal of googling and experimentation, I can't figure out how to configure my WCF client to interact with this service. In addition to a correct answer, I would also appreciate a link to a tutorial that explains WCF and SOAP well. My current client's app.config looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings>

WCF Client - How to process or ignore a MustUnderstand header element?

安稳与你 提交于 2019-12-06 00:44:54
问题 I'm writing a WCF Client that consumes a non-.Net web service, using WS-Security. The service's response contains a Security header with mustUnderstand set to true. Using a ServiceModelListener, I do see actual data coming back from the service. The WCF client fails, however, because it is not processing the Security header. <env:Header> <wsse:Security env:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs

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" /

WebServicesClientProtocol add EncodingType to Nonce in Security header

为君一笑 提交于 2019-12-05 12:45:55
Similar question: How do I add an EncodingType attribute to the Nonce element of a UsernameToken in WSE 3.0 (.NET) I'm trying to modify header that is send by WebServicesClientProtocol to service. Unfortunately Microsoft's implementation of WSSE Username and Token Security Spec 1.1 isn't compatible with standard and isn't sending EncodingType with Nonce . In similar question I've linked on top solution was to disable EncodingType validation on server, but I'm not able to modify anything. I've imported WSDL as Web Reference, I've changed base class to WebServicesClientProtocol Then inside my

using axis2 ramaprt module with own security framework

微笑、不失礼 提交于 2019-12-05 09:08:49
I have webservice (server-side) implemented using axis2 in my project. We want to enable WS-security in the existing web services. We are evaluating if apache ramapart module fits our need. Here is our requirement: Basically we have in-house security framework which provides encryption,signature and token generation capabilites. Our in-house security framework basically requires a set of configurations in form of XML and it expose various APIs to do various security operations. Now with above environment, I can think of three possbile solutions:- I can develop an axis2 module around in-house