-
Notifications
You must be signed in to change notification settings - Fork 288
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
[Feature] Add Support for encrypting config fields #278
[Feature] Add Support for encrypting config fields #278
Conversation
a30d3d1
to
1d7c588
Compare
@@ -52,7 +52,13 @@ jwt: | |||
secretKey: | |||
algorithm: HS256 | |||
|
|||
|
|||
seatunnel-web: |
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.
In an earlier PR, we placed the Seatunnel-web specific configuration under the spring config section.
You have now put seatunnel-web specific configuration under the seatunnel-web config section.
This seems to be a better approach. Later, we can also move the configurations from the earlier PR under the seatunnel-web config section.
@Autowired private EncryptionConfig encryptionConfig; | ||
|
||
public void encryptData(Map<String, String> datasourceConfig) { | ||
for (String key : encryptionConfig.getKeysToEncrypt()) { |
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.
When encryption type is default it does not do any encoding/decoding. can we simply return from where when encoding is default.
seatunnel-web: | ||
datasource: | ||
encryption: | ||
type: default |
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.
can we use none instead of default
@@ -324,6 +331,10 @@ public String generateJobConfig( | |||
if (sinkMap.size() > 0) { | |||
sinks = getConnectorConfig(sinkMap); | |||
} | |||
envConfig = |
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.
add this config only when encryption is enabled.
While writing intermediate config to submit job via seatunnel client, we are required to encrypt certain fields like password, auth, username By Default no encryption would be done, to enable the encryption provide the following properties ``` seatunnel-web: datasource: encryption: type: your_encryption keys-to-encrypt: - password - auth ``` ref: https://seatunnel.apache.org/docs/2.3.9/connector-v2/Config-Encryption-Decryption/ Co-authored-by: BilwaST <[email protected]> Co-authored-by: Shashwat Tiwari <[email protected]>
1d7c588
to
4ad6dae
Compare
Purpose of this pull request
While writing intermediate config to submit job via seatunnel client, we are required to encrypt certain fields like password, auth, username
By Default no encryption would be done, to enable the encryption provide the following properties
ref: https://seatunnel.apache.org/docs/2.3.9/connector-v2/Config-Encryption-Decryption/
Check list
New License Guide