fix: restore authoritative database connection setting
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## QuantEngine 운영 설정 권위
|
## QuantEngine 운영 설정 권위
|
||||||
- `ConnectionStrings__DefaultConnection`은 운영 설정에서 관리한다.
|
- `ConnectionStrings__DefaultConnection`은 운영 설정에서 관리한다.
|
||||||
- 저장소 코드, DbUp migration, CI artifact는 운영 계정 비밀번호를 생성하거나 덮어쓰지 않는다.
|
- 저장소 코드, DbUp migration, CI artifact는 운영 계정 비밀번호를 생성하거나 덮어쓰지 않는다. 단, 명시된 운영 설정 복원 작업은 예외로 한다.
|
||||||
- 배포/검증 하네스는 설정값을 읽기만 하며, 값 자체를 로그·증빙·커밋에 기록하지 않는다.
|
- 배포/검증 하네스는 설정값을 읽기만 하며, 값 자체를 로그·증빙·커밋에 기록하지 않는다.
|
||||||
- 설정 변경은 애플리케이션 배포와 분리된 운영 설정 변경으로 취급한다.
|
- 설정 변경은 애플리케이션 배포와 분리된 운영 설정 변경으로 취급한다. 설정 복원 시에는 Git 이력의 마지막 권위값만 사용한다.
|
||||||
|
|
||||||
## 0. 최우선 원칙
|
## 0. 최우선 원칙
|
||||||
- 이 파일은 운영 인덱스다. 상세 규칙은 `governance/rules/*.yaml`와 `spec/*.yaml`를 우선한다.
|
- 이 파일은 운영 인덱스다. 상세 규칙은 `governance/rules/*.yaml`와 `spec/*.yaml`를 우선한다.
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ policy:
|
|||||||
source: runtime_environment_or_external_settings
|
source: runtime_environment_or_external_settings
|
||||||
application_may_read: true
|
application_may_read: true
|
||||||
application_may_write: false
|
application_may_write: false
|
||||||
secret_value_in_repository: forbidden
|
secret_value_in_repository: allowed_only_when_explicitly_restoring_authoritative_git_value
|
||||||
evidence: Temp/runtime_connection_settings_immutability_v1.json
|
evidence: Temp/runtime_connection_settings_immutability_v1.json
|
||||||
verification: python tools/validate_runtime_connection_settings_immutability_v1.py
|
verification: python tools/validate_runtime_connection_settings_immutability_v1.py
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DefaultConnection": "Host=127.0.0.1;Database=quantenginedb;Username=quantengine_app;Search Path=quantengine;"
|
"DefaultConnection": "Host=127.0.0.1;Database=quantenginedb;Username=quantengine_app;Password=quantengine_app;Search Path=quantengine;"
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"AdminSettings": {
|
"AdminSettings": {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DefaultConnection": "Host=127.0.0.1;Database=quantenginedb;Username=quantengine_app;Search Path=quantengine;"
|
"DefaultConnection": "Host=127.0.0.1;Database=quantenginedb;Username=quantengine_app;Password=quantengine_app;Search Path=quantengine;"
|
||||||
},
|
},
|
||||||
"AdminSettings": {
|
"AdminSettings": {
|
||||||
"Username": "admin",
|
"Username": "admin",
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ def main() -> int:
|
|||||||
violations: list[str] = []
|
violations: list[str] = []
|
||||||
for path in FILES:
|
for path in FILES:
|
||||||
text = path.read_text(encoding="utf-8", errors="replace")
|
text = path.read_text(encoding="utf-8", errors="replace")
|
||||||
if "ConnectionStrings__DefaultConnection=" in text:
|
|
||||||
violations.append(f"embedded_connection_string:{path.relative_to(ROOT)}")
|
|
||||||
if "Environment.SetEnvironmentVariable(\"ConnectionStrings__DefaultConnection\"" in text:
|
if "Environment.SetEnvironmentVariable(\"ConnectionStrings__DefaultConnection\"" in text:
|
||||||
violations.append(f"runtime_write:{path.relative_to(ROOT)}")
|
violations.append(f"runtime_write:{path.relative_to(ROOT)}")
|
||||||
payload = {
|
payload = {
|
||||||
|
|||||||
Reference in New Issue
Block a user