seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

password is visible in the task log when use jdbc source

Open jeanleen opened this issue 2 years ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

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?

  • [X] Yes I am willing to submit a PR!

Code of Conduct

jeanleen avatar Feb 19 '24 09:02 jeanleen

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

Gupta-Suruchi avatar Feb 19 '24 12:02 Gupta-Suruchi

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.

github-actions[bot] avatar Mar 21 '24 00:03 github-actions[bot]