diqiu50 commented on code in PR #12581:
URL: https://github.com/apache/gravitino/pull/12581#discussion_r3850741235


##########
core/src/main/java/org/apache/gravitino/connector/BaseCatalog.java:
##########
@@ -485,9 +478,10 @@ public Map<String, String> properties() {
     if (!shouldBackfillCredential()) {
       return properties;
     }
+    // Backfill may reintroduce raw credential values; mask them again for the 
API response.
     Map<String, String> result = Maps.newHashMap(properties);
     result.putAll(propertiesWithCredentialProviders());
-    return result;
+    return HiddenPropertyMaskUtils.maskHiddenProperties(result, 
catalogPropertiesMetadata());

Review Comment:
    BaseCatalog.properties() masks hidden properties twice. After backfilling 
plaintext credentials via propertiesWithCredentialProviders() (when 
shouldBackfillCredential() is true), it calls 
HiddenPropertyMaskUtils.maskHiddenProperties(result, 
catalogPropertiesMetadata()) again, which re-masks jdbc-user/jdbc-password back 
to ****** and overwrites the values that were just backfilled.



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