Setting client credentials using ESB dynamic send port username password over HTTPS

1.2k Views Asked by At

I need to POST to a hrl https://xxxxx.com which expects a username and password BAsic authentication

We are using biztalk ESB dynamic send port

How do I configure this using binding configuration or behaviours or can I set this from UDDI

1

There are 1 best solutions below

1
On

For WCF adapter you can set any WCF adapter properties in ESB Endpoint Configuration. In your case it should be something like this:

SecurityMode=TransportCredentialOnly&TransportClientCredentialType=Basic&UserName=Youruser&Password=Yourpassword

It's not good to store them in clear text though. You can use SSO instead: just use UseSSO and AffiliateApplicationName.

Your problem can be solved using custom endpoint behavior too. You should register it in machine.config to use from ESB. In behaviour you should have something like this:

        public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
    {
        ClientCredentials clientCredentials = new ClientCredentials();
        clientCredentials.UserName.UserName = "user";
        clientCredentials.UserName.Password = "password";

        bindingParameters.Add(clientCredentials);
    }