diqiu50 commented on code in PR #14979:
URL: https://github.com/apache/gravitino/pull/14979#discussion_r4582640214
##########
core/src/main/java/org/apache/gravitino/job/local/SparkProcessBuilder.java:
##########
@@ -152,9 +153,11 @@ public Process start() {
builder.redirectOutput(outputFile);
builder.redirectError(errorFile);
+ // Mask --updater-options / --spark-conf for the log only; ProcessBuilder
keeps the plaintext
+ // commandList.
LOG.info(
"Starting local Spark job with command: {}, environment variable
names: {}",
- Joiner.on(" ").join(commandList),
+ Joiner.on("
").join(JobRuntimeTemplateMaskUtils.maskSensitiveArguments(commandList)),
Review Comment:
Credentials supplied via template `configs` are emitted as `--conf
key=value` in the same log line (see `generateSparkSubmitCommand` above) and
stay plaintext — e.g. `spark.sql.catalog.<name>.rest.auth.basic.password=...`.
Masking only the two JSON bags (`--updater-options` / `--spark-conf`) closes
the built-in template path, but a custom template that puts catalog credentials
in `configs` can still leak them to the server INFO log. Consider masking the
value of `--conf` entries whose key matches
`SecretPropertyUtils.isSensitivePropertyKey(key)` in the logged copy (the
execution command must keep plaintext, as done here).
--
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]