mirror of
https://github.com/headporter81/specialsource-homepage-backend.git
synced 2026-08-08 15:41:11 +09:00
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
package company.specialsource.config;
|
||||
|
||||
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||
import org.jasypt.encryption.StringEncryptor;
|
||||
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
|
||||
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@EnableEncryptableProperties
|
||||
public class JasyptConfig {
|
||||
|
||||
@Value("${jasypt.encryptor.password}")
|
||||
private String password;
|
||||
|
||||
@Bean("jasyptStringEncryptor")
|
||||
public StringEncryptor stringEncryptor() {
|
||||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
|
||||
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
|
||||
config.setPassword(password); // 암호화 키 (절대 외부에 유출 금지!)
|
||||
config.setAlgorithm("PBEWithMD5AndDES");
|
||||
config.setKeyObtentionIterations("1000");
|
||||
config.setPoolSize("1");
|
||||
config.setProviderName("SunJCE");
|
||||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
|
||||
config.setIvGeneratorClassName("org.jasypt.iv.NoIvGenerator");
|
||||
config.setStringOutputType("base64");
|
||||
encryptor.setConfig(config);
|
||||
return encryptor;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://192.168.0.215:5435/mydb
|
||||
url: jdbc:postgresql://localhost:5435/mydb
|
||||
username: headporter
|
||||
password: ENC(Gg03NzjjcVOrFSXoBrPEusNgDNbYOPO4)
|
||||
driver-class-name: org.postgresql.Driver
|
||||
@@ -16,6 +16,10 @@ spring:
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: 81sungjin1015
|
||||
algorithm: PBEWithMD5AndDES
|
||||
iv-generator-classname: org.jasypt.iv.NoIvGenerator
|
||||
key-obtention-iterations: 1000
|
||||
pool-size: 1
|
||||
|
||||
jwt:
|
||||
# 256비트 이상이어야 하므로 영문+숫자 (최소 32글자 이상)
|
||||
|
||||
Reference in New Issue
Block a user