refactor: 백엔드 리펙토링 진행 중

This commit is contained in:
DongHyeonka
2026-09-25 17:57:07 +09:00
parent fe80bb3ff3
commit fcddab7e2a
7518 changed files with 3217541 additions and 21259 deletions
+5 -5
View File
@@ -132,7 +132,7 @@ redact_in_place() {
random_secret() { head -c 32 /dev/urandom | base64 | tr -d '=+/' | cut -c1-32; }
# Key material, which is not the same thing as a password. The notification platform base64-decodes
# each of its eight keys and requires at least 32 bytes, so random_secret's alphanumeric 32
# each of its seven keys and requires at least 32 bytes, so random_secret's alphanumeric 32
# characters decode to 24 and are rejected. This keeps the padding and the full alphabet.
random_key() { head -c 32 /dev/urandom | base64 | tr -d '\n'; }
@@ -261,19 +261,19 @@ run_lane() {
export APP_HEALTH_PATH=/v1/healthcheck
fi
# The notification platform's eight purpose-scoped keys.
# The notification platform's seven purpose-scoped keys.
#
# All eight, always, for every lane — not only the notification ones. They cost nothing when the
# All seven, always, for every lane — not only the notification ones. They cost nothing when the
# capability is off, because the platform binds nothing at all then, and a lane that supplies only
# the keys it currently needs is a lane that breaks the moment a switch is added to it.
#
# Distinct by construction: the platform refuses to start if two purposes carry the same material,
# which is the check that stops one leaked key from being all eight. Each is redacted from the
# which is the check that stops one leaked key from being all seven. Each is redacted from the
# evidence like every other generated value.
local -a notification_keys=()
local purpose
for purpose in CONTACT_ENCRYPTION CONTACT_LOOKUP_HMAC CALLBACK_SIGNING PROVIDER_CREDENTIAL \
PAYLOAD_ENCRYPTION VAPID_SIGNING PROVIDER_REQUEST_LOOKUP_HMAC \
PAYLOAD_ENCRYPTION PROVIDER_REQUEST_LOOKUP_HMAC \
CALLBACK_FINGERPRINT_HMAC; do
local value; value="$(random_key)"
GENERATED_SECRETS+=("${value}")