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

   ### Before Creating the Bug Report
   - [x] Searched all-state Issues and PRs and checked the relevant 
frontend/authentication patches.
   - [x] This is a RocketMQ Studio defect.
   - [x] Confirmed the request/response and frontend mismatch on 
`rocketmq-studio` at `127c47b06a268cc74224d5f34c56ec7c36ac0d55`.
   
   ### Studio Version
   Source checkout of `rocketmq-studio`, commit 
`127c47b06a268cc74224d5f34c56ec7c36ac0d55`.
   
   ### Runtime Environment
   macOS, Node.js 23.7.0; source-level reproduction from the existing API DTO 
and React component. No deployed browser/server verification is claimed.
   
   ### Connected RocketMQ Cluster
   Not required: this concerns saved metrics data-source metadata and the 
credential fields in its connection-test dialog.
   
   ### Describe the Bug
   The data-source API deliberately accepts case-insensitive authentication 
modes. For example, `DataSourceDTO.auth` accepts `basic auth` and `BEARER 
TOKEN`, and `toDataSourceVO()` preserves their casing after trimming. 
`SettingsService` and the metrics explorer also recognize those modes 
case-insensitively.
   
   `DataSourceTab` instead recognizes only `Basic Auth` and `Bearer Token`. For 
an API-created source using another valid casing, the credential-free row 
connection test is incorrectly enabled. Opening Edit shows no 
username/password/token inputs, and the connection test omits the required 
credentials. The operator must manually reselect the same mode before the 
dialog becomes usable.
   
   ### Steps to Reproduce
   1. Save a data source through `/api/settings/datasources/create` with a 
supported type and URL and `auth: "basic auth"` (or `"BEARER TOKEN"`). The 
request is valid under the existing DTO pattern and the returned metadata 
retains that spelling.
   2. Open Settings > Data sources.
   3. Observe that the row's Test connection action is enabled even though 
credentials are not stored.
   4. Open Edit without reselecting the authentication mode. No credential 
inputs appear, and Test connection submits a request without the credentials 
required by that mode.
   
   ### What Did You Expect to See?
   Treat all API-supported casings as the same mode: disable credential-free 
row tests, show the appropriate credential fields on edit, and include supplied 
credentials in modal tests. Anonymous `none` sources must still be testable 
without credentials.
   
   ### What Did You See Instead?
   Only the exact title-case strings produced by the UI are recognized. Other 
valid API values leave the operator with an unusable connection-test dialog and 
a misleading row action.
   
   ### Additional Context
   Normalize known authentication modes at the UI boundary using the existing 
selector labels. Preserve unknown values and keep credentials transient; no API 
or storage migration is required. This is separate from stale modal 
completions, repeated submissions, and the metrics explorer's credential prompt.
   
   ### Are You Willing to Submit a Pull Request?
   - [x] Yes, I am willing to submit a pull request.
   


-- 
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