--- kind: CONCEPT slug: messaging-rabbit-c02 title: 자격증명은 연결 시도마다 해석된다 topic: security-and-trust-boundaries project: clean-architecture-backend-template status: 게시 전 sourceRevision: 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 rootTreeNode: concept:messaging-rabbit-c02 evidenceCapturedOn: 2026-09-01 assets: - key: messaging-rabbit-c02 file: ../../../final/evidence/rendered/messaging-rabbit-c02.svg evidence: - ../../../final/evidence/raw/messaging-rabbit-c02.txt source: - 원본 분석 절은 analysis/messaging/messaging-rabbit.md#L106 이다. module: messaging-rabbit --- # 자격증명은 연결 시도마다 해석된다 RabbitMQ 클라이언트 연결은 오래 살고 스스로 재연결하므로, 시작 시점의 자격증명을 들고 있는 팩토리는 폐기된 자격증명으로 계속 재연결한다. 재연결 시점이 곧 회전된 자격증명이 적용되어야 할 시점이다. ## 본문 자격증명을 연결 시도마다 다시 해석하는 이유가 적혀 있다. > "RabbitMQ client connections are long-lived and reconnect on their own, so a factory holding a credential from startup will happily reconnect with a revoked one for as long as the process runs — the reconnect is exactly the moment a rotated credential should take effect." ## AmqpCredentials가 record가 아닌 이유 비밀을 지우려면 가변이어야 하고, record 가 `char[]` 를 동등성에 쓰면 같은 자재를 가진 둘이 서로 다르다고 판정된다. ## AmqpCredentials 참조 위치 :::evidence key="messaging-rabbit-c02" alt="코드베이스에서 AmqpCredentials 를 검색한 출력 9줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="AmqpCredentials 코드베이스 검색 — 9줄 · exit 0" zoom="true" :::