eoinmcdonnell113 opened a new pull request, #1391:
URL: https://github.com/apache/ranger/pull/1391

   ## What changes were proposed in this pull request?
   
   RANGER-5798: Sanitize Test Connection failure messages to avoid host/port 
reachability disclosure.
   
   Backport of #1232 to `ranger-2.10`.
   
   Ranger Admin Test Connection (`validateConfig`) could return low-level 
network errors such as `java.net.ConnectException: Connection refused` in the 
UI. That made it possible to infer whether a host/port was reachable from the 
Ranger Admin server.
   
   This change:
   - Sanitizes reachability-related failure messages in 
`ServiceMgr.generateResponseForTestConn` and returns a generic UI message 
instead
   - Keeps full exception details in the admin log
   - Leaves intentional config validation errors unchanged (for example SSL 
requiring an https URL)
   - Stops appending raw exception text in NiFi / NiFi Registry client Test 
Connection responses
   
   JIRA: https://issues.apache.org/jira/browse/RANGER-5798
   
   ## How was this patch tested?
   
   - Unit tests: `TestServiceMgr`, `TestNiFiClient`, `TestNiFiRegistryClient` 
(all passed on the master PR #1232; same coverage included in this backport)
   - Manual Test Connection on Ranger Admin UI with a closed-port URL: UI 
showed a generic failure message; admin log still contained `Connection refused`


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