From aef49f6faffbd93350f322db5fad339e2867656b Mon Sep 17 00:00:00 2001 From: jack <jack.su@pollex.com.tw> Date: 星期一, 18 九月 2023 17:08:10 +0800 Subject: [PATCH] [UPDATE] 解決弱點Cleartext sensitive data in a database --- pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java | 111 ++++++++++++++++++++++++------------------------------- 1 files changed, 49 insertions(+), 62 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java b/pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java index 3841d13..a20d500 100644 --- a/pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java +++ b/pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java @@ -1,5 +1,9 @@ package com.pollex.pam.config; +import com.pollex.pam.business.config.AppProperties; +import com.pollex.pam.business.config.SendEmailProperties; +import com.pollex.pam.business.config.SendSMSProperties; +import com.pollex.pam.business.enums.SendEmailMsgMethod; import org.springframework.boot.context.properties.ConfigurationProperties; /** @@ -9,7 +13,7 @@ * See {@link tech.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) -public class ApplicationProperties { +public class ApplicationProperties implements AppProperties { private boolean mockLogin; private String otpWebServiceUrl; @@ -18,8 +22,12 @@ private String eServiceLoginUrl; private String eServiceLoginFunc; private String eServiceLoginSys; - private SMS sms; - private Email email; + private String frontEndDomain; + private SendSMSProperties sms; + private SendEmailProperties email; + private String fileFolderPath; + private String aesKey; + private String defaultPaxxword; public boolean isMockLogin() { return mockLogin; @@ -77,79 +85,58 @@ this.eServiceLoginSys = eServiceLoginSys; } - public SMS getSms() { + public String getFrontEndDomain() { + return frontEndDomain; + } + + public void setFrontEndDomain(String frontEndDomain) { + this.frontEndDomain = frontEndDomain; + } + + public SendSMSProperties getSms() { return sms; } - public void setSms(SMS sms) { + public void setSms(SendSMSProperties sms) { this.sms = sms; } - public Email getEmail() { + public SendEmailProperties getEmail() { return email; } - public void setEmail(Email email) { + public void setEmail(SendEmailProperties email) { this.email = email; } - public static class SMS { - private String url; - private String sourceCode; - private String sender; - private String smsType; + public String getFileFolderPath() { + return fileFolderPath; + } - public String getUrl() { - return url; - } + public void setFileFolderPath(String fileFolderPath) { + this.fileFolderPath = fileFolderPath; + } + + @Override + public String getAesKey() { + return aesKey; + } - public void setUrl(String url) { - this.url = url; - } + public void setAesKey(String aesKey) { + this.aesKey = aesKey; + } + + @Override + public String getDefaultPaxxword() { + return defaultPaxxword; + } - public String getSourceCode() { - return sourceCode; - } + public void setDefaultPaxxword(String defaultPaxxword) { + this.defaultPaxxword = defaultPaxxword; + } + + + + - public void setSourceCode(String sourceCode) { - this.sourceCode = sourceCode; - } - - public String getSender() { - return sender; - } - - public void setSender(String sender) { - this.sender = sender; - } - - public String getSmsType() { - return smsType; - } - - public void setSmsType(String smsType) { - this.smsType = smsType; - } - } - - public static class Email { - private String url; - private String functionId; - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getFunctionId() { - return functionId; - } - - public void setFunctionId(String functionId) { - this.functionId = functionId; - } - } } -- Gitblit v1.8.0