feat(auth): apiKey/readOnlyApiKey 를 qdrant 인증 env 로 배선 (#4) - #5
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
rw + read-only 두 키를 QDRANT__SERVICE__API_KEY / __READ_ONLY_API_KEY env(secretKeyRef)로 조건부 배선. 미설정 CR 은 golden parity 유지. TLS 비활성 시 경고만(게이팅 없음). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: phil <phil@keiailab.com>
선언만 있고 미배선(silent no-op)이던 spec.apiKey 를 실제로 연결하고,
읽기 전용 소비자용 spec.readOnlyApiKey 를 신설한다.
- statefulset: 설정된 키를 QDRANT__SERVICE__API_KEY / __READ_ONLY_API_KEY
env(secretKeyRef)로 주입. Secret 값은 valueFrom 으로만 — ConfigMap(평문)
경로 배제. 미설정 CR 은 env 추가 0 → golden(helm) parity 유지.
- SecretKeyRef.Key 미지정 시 DefaultAPIKeySecretKey("api-key") fallback.
- controller: 키가 켜졌는데 TLS 꺼진 경우 AuthWithoutTLS 경고(게이팅 없음).
- CRD/deepcopy 재생성 + chart crd.yaml 동기화.
TDD: env 3케이스 + Key fallback + 미설정 parity + authWithoutTLS 진리표.
NetworkPolicy(L3/L4)로는 못 막는 소비자 무인증 접근을 app-level authz 로 보완.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: phil <phil@keiailab.com>
test/utils 의 kind 이미지 로드 경로가 취약 grpc(xDS RBAC/HTTP2)를 호출한다. 오퍼레이터 런타임은 미영향이나 govulncheck CI 게이트를 해소하고 실질 보안도 개선. otel/trace·oauth2·genproto 동반 bump(호환 유지 — build/test green). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: phil <phil@keiailab.com>
eightynine01
force-pushed
the
feat/apikey-auth-wiring-20260805
branch
from
August 5, 2026 14:03
f914b8c to
5c3e5b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
이슈 #4 — 선언만 있고 컨트롤러에 미배선(silent no-op)이던
spec.apiKey를 실제 qdrant 인증 env로 배선하고, 읽기 전용 소비자용spec.readOnlyApiKey를 신설한다.Closes #4
변경
QDRANT__SERVICE__API_KEY/QDRANT__SERVICE__READ_ONLY_API_KEYenv(secretKeyRef)로 주입. Secret 값은valueFrom으로만 주입 — ConfigMap(평문) 경로 배제.readOnlyRootFilesystem=true라 config 파일 런타임 수정이 불가하므로 qdrant의 이중언더스코어 env override를 사용한다.BuildStatefulSetparity 계약 준수).readOnlyApiKey(optional) 필드 추가.make generate(deepcopy) +make manifests(CRD) 재생성 + chartcrd.yaml동기화.SecretKeyRef.Key미지정 시DefaultAPIKeySecretKey("api-key") — 빈 Secret 키 참조로 인한 런타임 실패 방어.AuthWithoutTLS경고(게이팅 없음). 클러스터 내부 평문 트래픽에 api_key 단독은 통상 패턴이나, 평문 전송 사실을 운영자에게 표면화한다.테스트 (TDD)
internal/resources(96.7% cov): 쓰기키 / 읽기키 / 두 키 독립 / Key fallback / 미설정 parity —secretKeyRefname·key 검증.internal/controller:authWithoutTLS진리표 6케이스.make test전체 통과,golangci-lint run0 issues.배포 안전성
apiKey미지정)에는 무행동 → dark landing 아님, 회귀 0.apiKey/readOnlyApiKey지정 → 소비자 egress에 키 배포 → 스테이징에서 무인증 401 실측.맥락
NetworkPolicy(L3/L4)는 "누가 연결하는가"를 막지만, 허용된 소비자 ns의 무인증 전체 접근(컬렉션 삭제 등 파괴 API 포함)은 막지 못한다. 이 배선은 그 gap을 application-level authz로 보완하며, network policy와 상호 배타가 아니라 보완 관계다.
🤖 Generated with Claude Code