Apache Camel HTTPS4 基本身份验证 [英] Apache Camel HTTPS4 Basic Authentication

查看:58
本文介绍了Apache Camel HTTPS4 基本身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Camel-Http4 是否支持基本认证?

Does Camel-Http4 supports Basic Authentication?

关注这个帖子和其他帖子使用基于 Https 的基本身份验证的 Camel http4 下载文件

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

我使用的是骆驼 2.17.3 版本.使用camel-http4 组件.该路由向 REST 端点发送 https4 多部分请求.REST 服务位于站点管理器之后.设置了 truststore/ketstore/cert 并且它工作正常,只是发送基本身份验证会导致问题.

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.

使用邮递员,我能够使用基本身份验证调用 REST 服务.但是,所有来自骆驼路由的调用都失败并得到 HTTP 错误 403.

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. 向 HttpConfiguration 添加了基本身份验证 - 出现 HTTP 错误 401
  2. 向路由添加了授权"标头,如上述链接所述 - 得到 HTTP 错误 403
  3. 并添加了方法,用户,传递给 HTTP_Query - 403 还可以在站点管理器日志中看到明文密码,这不好,因此放弃尝试此选项.

请通过一些工作示例帮助解决此问题并解释原因.

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

camel 是否会丢弃 http 标头?

Is camel dropping http headers?

我现在也在考虑是否应该考虑使用其他可用的组件 netty/jetty/cxf??但我更喜欢让 HTTPS4 工作 :)

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

谢谢

推荐答案

为了帮助其他人提供一个可行的示例,我是这样理解的...

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

1) 检查站点管理器策略,并确保用户对服务具有正确的权限.2)将用户/密码作为查询参数传递是不安全的(至少在我的情况下不是)在站点管理器中公开了明文密码.3) 设置头(Authorization)apache-camel-basic-http-auth

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

这篇关于Apache Camel HTTPS4 基本身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆