Rimaz17 opened a new pull request, #14863:
URL: https://github.com/apache/gravitino/pull/14863

   ### What changes were proposed in this pull request?
   
   Remove the configuration map from the `GravitinoRuntimeException` message 
thrown by `FilesetCatalogOperations.getFileSystemWithCache()` when creating a 
`FileSystem` fails. The message keeps the path, and the original `IOException` 
is still attached as the cause.
   
   ### Why are the changes needed?
   
   The configuration can contain plaintext credentials such as 
`s3-secret-access-key`. Including the whole map in the exception message meant 
that any caller logging the exception also logged those credentials. This is 
the same kind of fix as #14344.
   
   Fixes #14861
   
   ### Does this PR introduce _any_ user-facing change?
   
   The error message no longer includes configuration values. It now reads 
`Failed to get FileSystem for fileset: path: <path>`.
   
   ### How was this patch tested?
   
   Added 
`TestFilesetCatalogOperations#testGetFileSystemWithCacheErrorDoesNotExposeConfiguration`.
 It makes `getFileSystem()` throw an `IOException` for a configuration with 
dummy `s3-access-key-id` / `s3-secret-access-key` values, then checks that the 
exception keeps the original cause and the path, and that neither dummy value 
appears in the message. The test fails without the change.
   
   Ran `./gradlew :catalogs:catalog-fileset:build -PskipITs 
-PskipDockerTests=true -PskipWeb=true` locally (spotless, checkstyle and all 
catalog-fileset unit tests pass).
   


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