【问题标题】:FIWARE CEP (Proton) REST ouput authentication errorFIWARE CEP (Proton) REST 输出认证错误
【发布时间】:2023-03-30 07:21:01
【问题描述】:

我正在训练使用 REST 消费者将输出事件从 FIWARE CEP (Proton) 发送到 ActiveMQ 队列。访问 ActiveMQ 队列的凭据包含在 URL 中,为 http://user:passwrd@X.X.X.X:xxxx/api/message/myqueue,但出现以下错误:

com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
信息:发送到质子运行时的事件...
org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
信息:已选择基本身份验证方案
org.apache.commons.httpclient.HttpMethodDirector 进程WWWAuthChallenge
信息:没有可用于 BASIC 'ActiveMQRealm'@X.X.X.X 的凭据
com.ibm.hrl.proton.server.executorServices.SimpleThreadFactory$ProtonExceptionHandler uncaughtException
严重:线程中未捕获的异常:线程 [4,5,main],异常:com.ibm.hrl.proton.adapters.rest.client.RESTException:com.ibm.hrl.proton.adapters.rest.client.RESTException:无法执行事件实例的 POST:...
带有请求标头:
内容类型:文本/纯文本
用户代理:Jakarta Commons-HttpClient/3.0
主持人:X.X.X.X:xxxx
内容长度:389
给消费者http://user:passwrd@X.X.X.X:xxx/api/message/myqueue,回复结果:401

似乎 Proton 没有从 URL 中提取凭据。
其他人有同样的问题吗?

【问题讨论】:

    标签: activemq basic-authentication fiware complex-event-processing fiware-cep


    【解决方案1】:

    您可以向 CEP REST 使用者定义添加 AuthToken 参数。

    来自 CEP 用户指南(可以找到 here):

    AuthToken – 可选参数。设置后,将其添加为 X-Auth-Token 请求的 HTTP 标头。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-04
      • 1970-01-01
      • 1970-01-01
      • 2014-09-07
      相关资源
      最近更新 更多