- spring-boot-starter-mail 기반 EmailPassNotifier: acs.sms.provider=email일 때 활성. 발신=acs.mail.from(기본 dept_itcm000@bok.or.kr), 수신=방문자 email, QR PNG를 첨부하고 공개 출입증 링크를 본문에 포함. 발송 실패는 log(승인 롤백 없음). - provider 스위치에 email 추가(dev/hanbank/email). prod는 spring.mail.* 를 ACS_MAIL_* env로 주입(인증 선택), .env.example·docker-compose 반영. - 테스트: EmailPassNotifierTest(발신/수신/제목/QR 첨부 구성, 이메일 없으면 미발송). 검증: 전체 5개 테스트 통과. 로컬 SMTP(aiosmtpd:1025)로 실발송 e2e 확인 — MAIL FROM=dept_itcm000@bok.or.kr, RCPT=visitor, 제목/본문/pass-qr.png 첨부 수신 확인. 주의: 발신자가 bok.or.kr이면 SPF/DMARC상 실제 사내 SMTP 릴레이를 거쳐야 하며, ACS_MAIL_HOST/PORT(및 필요 시 인증) 확보 후 실환경 발송 배선 필요. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
# ACS (Access Control System) environment — copy to .env and edit
|
|
|
|
# Database
|
|
POSTGRES_USER=acs
|
|
POSTGRES_PASSWORD=change_me
|
|
POSTGRES_DB=acs
|
|
|
|
# Web (nginx) published port
|
|
WEB_PORT=80
|
|
|
|
# ===== Pass delivery =====
|
|
# dev : no network — logs the message + writes the QR image to the outbox
|
|
# hanbank : sends an LMS with the public pass link via the in-house DMZ API
|
|
# email : emails the pass (QR attached) via the SMTP relay below
|
|
ACS_SMS_PROVIDER=dev
|
|
ACS_SMS_API_URL=http://210.104.132.59:8000
|
|
|
|
# ===== Email pass delivery (only used when ACS_SMS_PROVIDER=email) =====
|
|
# Sender = shared departmental mailbox; relay = corporate SMTP server.
|
|
ACS_MAIL_FROM=dept_itcm000@bok.or.kr
|
|
ACS_MAIL_HOST=
|
|
ACS_MAIL_PORT=25
|
|
# Set only if the relay requires SMTP AUTH (internal relays often do not):
|
|
ACS_MAIL_USERNAME=
|
|
ACS_MAIL_PASSWORD=
|
|
ACS_MAIL_SMTP_AUTH=false
|
|
ACS_MAIL_STARTTLS=false
|
|
# URL the SMS link points to — MUST be reachable from the visitor's phone
|
|
# (the server's real address/domain, not localhost). e.g. https://acs.example.co.kr
|
|
ACS_PUBLIC_BASE_URL=http://localhost
|
|
|
|
# ===== Security =====
|
|
# CORS allowed origins (comma-separated). Leave EMPTY when web+API share one origin
|
|
# via nginx (default). Set only if the SPA is hosted on a different origin.
|
|
ACS_CORS_ALLOWED_ORIGINS=
|
|
# Set to true ONLY when the site is served over HTTPS — marks the session cookie Secure.
|
|
# Leaving it false over plain http keeps login working; true over http would break it.
|
|
ACS_COOKIE_SECURE=false
|