apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
8.05k stars 1.82k forks source link

password is visible in the task log when use jdbc source #6357

Open jeanleen opened 9 months ago

jeanleen commented 9 months ago

Search before asking

What happened

when i use jdbc source, all jdbc config print in the log, especially the clear password . it is unsafe

SeaTunnel Version

2.3.3

SeaTunnel Config

env {
  parallelism = 5
  spark.app.name = "seatunnel_development"
  spark.executor.instances = 2
  spark.executor.cores = 2
  spark.executor.memory = "6g"
  job.mode = "BATCH"
}
source{
    Jdbc {
        url = "jdbc:oracle:thin:@xxxxx:1521/xxxx"
        driver = "oracle.jdbc.OracleDriver"
        user = "PDC_USER"
        password = "xxxxxx"
        query = " select  xxxxx"

    }
}

sink {

    HdfsFile {
      fs.defaultFS = "hdfs://xxxxx:8020"
      path = "/user/hive/warehouse/stg.db/stg_pdc_smt_get_product/"
      file_format_type = "orc"

    }

}

Running Command

start-seatunnel-spark-3-connector-v2.sh

Error Exception

[INFO] 2024-02-16 06:00:10.023 +0800 -  -> 24/02/16 06:00:09 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    24/02/16 06:00:09 INFO ConfigBuilder: Loading config file from path: /usr/local/dolphinscheduler/data/exec/process/imc_bp/12328812324448/12328890234592_6/112/288/seatunnel_112_288.conf
    24/02/16 06:00:09 INFO ConfigShadeUtils: Load config shade spi: [base64]
[INFO] 2024-02-16 06:00:11.024 +0800 -  -> 24/02/16 06:00:10 INFO ConfigBuilder: Parsed config file: {
        "env" : {
            "parallelism" : 5,
            "spark.app.name" : "seatunnel_development",
            "spark.executor.instances" : 2,
            "spark.executor.cores" : 2,
            "spark.executor.memory" : "6g",
            "job.mode" : "BATCH"
        },
        "source" : [
            {
                "password" : "xxxxxxx",
                "driver" : "oracle.jdbc.OracleDriver",
                "query" : " ",
                "plugin_name" : "Jdbc",
                "user" : "PDC_USER",
                "url" : "jdbc:oracle:thin:@xxxxxx:1521/imc.oa.pdc"
            }
        ],
        "sink" : [
            {
                "fs.defaultFS" : "hdfs://xxxxx:8020",
                "path" : "/user/hive/warehouse/stg.db/stg_pdc_smt_get_product/",
                "file_format_type" : "orc",
                "plugin_name" : "HdfsFile"
            }
        ]
    }

Zeta or Flink or Spark Version

spark 3

Java or Scala Version

java 1.8 scala 2.12

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

Gupta-Suruchi commented 9 months ago

Hi @jeanleen, I would like to work on this issue, Kindly assign it to me!

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.