Files
clean-architecture-backend-…/infra/redis-sdk/acl
DongHyeonka f40c03c6d3 fix: 3차 확인 리뷰의 Minor 19건을 고친다
문제: 3차 수정의 확인 리뷰가 새 Important 없이 Minor 19건을 남겼다.
동작에 닿는 것이 셋이다. JDK read-idle watchdog이 공용 ForkJoinPool에서
돌아 그 풀이 바쁘면 300ms timeout이 6초 가까이 늦었다. 붙여 쓴
-x<task>를 verifyStrictLaneStages가 읽지 않아 lane을 뺀 workflow가
통과했다. 사용자 전송이 중간 클래스를 거쳐 @SystemCaller bean을 부르면
ArchUnit 규칙을 지났다. 잠금 대기 검사기는 FK·trigger·REINDEX와
lock_timeout = 0을 못 봤고, 쿼터 보정 SQL은 코드와 다른 모양의 행을
넣었다.

방법: 영역별 4묶음이 맡은 Minor만 test-driven-development 절차로
고쳤다(재리뷰 README 12절).
- watchdog은 전용 데몬 스레드 하나에서 돌고 스트림을 닫으면 작업을
  취소한다. read당 비용은 그대로다(21–24ns).
- 사용자 전송 → @SystemCaller는 직접·간접 의존 모두 거부한다. 리뷰가
  권한 직접 의존 검사는 중간 클래스 하나로 다시 열려서 버렸다.
- 검사기를 보강하면서 새로 걸린 이미 배포된 마이그레이션 5개는 내용을
  바꾸지 않고 동결 목록에 더했다(main과 blob이 같다).
- 비밀 목록 bean은 규칙보다 먼저 만들어 실제 클래스로 검사한다.

위험·한계: 회복 필요 예외 메시지 끝에 scope digest가 붙고 기동 실패
문구가 바뀌어, 문구 전체에 맞추던 로그 매처는 고쳐야 한다. 코드가 든
Redis 계정 참조의 fixture- 검사는 문서로만 막았다(코드로 막으려면 새
의존 edge가 필요하다). failure-retention ≥ replay-ttl 기동 검사는 넣지
않았다. -mx 같은 짧은 플래그 묶음과 graphql 전송 fixture는 남았다.
spotbugsTestFixtures(게이트 밖)의 정규식 경고가 15건으로 늘었다.

검증: ci, 두 빌드의 verifyStrictLaneStages --dry-run, mainCheck,
:integrationCheck, -p optional-platforms ci integrationCheck
performanceCheck, :performanceCheck, :releaseCheck(-PgitRevision),
verify-compose-profile-contracts(18 lane) 첫 실행 통과. watchdog은
공용 풀을 채운 상태에서 300ms 설정이 300ms에 끝나는 것을 쟀다.

Refs: docs/reviews/2026-11-03-rereview/README.md 11·12절, round3/
2026-11-04 03:00:21 +09:00
..

ACL accounts — test fixtures, not a deployment file

Nothing in this directory is loaded by a deployment. Every file here is a fixture for the local and test lanes: its passwords are public (fixture-*, written in this repository), and lane-fixture-accounts.acl also provisions three accounts that only a lane topology needs — among them ca-skeleton-cluster-bootstrap, which has ~* &* +@all, every command on every key. Loaded into a real Redis, that line alone gives anyone who can reach the server and read this repository full control of it (CONFIG, MODULE, every key). A deployment writes its own ACL file of the same shape: the application accounts it actually uses, passwords from its secret store, and none of the lane-only accounts (review 2026-11-03 RR-07-04). The application enforces its half of that: under the prod runtime profile it refuses to start while a secret holds a value beginning with fixture- (SecretSourceValidator): a key the secrets registry classifies secret, a variable a module's RequiredProductionSecrets bean names, or the variable a secret://…/<VAR> credential reference in the environment names. A reference held in code — the typed SDK's admin account, contributed as a RedisAccountContribution bean — is none of those: the composer names its variable in a RequiredProductionSecrets bean too (src/adapter/outbound/redis-sdk/README.md), or the fixture-admin password passes. A deployment that copied a lane's APP_REDIS_AUTHENTICATION_*_REFERENCE and REDIS_LANE_* values stops before it connects. Values that are not secrets — a pod's HOSTNAME, an application name — are not read, because fixture- is an ordinary word as well.

One file per CommandAccess level. Each account is deliberately narrower than the SDK's own rules: the account is the last enforcement boundary and a permit issued inside the process never widens it, so a mistake in the SDK is still refused by the server.

A Redis ACL file accepts nothing but complete user lines — no comments and no line continuations — which is why the rationale lives here instead of inline.

Every account here carries a fixture password (fixture-*). They are written down rather than left as nopass because an account that accepts any password makes every assertion about authentication pass for the same reason a typo would have — and because these files are what a fork copies. The four per-role files carried nopass long after the combined lane file had been fixed; a fork that copied one of them got an open account and a green lane.

File Account Grants
application.acl CommandAccess.APPLICATION the typed data-structure commands over prod:*, with the dangerous and deprecated names denied
application-advanced.acl APPLICATION_ADVANCED the above plus pub/sub, transactions, and the registered-script path. EVAL is absent: only EVALSHA of an already loaded digest is reachable. +time is granted because the rate-limit and idempotency scripts read the server clock with redis.call('TIME'), and TIME is in no data category (@read/@write): without it every such script fails with an ACL error. The startup SCRIPT probe runs TIME so a template missing it fails at boot
raw-gateway.acl RAW_GATEWAY exactly the commands the catalog classifies RAW_ONLY, and nothing else
lane-fixture-accounts.acl – what the lanes load (Redis takes one aclfile): user default off, the four per-role accounts of this table, and three lane-only accounts — ca-skeleton-replication (replica sync) and ca-skeleton-sentinel for the replicated and sentinel topologies, ca-skeleton-cluster-bootstrap (+@all) to create the cluster lane's slots. Never a deployment file
admin-readonly.acl ADMIN_READONLY read-only diagnostics. Every destructive counterpart is denied here and blocked in the command policy catalog — two independent controls for the same rule

Who loads lane-fixture-accounts.acl

The Redis topology lanes (../standalone, ../sentinel, ../cluster, ../tls) and the application's Compose lanes that switch Redis on (local-redis, all-adapters in src/config/runtime/compose-profile-contracts.json). Both mount this directory read-only; neither keeps a copy, because a second copy of these lines is a second place for a password or a key pattern to drift.

The Compose lanes connect the application as ca-skeleton-application and ca-skeleton-application-advanced, through secret://<account>@environment/<variable> references whose variables carry the fixture passwords above. They run with the Redis namespace environment prod, because every account here is fenced to ~prod:*. scripts/verify-compose-profile-contracts.sh compares each Redis lane's references, passwords and namespace with the account lines in this file, so changing a password or a key pattern here without the lanes fails that check rather than the lane's first command.