Is PD have any authentication method to limit databases Spark can access? because if someone know my PD address, they can use TiSark to connect to TiDB and query on my databases.
I have setup a TiDB cluster, then I add a new user, I connect to TiDB by new user and create a new database. When I use Spark to connect to TiDB through PD, I call "show databases" and it return all my database include new database I have created by new user.
My spark session is:
val _spark = SparkSession.builder()
.master("spark://127.0.0.1:7077") //local[*]
.config("spark.tispark.pd.addresses", "127.0.0.1:2379")
.config("spark.sql.extensions","org.apache.spark.sql.TiExtensions")
.appName("SparkApp")
.getOrCreate()
I wonder if someone know where are my PDs is, they can hack to my databases. I have read TiDB document carefully but no where mentioned about it.