feat(jasypt): 引入jasypt配置加密支持敏感信息脱敏
根pom与启动模块引入jasypt-spring-boot-starter, application.yml配置encryptor口令走环境变量/JVM参数注入。
This commit is contained in:
@@ -48,6 +48,12 @@
|
|||||||
<groupId>org.flywaydb</groupId>
|
<groupId>org.flywaydb</groupId>
|
||||||
<artifactId>flyway-core</artifactId>
|
<artifactId>flyway-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- jasypt 配置加密(启动时解密 ENC() 包裹的敏感配置) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.ulisesbocchio</groupId>
|
||||||
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -4,3 +4,13 @@ spring:
|
|||||||
profiles:
|
profiles:
|
||||||
active: '@profile.name@'
|
active: '@profile.name@'
|
||||||
include: flow
|
include: flow
|
||||||
|
|
||||||
|
# ============================================
|
||||||
|
# 敏感配置加密(jasypt)
|
||||||
|
# 口令 JASYPT_ENCRYPTOR_PASSWORD 走环境变量/JVM参数注入,严禁写死明文
|
||||||
|
# ============================================
|
||||||
|
jasypt:
|
||||||
|
encryptor:
|
||||||
|
password: ${JASYPT_ENCRYPTOR_PASSWORD:}
|
||||||
|
algorithm: PBEWITHHMACSHA512ANDAES_256
|
||||||
|
iv-generator-classname: org.jasypt.iv.RandomIvGenerator
|
||||||
@@ -102,6 +102,9 @@
|
|||||||
|
|
||||||
<flowable.version>6.8.0</flowable.version>
|
<flowable.version>6.8.0</flowable.version>
|
||||||
|
|
||||||
|
<!-- 配置文件敏感信息加密 -->
|
||||||
|
<jasypt.version>3.0.5</jasypt.version>
|
||||||
|
|
||||||
<qiniu-uapp-sdk.version>7.4.0</qiniu-uapp-sdk.version>
|
<qiniu-uapp-sdk.version>7.4.0</qiniu-uapp-sdk.version>
|
||||||
|
|
||||||
<jsoup.version>1.11.3</jsoup.version>
|
<jsoup.version>1.11.3</jsoup.version>
|
||||||
@@ -527,6 +530,12 @@
|
|||||||
<artifactId>flyway-core</artifactId>
|
<artifactId>flyway-core</artifactId>
|
||||||
<version>7.15.0</version>
|
<version>7.15.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- jasypt 配置加密 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.ulisesbocchio</groupId>
|
||||||
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||||
|
<version>${jasypt.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user