How to add WSSE header in web service request - web-services

I have to add password text in WSSE header request before sending the request to another system from BizTalk. Have coded a helper class to generate the Nonce and send attached it to WCF headers inside orchestration. When testing getting error saying "The security token could not be authenticated or authorized"

Related

find out the "username" in enterprise integrator

In Enterprise integrator (WSO2) server, How should I know, which application send me the requests?
I need to have application "username" and send the username in body to Endpoint.
There are different ways to identify the client calling a service.
By looking at the user agent Header.
By looking at the Origin IP.
Make the user add a unique identifier to the request.
If an Auth header is sent by the client, by looking at the Auth information(e.g: If an OAuth token is sent you can do an introspect call to the Token server to get user details etc.)

WSO2 Enterprise integrator preemptive/nonpreemptive authentication

I have question on wso2 EI 6.6.0 and preemptive/non-preemptive authentication. Can I check which incoming calls to wso2 use preemptive and nonpreemtive authentication in Synapse handler? Some systems don't send the HTTP authorization header on the first call and generate error logs in wso2. Is there an attribute in wso2 to determine what kind of authentication it is?
Thank you
In a non-preemptive scenario, the client sends a request without the Authorization header and the server responds to the client with a WWW_Authenticate header indicating that the server requires Authentication details. So the client will read this header and send another request with the required authentication headers.
To answer your question the only way the server can identify whether the request is a non-preemptive request is to check the existence of the Authorization header. So in your Authentication Handler you can check the existence of the Authorization header and respond the client accordingly. You can refer this Authorization Handler implementation where the non-preemptive scenario is handled.

WSO2 identity Server: can not login?

I have create a service provide use OIDC. When I login to this.'invalid_grant, Invalid authorization code received from token request' Occured. How can I change my configuration on service provide so that I can login?
Thanks
This should not be a configuration issue in most of the cases and might be an issue with the token request which you send to exchange the authorization code into an access token.
Tip: You may validate whether the client id used in the /oauth2/authorize request is matching with the one sent in the /oauth2/token request.

How to pass Authorization Header WSO2 (API Manager) to my backend service?

I need to pass Authorization Header from API Manager (WSO2) to my Service Bus Aplication (Oracle).
I saw in another post that I cant do that, because API will validate the token against the key manager and drop that token before calling the back end. (How to pass authorization header in WSO2 OAuth2 and its backend API server Oauth2?)
There's any alternative to pass the token from API Manager to my service bus application?
There's some additional settings for that?
In conf/api-manager.xml, change value of "RemoveOAuthHeadersFromOutMessage" to false. Authorization header will not be removed and you can access it in your sequence, then you can set it to the request header to you backend. Not sure whether this is what you want or not.
One option would be to send same oauth token in another custom header and then by adding a custom mediation sequence in the api manager, set that custom header to Authorization header and then send it to backend server.
https://docs.wso2.com/display/AM1100/Pass+a+Custom+Authorization+Token+to+the+Backend.

add http request header an WSO2 proxy service

I have a proxy service who uses an XSLT mediator, I want to add a request header to it, this information representes a basic HTTP authentication :
Authorization:Basic YWRtaW46YWRtaW4=
The last key is created with a login 'admin' and a password 'admin'.
How can I add this header to my request in the proxy service as a get request so I can authenticate my proxy before doing the xslt transformation.
Thanks
How can I add this header to my request
You should add this as BasicAuth header in your request. If you use SOAP UI, you can see the options to add a SOAPHeader elements where, provide as Authorization :Basic XXX