0

Does Camel-Http4 supports Basic Authentication?

Followed this and other posts Camel http4 download file using Basic authentication over Https

I am using camel 2.17.3 version. using camel-http4 component. The route sends a https4 multipart request to a REST endpoint . The REST service is behind the siteminder. Have truststore/ketstore/cert all setup and it works fine, just sending basic auth is causing trouble.

Using postman i was able to call REST services with basic auth. However, all the calls from camel route fails and get HTTP error 403.

I tried below options to get it working:

  1. Added basic auth to the HttpConfiguration - got HTTP error 401
  2. Added "Authorization" header to the route, as mentioned in the above link - got HTTP error 403
  3. and Added method,user,pass to HTTP_Query - 403 also clear text password is visible in the siteminder logs, this is not good, so dropped trying this option.

please help resolve this issue with some working example and explain the cause.

Is camel dropping http headers?

also i now thinking should I consider using other available components netty/jetty/cxf?? But I prefer getting HTTPs4 working :)

thanks

2
  • Getting a 401 is different than getting a 403. They mean different things. Also, is it preemptive authentication or do you automatically get a 401 and have to authenticate after that? There are many examples with basic auth with that component. camel.465427.n5.nabble.com/… Commented Oct 28, 2016 at 23:34
  • hello I already know "there are many examples..." so thats the reason I have mentioned the different ways i tried to implement. Commented Nov 6, 2016 at 19:04

1 Answer 1

1

To help others with an working example, here is how I got it...

1) Check the site-minder policy and also ensure the user have correct permissions for the services. 2) Passing user/password as query parameter isn't safe (at least it wasn't in my case) Clear text password was exposed in site-minder. 3) setting header (Authorization) apache-camel-basic-http-auth

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.