fix(security): fail closed Config Server reads by default - #220
fix(security): fail closed Config Server reads by default#220seonghobae wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughConfig Server에 Spring Security를 추가했습니다. 설정 조회 요청은 인증 없이 거부하고, 지정된 Actuator health 및 info 엔드포인트만 공개합니다. 통합 테스트는 설정 조회의 ChangesConfig Server 보안
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant ConfigServerSecurityConfiguration
participant ConfigServer
Client->>ConfigServerSecurityConfiguration: 설정 조회 요청
ConfigServerSecurityConfiguration->>ConfigServer: 요청 거부
ConfigServer-->>Client: 403 FORBIDDEN
Client->>ConfigServerSecurityConfiguration: /actuator/health 요청
ConfigServerSecurityConfiguration->>ConfigServer: 요청 허용
ConfigServer-->>Client: 200 OK
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Purpose
Advance #193 from exact protected
develop@622e5e6c3d534f230c390f10e3832efadfc01825without inventing credentials. Protected Config Server allowed anonymous configuration reads. This direct-developDraft establishes a narrower reference-only fail-closed default: health/info may remain intentionally public, while configuration-resource and every other application request is denied until a separately reviewed deployment-owned service identity exists.This is path-disjoint from #189's outbound Git repository authority (
application.yml) and #207's bootstrap/Javadoc lane. It does not invent a repository URI, username/password, certificate, issuer, client secret, Eureka identity, service mesh, or production authentication mechanism.Exact current identity
develop@622e5e6c3d534f230c390f10e3832efadfc01825;security/config-server-reference-deny-622e5e6;e5a43a723b934e67eeb11efe4403167a836094cf;c1772ad52cf6d59dd6977de82c2c44010e5cda3e;350bc625edca5111200947501dc657e73ad6bacf;Every predecessor-head check/review is historical and does not transfer.
RED — anonymous configuration reads were reachable
ConfigServerInboundSecurityTestwas added before production security changed. It boots the real Config Server with the maintained native backend, requests/application/defaultand/actuator/healththrough the embedded web server, and requires403 Forbiddenfor the anonymous configuration read while health remains200 OK.CI run
31367339613, macOS job93388478026, checked out synthetic integration revision9bc86a311a212b6202385d8bf23b9abf4da9fe39(Merge e5a43a7... into 622e5e6...). ETL and CDC completed successfully, the Config Server application booted normally, and exactly the new Config Server test failed with zero test errors/skips:expected: <403 FORBIDDEN> but was: <200 OK>.This is valid RED at the intended inbound HTTP security boundary rather than setup/import/fixture/dependency failure. It remains synthetic-merge development evidence, not literal-source acceptance proof.
GREEN — credential-free fail-closed reference posture
Exact current source
c1772ad52cf6d59dd6977de82c2c44010e5cda3eapplies the smallest repository-owned correction:config-server;SecurityFilterChain;/actuator/health,/actuator/health/**, and/actuator/info;No caller header is trusted as identity and no credential or trust root is embedded in source.
Exact-current-head hosted evidence
All exposed workflow aggregates associated with exact current source head
c1772ad52cf6d59dd6977de82c2c44010e5cda3eare terminal-success:31367570306: success;31367570295: success;31367570290: success;31367570238: success;31367570211: success.These results are not protected-merge authorization. Current protected PR workflows still execute GitHub synthetic merge revisions rather than accepted literal source; protected coverage evidence remains incomplete/non-vacuous only after #162/#164/#205 or equivalent accepted controls; #196 separately owns Maven dependency-resolution completeness; and no qualifying independent non-author formal approval exists.
Product/security boundary
This PR does not close #193's production service-identity decision. It makes the repository default safe while Config Server remains reference-only. A supported authenticated mode still needs an independently reviewed contract for identity issuance, rotation/revocation, application/profile/label authorization, TLS/provenance, degraded behavior, standalone/MSA deployment, and secret-safe audit/observability. Do not weaken this deny-by-default posture merely to make Config Server usable without that evidence.
Merge boundary
Keep Draft. Merge only when the unchanged exact source head has accepted literal-source deterministic/security evidence, complete same-revision dependency/vulnerability evidence, non-vacuous applicable owned-production coverage, zero valid unresolved findings, current canonical traceability, every live required gate, and qualifying independent non-author approval where governance requires it. No predecessor-head, synthetic-merge-only, incomplete-scanner, status-only, skipped-required, or other-PR evidence transfers.
Summary by CodeRabbit
보안
테스트
403 Forbidden을 반환하는지 검증합니다.200 OK를 반환하는지 확인합니다.