diff --git a/.github/workflows/ci-ecr.yaml b/.github/workflows/ci-ecr.yaml index c7040de..91cba5b 100644 --- a/.github/workflows/ci-ecr.yaml +++ b/.github/workflows/ci-ecr.yaml @@ -169,12 +169,27 @@ jobs: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update +<<<<<<< HEAD + - name: Deploy Prometheus stack (if not exists) +======= - name: Deploy Prometheus stack +>>>>>>> 8a96b4e17e4781d84c1349921ac7414b5f8d6ec3 run: | + kubectl delete secret alertmanager-prometheus-stack-kube-prom-alertmanager -n monitoring --ignore-not-found=true + + sed "s/GMAIL_APP_PASSWORD/${{ secrets.GMAIL_APP_PASSWORD }}/g" \ + manifest/base/monitoring/grafana-values.yaml > temp-values.yaml + helm upgrade --install kube-prometheus-stack prometheus-community/kube-prometheus-stack \ --namespace monitoring --create-namespace \ +<<<<<<< HEAD + --values temp-values.yaml + + rm temp-values.yaml +======= --values manifest/base/monitoring/grafana-values.yaml \ --values manifest/base/monitoring/alertmanager-values.yaml \ --set alertmanager.config.global.smtp_auth_password=${{ secrets.GMAIL_APP_PASSWORD }} +>>>>>>> 8a96b4e17e4781d84c1349921ac7414b5f8d6ec3 diff --git a/src/main/java/com/matchFit/common/config/RedisConfig.java b/src/main/java/com/matchFit/common/config/RedisConfig.java index d41a9c3..a508ed6 100644 --- a/src/main/java/com/matchFit/common/config/RedisConfig.java +++ b/src/main/java/com/matchFit/common/config/RedisConfig.java @@ -61,19 +61,25 @@ public LettuceConnectionFactory redisConnectionFactory() { // 2) Lettuce 클라이언트 설정 분기 + + LettuceClientConfiguration.LettuceSslClientConfigurationBuilder clientBuilder = LettuceClientConfiguration.builder().useSsl(); // LettuceClientConfiguration clientConfig = LettuceClientConfiguration.builder() // .build(); + // if (sslEnabled) { // clientBuilder // .useSsl() // SSL/TLS 사용 // .disablePeerVerification(); // 인증서 검증 끌 때 (필요 시) // } - LettuceClientConfiguration clientConfig = clientBuilder.build(); + + LettuceClientConfiguration clientConfig = clientBuilder.build(); + + diff --git a/src/main/java/com/matchFit/user/service/AccountRecoveryService.java b/src/main/java/com/matchFit/user/service/AccountRecoveryService.java index 2557fff..6c7209e 100644 --- a/src/main/java/com/matchFit/user/service/AccountRecoveryService.java +++ b/src/main/java/com/matchFit/user/service/AccountRecoveryService.java @@ -4,6 +4,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.util.UriComponentsBuilder; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; @@ -30,7 +31,7 @@ public class AccountRecoveryService { private final JavaMailSender mailSender; - @Value("${spring.mail.username}") + @Value("${app.mail.from}") private String fromAddress; @Value("${app.frontend.reset-password-url}") @@ -84,7 +85,13 @@ public void confirmReset(PasswordResetRequest req) { // 내부 메일 발송 유틸 private void sendPasswordResetMail(String to, String token) { - String link = resetUrlBase + token; + //String link = resetUrlBase + token; + String link = UriComponentsBuilder.fromHttpUrl(resetUrlBase) + .replaceQuery(null) + .queryParam("token", token.trim()) + .build(true) + .toUriString(); + String subject = "[MatchFit] 비밀번호 재설정 안내"; String body = """ 안녕하세요. diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4a0416f..58b5e28 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -51,15 +51,6 @@ aws.credentials.secret-key=1 #spring.servlet.multipart.max-file-size=10MB #spring.servlet.multipart.max-request-size=10MB -# Gmail SMTP -spring.mail.host=smtp.gmail.com -spring.mail.port=587 -spring.mail.username=matchfit00@gmail.com -spring.mail.password=zlvv bplp gsrx beuk -spring.mail.properties.mail.smtp.auth=true -spring.mail.properties.mail.smtp.starttls.enable=true -spring.mail.default-encoding=UTF-8 - #app.frontend.reset-password-url=https://www.match-fit.store/login/reset-password/index.html?token= #app.password-reset.ttl-minutes=15 @@ -74,14 +65,28 @@ spring.servlet.multipart.max-file-size=10MB spring.servlet.multipart.max-request-size=10MB # mail -spring.mail.host=smtp.gmail.com +#spring.mail.host=smtp.gmail.com +#spring.mail.port=587 +#spring.mail.username= +#spring.mail.password= +#spring.mail.properties.mail.smtp.auth=true +#spring.mail.properties.mail.smtp.starttls.enable=true +#spring.mail.default-encoding=UTF-8 + +# SES SMTP +spring.mail.host=email-smtp.ap-northeast-2.amazonaws.com spring.mail.port=587 -spring.mail.username= -spring.mail.password= +spring.mail.username= +spring.mail.password= spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.default-encoding=UTF-8 +spring.mail.test-connection=false +management.health.mail.enabled=false + +app.mail.from=no-reply@match-fit.store + app.frontend.reset-password-url=http://localhost:3000/login/reset-password?token= app.password-reset.ttl-minutes=15