Skip to content

Commit

Permalink
[Feature] Improve the search_owner when query the app list
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Oct 15, 2022
1 parent 09d689d commit e6bc850
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ package org.apache.streampark.common.conf
import java.time.LocalDateTime

object ConfigConst {

/**
* common const
*
*/

val DEFAULT_DATAMASK_STRING = "********"

/**
*
* about parameter...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ object InternalConfigHolder extends Logger {
logInfo(
s"""registered configs:
|ConfigHub collected configs: ${configKeys.size}
| ${configKeys.map(key => s"$key = ${if (key.contains("password")) "********" else get(key)}").mkString("\n ")}""".stripMargin)
| ${configKeys.map(key => s"$key = ${if (key.contains("password")) ConfigConst.DEFAULT_DATAMASK_STRING else get(key)}").mkString("\n ")}""".stripMargin)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.streampark.common.util

import org.apache.streampark.common.conf.ConfigConst
import redis.clients.jedis._
import redis.clients.jedis.exceptions.JedisConnectionException

Expand Down Expand Up @@ -86,7 +87,7 @@ object RedisClient extends Logger {
* @return
*/
def createJedisPool(endpoint: RedisEndpoint): JedisPool = {
val endpointEn: RedisEndpoint = endpoint.copy(auth = "********")
val endpointEn: RedisEndpoint = endpoint.copy(auth = ConfigConst.DEFAULT_DATAMASK_STRING)
logInfo(s"[StreamPark] RedisClient: createJedisPool with $endpointEn ")
new JedisPool(poolConfig, endpoint.host, endpoint.port, endpoint.timeout, endpoint.auth, endpoint.db)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.streampark.console.system.entity;

import org.apache.streampark.common.conf.ConfigConst;
import org.apache.streampark.console.core.enums.UserType;

import com.baomidou.mybatisplus.annotation.IdType;
Expand Down Expand Up @@ -103,8 +104,9 @@ public class User implements Serializable {
private Long teamId;

public void dataMasking() {
this.setPassword("******");
this.setSalt("******");
String dataMask = ConfigConst.DEFAULT_DATAMASK_STRING();
this.setPassword(dataMask);
this.setSalt(dataMask);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.streampark.flink.connector.clickhouse.conf

import org.apache.streampark.common.conf.ConfigConst
import org.apache.streampark.flink.connector.conf.ThresholdConf

import java.util.{Base64, Properties}
Expand Down Expand Up @@ -67,7 +68,7 @@ class ClickHouseHttpConfig(parameters: Properties) extends ThresholdConf(ClickHo

override def toString: String = {
s"""
|{ user: $user, password: ******, hosts: ${hosts.mkString(",")} }
|{ user: $user, password: ${ConfigConst.DEFAULT_DATAMASK_STRING}, hosts: ${hosts.mkString(",")} }
|""".stripMargin
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
*/
package org.apache.streampark.connector.doris.conf

import java.util.Properties
import org.apache.streampark.common.conf.ConfigConst

import java.util.Properties
import scala.collection.JavaConversions._

object DorisConfig {
Expand Down Expand Up @@ -83,7 +84,7 @@ class DorisConfig(parameters: Properties) {

override def toString: String = {
s"""
|{ doris user: $user, password: ******, hosts: ${loadUrl.mkString(",")} }
|{ doris user: $user, password: ${ConfigConst.DEFAULT_DATAMASK_STRING}, hosts: ${loadUrl.mkString(",")} }
|""".stripMargin
}
}

0 comments on commit e6bc850

Please sign in to comment.