Frun1na opened a new issue, #4776:
URL: https://github.com/apache/rocketmq-dashboard/issues/4776

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open 
issues](https://github.com/apache/rocketmq-dashboard/issues) and found no 
similar issue.
   
   ### What Happened
   
   A metrics data source configured as **ARMS** with **bearer token** 
authentication sends
   `Authorization: Bearer <token>`. ARMS V1 Prometheus instances expect the 
**raw token** in the
   Authorization header — the Aliyun documentation ("使用 HTTP API 地址对接 Grafana 
或自建应用",
   https://help.aliyun.com/zh/arms/prometheus-monitoring/http-api-urls) 
specifies `Authorization: {Token}`
   both in its curl example and in the Grafana custom-header instructions, with 
no `Bearer` prefix.
   
   Because the data source settings offer only none / basic / bearer modes (no 
custom-header mode), there
   is no workaround: every query and the connection test fail with an 
authentication error.
   
   `AbstractPrometheusCompatibleMetricsSource.applyAuthentication` uses 
`headers.setBearerAuth(...)` for
   all backends, and `SettingsService`'s datasource connection-test path does 
the same, so both the
   runtime queries and the "test connection" button fail.
   
   ### Expected Behavior
   
   ARMS sources send `Authorization: <token>` (raw). Basic authentication 
already matches the documented
   `Basic <base64Encode(accessKey:secretKey)>` form and is unaffected.
   
   ### Steps to Reproduce
   
   1. Settings → data sources → add an ARMS data source with the HTTP API URL 
of a V1 instance,
      authentication "bearer", and the token generated in the ARMS console.
   2. Click the connection test / run a dashboard query.
   3. The request carries `Authorization: Bearer <token>` and ARMS rejects it.
   
   ### Environment
   
   - RocketMQ Studio `rocketmq-studio` @ `4c697f07`
   - Aliyun ARMS Prometheus V1 instance with a generated auth token
   
   ### Are You Willing to Submit a Pull Request?
   
   Yes — #4775 fixes this.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to