admin , front 수정 및 vm 수정
This commit is contained in:
@@ -23,4 +23,31 @@ spring:
|
||||
# 메시지 소스 캐시 지속 시간(초)
|
||||
# 4초마다 메시지 파일을 다시 읽어옵니다
|
||||
# 개발 시에는 짧은 간격으로, 운영 시에는 길게 설정하는 것이 일반적
|
||||
cache-duration: 10s
|
||||
cache-duration: 10s
|
||||
thymeleaf:
|
||||
# 타임리프 템플릿 캐시 비활성화 (개발 환경에서는 false 로 설정 권장)
|
||||
cache: false
|
||||
# ==============================================
|
||||
# 데이터베이스 설정
|
||||
# ==============================================
|
||||
datasource:
|
||||
kri:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
jdbc-url: ENC(SH5G+4mdOrW3PpVEmVyNXIFyV7eFC6uLTa0e18qa+7ueQeWrduIeGVJLrQP3mUw86dzqLK7AUHjTRuex4ud+rTt026L7csDLFYzLWGkGCTEqfFBOwHng3uQ7n+qmkKiW)
|
||||
username: ENC(37ccHxlpbsEz8vVcZUZA/j6azKYhP3eHwhOYVjYGf+zKC3u/qc+khKcKuBuE8+Ck)
|
||||
password: ENC(uBHyXdI39UzPNvYNHDGfjmMMuhN83xoP8F3wDq/S9DxizhFwbMeEqa36oZ205CBg)
|
||||
mms:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
jdbc-url: jdbc:postgresql://15.165.180.203:5432/ko_research_hyunjoo
|
||||
username: hyunjoo
|
||||
password: hyunjoo1@#4
|
||||
maximum-pool-size: 2
|
||||
minimum-idle: 1
|
||||
|
||||
# ==============================================
|
||||
# 암호화 설정
|
||||
# ==============================================
|
||||
jasypt:
|
||||
encryptor:
|
||||
password: etribe
|
||||
algorithm: PBEWITHHMACSHA512ANDAES_256
|
||||
@@ -19,11 +19,22 @@ logging:
|
||||
# 메시지 및 국제화(i18n) 설정
|
||||
# ==============================================
|
||||
spring:
|
||||
messages:
|
||||
# 메시지 소스 캐시 지속 시간 (단위: 초)
|
||||
# 개발 환경에서는 짧은 간격(10-60초), 운영 환경에서는 긴 간격(3600초 이상) 권장
|
||||
cache-duration: 5m
|
||||
|
||||
# ==============================================
|
||||
# 데이터베이스 설정
|
||||
# ==============================================
|
||||
datasource:
|
||||
kri:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
jdbc-url: ENC(mF3Z0fgCagFruOk/F2Z2PYzXhwGedE1secfYDgci+ke9z8xFEZ/GWbgXA4XeSq5D+k9/oRLOxzwx/D24tswdoHdQugHmGb0UqrW4vGBa7YFJvcnWylOpd5ppUeEIUJGv)
|
||||
username: ENC(cNXntROGOeM115QfLlVhhBz8+qY70eTWwmwLM+7AMslWmfWTq9ZPl4pVnDopJauM)
|
||||
password: ENC(kUIzqWTu0+bqjYH4Jq9TFOOh3UwY+XVvA2OlT4VXJvxWCas66UNdGRmWDQKri5fI)
|
||||
mms:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
jdbc-url: ENC(TZ7H8DIFZDbsNp3PRWbz3bkJbjsx3580ljmELMJInASgpiEH66Lb8adpjt5WGXoIdZbHetlgtEFo8F+U8XUa9fjYWNOpiZ+D99XoXJUOP3s=)
|
||||
username: ENC(cNXntROGOeM115QfLlVhhBz8+qY70eTWwmwLM+7AMslWmfWTq9ZPl4pVnDopJauM)
|
||||
password: ENC(kUIzqWTu0+bqjYH4Jq9TFOOh3UwY+XVvA2OlT4VXJvxWCas66UNdGRmWDQKri5fI)
|
||||
maximum-pool-size: 2
|
||||
minimum-idle: 1
|
||||
# ==============================================
|
||||
# 서버 압축 설정
|
||||
# ==============================================
|
||||
|
||||
@@ -10,6 +10,17 @@ spring:
|
||||
# 메시지 캐시 지속 시간(초)
|
||||
cache-duration: 4
|
||||
# ==============================================
|
||||
# 데이터베이스 설정
|
||||
# ==============================================
|
||||
datasource:
|
||||
hikari:
|
||||
maximum-pool-size: 10
|
||||
minimum-idle: 5
|
||||
idle-timeout: 120000
|
||||
max-lifetime: 900000
|
||||
connection-timeout: 5000
|
||||
leak-detection-threshold: 30000
|
||||
# ==============================================
|
||||
# 정적 리소스 설정
|
||||
# ==============================================
|
||||
web:
|
||||
|
||||
@@ -6,7 +6,9 @@ import org.jasypt.iv.RandomIvGenerator;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class TestJasyptConfig {
|
||||
// 운영 서버만 옵션 비꾸기
|
||||
private String jasyptPassword = "etribe";
|
||||
private String jasyptPasswordPrd = "ko-research";
|
||||
|
||||
//PBEWithMD5AndDES
|
||||
//PBEWITHHMACSHA512ANDAES_256
|
||||
@@ -33,6 +35,50 @@ public class TestJasyptConfig {
|
||||
|
||||
System.out.println("encryptPassword : " + encryptPassword);
|
||||
Assertions.assertThat(password).isEqualTo(jasyptDecryt(encryptPassword));
|
||||
|
||||
|
||||
System.out.println("--------------------------------" );
|
||||
|
||||
System.out.println("운영서버 정보 엔코딩" );
|
||||
String url2 = "jdbc:postgresql://115.68.193.117:5432/korea_research";
|
||||
String encryptUrl2 = jasyptEncryptPrd(url2);
|
||||
|
||||
System.out.println("encryptUrl2 : " + encryptUrl2);
|
||||
Assertions.assertThat(url2).isEqualTo(jasyptDecrytPrd(encryptUrl2));
|
||||
|
||||
|
||||
String username2 = "etribe";
|
||||
String encryptUsername2 = jasyptEncryptPrd(username2);
|
||||
|
||||
System.out.println("encryptUsername2 : " + encryptUsername2);
|
||||
Assertions.assertThat(username2).isEqualTo(jasyptDecrytPrd(encryptUsername2));
|
||||
|
||||
|
||||
String password2 = "Etribe@3415";
|
||||
String encryptPassword2 = jasyptEncryptPrd(password2);
|
||||
System.out.println("encryptPassword2 : " + encryptPassword2);
|
||||
|
||||
System.out.println("--------------------------------" );
|
||||
|
||||
System.out.println("운영서버 정보 MMS 엔코딩" );
|
||||
String url3 = "jdbc:postgresql://115.68.193.117:5432/ppurio";
|
||||
String encryptUrl3 = jasyptEncryptPrd(url3);
|
||||
|
||||
System.out.println("encryptUrl3 : " + encryptUrl3);
|
||||
Assertions.assertThat(url3).isEqualTo(jasyptDecrytPrd(encryptUrl3));
|
||||
|
||||
|
||||
String username3 = "etribe";
|
||||
String encryptUsername3 = jasyptEncryptPrd(username3);
|
||||
|
||||
System.out.println("encryptUsername3 : " + encryptUsername3);
|
||||
Assertions.assertThat(username3).isEqualTo(jasyptDecrytPrd(encryptUsername3));
|
||||
|
||||
|
||||
String password3 = "Etribe@3415";
|
||||
String encryptPassword3 = jasyptEncryptPrd(password3);
|
||||
System.out.println("encryptPassword3 : " + encryptPassword3);
|
||||
|
||||
}
|
||||
|
||||
private String jasyptEncrypt(String input) {
|
||||
@@ -50,4 +96,21 @@ public class TestJasyptConfig {
|
||||
encryptor.setIvGenerator(new RandomIvGenerator());
|
||||
return encryptor.decrypt(input);
|
||||
}
|
||||
|
||||
|
||||
private String jasyptEncryptPrd(String input) {
|
||||
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
|
||||
encryptor.setAlgorithm(jasyptAlgorithm);
|
||||
encryptor.setPassword(jasyptPasswordPrd);
|
||||
encryptor.setIvGenerator(new RandomIvGenerator());
|
||||
return encryptor.encrypt(input);
|
||||
}
|
||||
|
||||
private String jasyptDecrytPrd(String input){
|
||||
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
|
||||
encryptor.setAlgorithm(jasyptAlgorithm);
|
||||
encryptor.setPassword(jasyptPasswordPrd);
|
||||
encryptor.setIvGenerator(new RandomIvGenerator());
|
||||
return encryptor.decrypt(input);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user