-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improve][Zeta] Handle user privacy when submitting a task print config logs #7247
Conversation
|
||
/** Used to build the {@link Config} from config file. */ | ||
@Slf4j | ||
public class ConfigBuilder { | ||
|
||
public static final ConfigRenderOptions CONFIG_RENDER_OPTIONS = | ||
ConfigRenderOptions.concise().setFormatted(true); | ||
public static List<String> KEYWORDS = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure whether we need this feature as different key names need to be maintained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is necessary to print the configuration log for easy troubleshooting. We can start by maintaining generic keywords such as "password" and "secret".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about reuse
Line 50 in 764d8b0
private static final String[] DEFAULT_SENSITIVE_OPTIONS = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configure privacy keywords in seatunnel's profile,i will modified.
<dependency> | ||
<groupId>org.apache.seatunnel</groupId> | ||
<artifactId>seatunnel-engine-common</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1. we should not include this dependency. The starter for all engine, not only for zeta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get
return config; | ||
} | ||
|
||
public static Map<String, Object> privacyHandler(Map<String, Object> configMap) { | ||
List<String> logPrivacyKeyword = seaTunnelConfig.getEngineConfig().getLogPrivacyKeyword(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please just use
Line 50 in 16950a6
private static final String[] DEFAULT_SENSITIVE_OPTIONS = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config/seatunnel.yaml
Outdated
@@ -22,6 +22,7 @@ seatunnel: | |||
queue-type: blockingqueue | |||
print-execution-info-interval: 60 | |||
print-job-metrics-info-interval: 60 | |||
log-privacy-keyword: username,password,passwd,token,jwt,secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this stage, there is no need to introduce this parameter, because the configuration printing config is effective for all engines, but this configuration file is only used for zeta.
b3bb458
to
20a28d2
Compare
return config; | ||
} | ||
|
||
public static Map<String, Object> privacyHandler(Map<String, Object> configMap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static Map<String, Object> privacyHandler(Map<String, Object> configMap) { | |
public static Map<String, Object> configDesensitization(Map<String, Object> configMap) { |
38713f6
to
7e63669
Compare
…ion logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs [improve] Handle user privacy when submitting a task print configuration logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if ci passes. Thanks @hawk9821
Purpose of this pull request
Contribution Checklist
#6987
#6980
privacy keywords should be desensitized instead of deleting log prints directly
Does this PR introduce any user-facing change?
How was this patch tested?
tests case: ConfigShadeTest.testUsePrivacyHandler
Check list
New License Guide
release-note
.