TyrantLucifer commented on code in PR #4134: URL: https://github.com/apache/incubator-seatunnel/pull/4134#discussion_r1113772349
########## docs/en/connector-v2/Config-Encryption-Decryption.md: ########## @@ -0,0 +1,189 @@ +# Config File Encryption And Decryption + +## Introduction + +In most production environments, sensitive configuration items such as passwords are required to be encrypted and cannot be stored in plain text, SeaTunnel provides a convenient one-stop solution for this. + +## How to use + +SeaTunnel comes with the function of base64 encryption and decryption, but it is not recommended for production use, it is recommended that users implement custom encryption and decryption logic. You can refer to this chapter [How to implement user-defined encryption and decryption](#How to implement user-defined encryption and decryption) get more details about it. + +Next, I'll show how to quickly use SeaTunnel's own `base64` encryption: + +1. And a new option `shade.identifier` in env block of config file, this option indicate what the encryption method that you want to use, in this example, we should add `shade.identifier = base64` in config as the following shown: + + ```hocon + # + # Licensed to the Apache Software Foundation (ASF) under one or more + # contributor license agreements. See the NOTICE file distributed with + # this work for additional information regarding copyright ownership. + # The ASF licenses this file to You under the Apache License, Version 2.0 + # (the "License"); you may not use this file except in compliance with + # the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + + env { + execution.parallelism = 1 + shade.identifier = "base64" Review Comment: According to the design of this interface, extend keys the user want to shade is controlled in the implemention of ConfigShade. All logic of encryption should contained in interface not config files. According to our actual production needs, complex configuration files increase the learning cost for users and encryption logic is not well controlled. So IMO, as-is is a better solution to decouple with config file. What do you think about it? -- 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]
