github-actions[bot] commented on code in PR #64786:
URL: https://github.com/apache/doris/pull/64786#discussion_r3496684925
##########
fe/fe-core/src/main/java/org/apache/doris/load/routineload/kafka/KafkaRoutineLoadJob.java:
##########
@@ -723,7 +726,31 @@ 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)
+ || KafkaConfiguration.AWS_ACCESS_KEY.equalsIgnoreCase(key)
+ || DatasourcePrintableMap.SENSITIVE_KEY.contains(key)
Review Comment:
This fixes Kafka `aws.access_key`, but the same routine-load display policy
is still incomplete for the sibling Kinesis data source.
`KinesisDataSourceProperties` accepts `aws.access_key` into
`customKinesisProperties` and validates it with `aws.secret_key` as a supported
credential pair, but `KinesisRoutineLoadJob.customPropertiesJsonToString()` and
`getCustomProperties()` still mask only `aws.secret_key` / `aws.session_key`.
Those methods feed `SHOW ROUTINE LOAD`, `information_schema.routine_load_jobs`,
and `SHOW CREATE ROUTINE LOAD`, and the current Kinesis regression test even
asserts that `customProperties["aws.access_key"]` remains non-empty. Please
apply the same access-key masking to Kinesis routine-load display, or share
this masking helper across routine-load data sources, and flip/add Kinesis
coverage so the access key is hidden there too.
--
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]