sollhui commented on code in PR #64786:
URL: https://github.com/apache/doris/pull/64786#discussion_r3489134659
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/kafka/KafkaRoutineLoadJob.java:
##########
@@ -723,7 +725,29 @@ public String dataSourcePropertiesJsonToString() {
@Override
public String customPropertiesJsonToString() {
Gson gson = new GsonBuilder().disableHtmlEscaping().create();
- return gson.toJson(customProperties);
+ return gson.toJson(getMaskedCustomProperties(""));
+ }
+
+ private Map<String, String> getMaskedCustomProperties(String keyPrefix) {
+ Map<String, String> maskedProperties = new HashMap<>();
+ customProperties.forEach((key, value) -> {
+ String lowerKey = key.toLowerCase(Locale.ROOT);
+ boolean sensitive =
KafkaConfiguration.SASL_JAAS_CONFIG.equalsIgnoreCase(key)
Review Comment:
This predicate still misses sensitive keys after Doris strips the
`property.` prefix. `KafkaDataSourceProperties.analyzeCustomProperties()`
accepts any `property.*`, stores it as the raw key, and these display paths
serialize `customProperties`, so inputs such as `property.password`,
`property.secret_key`, or `property.session_token` become `password`,
`secret_key`, and `session_token`. None of those match the current suffix
checks that require a leading dot, so the raw values still appear in `SHOW
ROUTINE LOAD`, `information_schema.routine_load_jobs`, and `SHOW CREATE ROUTINE
LOAD`. Please also mask exact sensitive keys like `password` / `secret_key` /
`session_token`, or reuse the existing common sensitive-key rules, and add a
unit case for these bare-key forms.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]