review-followup Wave 3: 설정 prefix app.* 통일(P20), Wave 3 종료
- 결정 16: `ca-skeleton.*`·`backend.graphql` 등 → `app.*`(APP_* env 키 이름 유지), selector 키 상수 하나(`CapabilitySelectors`), 바인딩만 되던 `streaming-idle` 삭제 - `StrictSettingsBinder`가 env 오타까지 거부 — 모든 capability(graphql·websocket·mongo는 edge 제약으로 파일만 strict), httpclient 리플렉션 `HttpClientEnvironmentKeys` 삭제 - persistence-jpa가 `APP_DATASOURCE_PASSWORD` secret 요구를 기여(bootstrap이 JPA 스위치를 읽지 않음), Redis ACL fixture에서 pub/sub 권한 제거 - 결함 수정: SMTP 설정 env 이름 충돌(P20-new-1), `bindExcept`가 system env까지 filter(P20-new-2), graphql 빈 deployment-mode 메시지(P20-new-6) - 통합: P30과 충돌 11건(P30의 명시적 bean 구조 유지), P30 코드의 옛 키를 app.*로, persistence-jpa 포맷 - 현황표: 소유자 결정 36(persistence-jpa 설정은 플랫폼 키만 app.persistence-jpa.*로, 공유 기능 트리 예외), 재개 문서에 일시 정지 상태 Wave 3 종료 검증: check · ci verifyDependencyLocks --warning-mode=fail(714 task) · mainCheck · architectureCheck verifyPublicPathSnapshot :app-bootstrap:verifyEnvKeys configContractCheck · :app-bootstrap:integrationTest :sample-portfolio:integrationTest :sample-portfolio:systemTest · integrationCheck · -p build-logic test · -p optional-platforms ci · :app-bootstrap:qualificationBootJar releaseCheck 통과 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8bbf1bf01d
commit
27f23add08
@@ -519,3 +519,10 @@ web 경로의 `W/`는 `src/adapter/inbound/web/src/main/java/dev/caskeleton/adap
|
||||
| `PersistenceEntityScanCoverageTest.operationAndLiveEventAdaptersAreScanned` | `src/adapter/outbound/persistence-jpa/src/test/java/dev/caskeleton/adapter/outbound/persistence/config/PersistenceEntityScanCoverageTest.java` | `0ebb77b5` | 같은 이유(스캔 목록 고정) — `JpaAdapterBeansConfigTest.everyAdapterTheScanUsedToRegisterIsDeclaredAsABean`로 대체 |
|
||||
| `MongoPlatformWiringTest.theMappingConfigurationCarriesThePlatformSwitch`·`thePlatformIsOffUnlessTheSwitchIsOn` | `src/adapter/outbound/persistence-mongo/src/test/java/dev/caskeleton/adapter/outbound/mongo/autoconfigure/MongoPlatformWiringTest.java` | `0ebb77b5` | 반복 스위치를 고정하던 테스트 — 반복 조건을 없애고 ArchUnit 두 규칙으로 대체 |
|
||||
| `PortfolioEventContracts` | `src/sample-portfolio/src/main/java/dev/caskeleton/sample/portfolio/application/event/PortfolioEventContracts.java` | `0ebb77b5` | 공유 registry가 `event` → 모든 기능 역방향 의존 — `poster/PosterEventContracts`·`posterimage/PosterImageEventContracts`로 분할, `all()`은 테스트로(S6-#10a, `62a669c8`) |
|
||||
| `HttpClientEnvironmentKeys`(설정 record 트리를 리플렉션으로 순회해 env 이름 역산·거부) | `src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientEnvironmentKeys.java` | `0ebb77b5` | S3-lead-2: env 오타 거부를 `StrictSettingsBinder`가 모든 capability에 대해 한다. manifest 도출은 `HttpClientPlatformEnvManifestTest`로 |
|
||||
| `StrictSettingsBinder.bind(env, prefix, type, Predicate<ConfigurationPropertySource>)` overload | `src/adapter/outbound/support/.../StrictSettingsBinder.java` | `0ebb77b5` | httpclient 전용 우회였다. system env 제외가 기본 동작이 됨 |
|
||||
| 설정 키 `app.httpclient.clients[N].timeout.streaming-idle`(`APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_STREAMING_IDLE`)과 `TimeoutSettings.streamingIdle`·`HttpClientPlatformSettings.Timeout.streamingIdle` | `src/adapter/outbound/httpclient/.../profile/TimeoutSettings.java`, `docs/httpclient/env-fields.yaml` | `0ebb77b5` | P11-new-1: 바인딩만 되고 읽는 곳 없음(capability 규칙 3) |
|
||||
| yml 키 `ca-skeleton.rate-limit.{limit,window,algorithm}` | `src/app-bootstrap/src/test/resources/application-test.yml`, `src/sample-portfolio/src/systemTest/resources/application-test.yml` | `0ebb77b5` | 읽는 코드 없음. `app.rate-limit` 아래로 옮기면 web `EdgeRateLimitTransportSettings` 트리에 섞인다 |
|
||||
| `SecretSourceValidator`의 `RELATIONAL_PERSISTENCE_PROPERTY`·`isRelationalPersistenceOn()`(모듈 스위치 해석) | `src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceValidator.java` | `0ebb77b5` | P22-new-1: persistence-jpa가 기여 |
|
||||
| 설정 키 `app.notification.platform.smtp.max-concurrency`(이름 변경 → `dispatch-concurrency`, env `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` 그대로) | `NotificationSmtpSettings.java`, `notification.yml` | `0ebb77b5` | P20-new-1 |
|
||||
| Redis ACL `+@pubsub`·`&prod:*`(application 계정 2개) | `infra/redis-sdk/acl/*.acl` | `0ebb77b5` | P22-new-2 |
|
||||
|
||||
@@ -4,7 +4,7 @@ Every capability in `:grpc-advanced:*`, its grade, and what it would take to rai
|
||||
`GrpcAdvancedSupportMatrix` is the machine-readable form; `GrpcAdvancedCapability.defaultGrade`
|
||||
carries the same values.
|
||||
|
||||
All capabilities are off by default. Flags are `ca-skeleton.grpc.advanced.<capability>.enabled`.
|
||||
All capabilities are off by default. Flags are `app.grpc.advanced.<capability>.enabled`.
|
||||
|
||||
## Grades
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ exposes.
|
||||
## Minimum to start
|
||||
|
||||
```yaml
|
||||
ca-skeleton:
|
||||
fileserver:
|
||||
app:
|
||||
fileserver-platform:
|
||||
enabled: true
|
||||
instance-id: ${HOSTNAME} # writer-lease owner; must be unique per node
|
||||
storage:
|
||||
@@ -47,7 +47,7 @@ Startup fails, rather than degrading, when any of these is missing or unsafe:
|
||||
|
||||
These roles decide the tier inside each operation. In front of it, every operation's use case
|
||||
carries a `file:*` permission that the web adapter's method security checks against
|
||||
`ca-skeleton.authz.role-permissions`; `security.yml` grants `file:read` to `ROLE_FILE_READ`,
|
||||
`app.authz.role-permissions`; `security.yml` grants `file:read` to `ROLE_FILE_READ`,
|
||||
`file:upload`, `file:delete`, `file:copy` and `file:move` to `ROLE_FILE_WRITE`, and `file:admin` to
|
||||
`ROLE_FILE_ADMIN`. Renaming a tier role here means mapping the new name there as well, or the
|
||||
caller is refused before the tier is consulted (`docs/fileserver/design-deviations.md` §5).
|
||||
|
||||
@@ -198,7 +198,7 @@ append, finalize, cancel, the single-request upload), `file:delete`, `file:copy`
|
||||
`ROLE_FILE_WRITE` and `ROLE_FILE_ADMIN` — the fileserver's own default tier roles — so a caller
|
||||
holding a tier holds its permissions. A deployment that renames the tier roles, or supplies its own
|
||||
`FileAccessPolicyPort` under other role names, maps those names in
|
||||
`ca-skeleton.authz.role-permissions` too; `security.access-policy: unenforced` relaxes only the
|
||||
`app.authz.role-permissions` too; `security.access-policy: unenforced` relaxes only the
|
||||
tier and ownership check, never the permission gate.
|
||||
|
||||
The resumable transfers run on the transfer pool, and method security reads the security context
|
||||
|
||||
@@ -6,8 +6,8 @@ The Fileserver ships off. Nothing is registered — no endpoint, no thread pool,
|
||||
is enabled explicitly.
|
||||
|
||||
```yaml
|
||||
ca-skeleton:
|
||||
fileserver:
|
||||
app:
|
||||
fileserver-platform:
|
||||
enabled: true
|
||||
instance-id: ${HOSTNAME}
|
||||
default-namespace: default
|
||||
@@ -26,8 +26,8 @@ to an unkeyed digest, which would be reversible for an enumerable identifier spa
|
||||
Each is a separate switch, and each defaults to off:
|
||||
|
||||
```yaml
|
||||
ca-skeleton:
|
||||
fileserver:
|
||||
app:
|
||||
fileserver-platform:
|
||||
admin:
|
||||
enabled: false # management plane; intended for a management port
|
||||
tus:
|
||||
|
||||
@@ -99,7 +99,6 @@ materialise a nameless client in every deployment, which the aggregate validatio
|
||||
| `response-header` | `2s` | Until final response headers |
|
||||
| `read-idle` | `3s` | Between response chunks |
|
||||
| `total-call` | `4s` | The whole logical call, including retry backoff |
|
||||
| `streaming-idle` | `30s` | Silence on a long-lived stream |
|
||||
|
||||
`total-call` must not be shorter than `connect` or `response-header`; the validator emits
|
||||
`INVALID_TIMEOUT_BUDGET` otherwise.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# HTTP Client platform — Java field path to environment variable template.
|
||||
#
|
||||
# The SSOT is HttpClientPlatformSettings. HttpClientEnvironmentKeys derives this list from the
|
||||
# record tree at runtime, HttpClientPlatformEnvManifestTest fails when the two disagree in either
|
||||
# direction, and the platform refuses to start on an APP_HTTPCLIENT_ variable that is not here. So a
|
||||
# The SSOT is HttpClientPlatformSettings. HttpClientPlatformEnvManifestTest derives this list from
|
||||
# the record tree and fails when the two disagree in either direction, and the shared strict binder
|
||||
# refuses to start on an APP_HTTPCLIENT_ variable that names no field. So a
|
||||
# field added with no entry, an entry whose field was renamed, and a misspelled variable in a
|
||||
# deployment are all failures rather than silence.
|
||||
#
|
||||
@@ -81,8 +81,6 @@ fields:
|
||||
env: APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_READ_IDLE
|
||||
- field: clients[N].timeout.total-call
|
||||
env: APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_TOTAL_CALL
|
||||
- field: clients[N].timeout.streaming-idle
|
||||
env: APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_STREAMING_IDLE
|
||||
- field: clients[N].redirect.enabled
|
||||
env: APP_HTTPCLIENT_CLIENTS_N_REDIRECT_ENABLED
|
||||
- field: clients[N].redirect.max-hops
|
||||
|
||||
@@ -28,7 +28,7 @@ producing-service identity다.
|
||||
|
||||
outbox는 canonical 하나다(2026-09-28). use case가 `IntegrationEventEncoderPort`로 만든
|
||||
`ValidatedIntegrationEvent`를 `OutboxAppendPort`로 append하고, relay는 claim한 row의 exact envelope
|
||||
bytes를 `IntegrationEventPublishPort`로 보낸다. 예전의 `ca-skeleton.outbox.canonical-transport-enabled`
|
||||
bytes를 `IntegrationEventPublishPort`로 보낸다. 예전의 `app.outbox.canonical-transport-enabled`
|
||||
gate와 legacy `MessageBroker → KafkaSender` 경로는 삭제됐다. 발행할 contract의 logical destination마다
|
||||
아래 destination profile을 선언한다(템플릿의 durable operation event는 `durable-operations`).
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ feature request:
|
||||
|
||||
| Tier | Capabilities | Enablement |
|
||||
|---|---|---|
|
||||
| Stable, auto-configured | Mapping and BSON converters, imperative execution, atomic update, bulk partial results, consistency profiles, retry/translation, operation budgets, observability, typed client profiles, startup validation, health | Beans registered when `ca-skeleton.persistence-mongo.enabled=true`. |
|
||||
| Stable, auto-configured | Mapping and BSON converters, imperative execution, atomic update, bulk partial results, consistency profiles, retry/translation, operation budgets, observability, typed client profiles, startup validation, health | Beans registered when `app.persistence-mongo.enabled=true`. |
|
||||
| Stable, library API | Transactions, causal sessions, optimistic revision, query builder and keyset pagination, aggregation executor, schema/index/validator manifests and diffs, TTL contract, GeoJSON, migration runner, admin plane, native capability gateway | The adopter's adapter leaf takes this leaf as `implementation` and constructs the type. |
|
||||
| Advanced, library API | Sharding-aware query and shard admin, CSFLE, Queryable Encryption (equality/range), shared-collection tenancy policies | Same, plus a `MongoAdvancedCapabilityGuard` whose flags enable the capability. No configuration property. |
|
||||
| Experimental, library API | Database-per-tenant client registry and migration coordinator, reshard approval | Same as Advanced; promotion additionally requires the evidence in [ADR-MONGO-ADV-001](../adr/ADR-MONGO-ADV-001-capability-promotion.md). |
|
||||
|
||||
@@ -104,7 +104,7 @@ the three they achieved.
|
||||
one thing — `AesGcmCallbackPayloadProtection`, which protects raw callback bodies — and by nothing on
|
||||
the accept path. Demanding it would make a deployment supply a key that protects nothing while the
|
||||
payload it appears to be about stays in plaintext. The repository already has one defect of that
|
||||
exact shape: `backend.graphql.cursor.key-ids` (key removed 2026-09-25), which production refuses to start without and which no
|
||||
exact shape: `app.graphql.cursor.key-ids` (key removed 2026-09-25), which production refuses to start without and which no
|
||||
code signs a cursor with (GQL-INT-003). Adding a second would make the pattern a habit.
|
||||
|
||||
## Consequence
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Configuration reference
|
||||
|
||||
The notification delivery platform binds under `ca-skeleton.notification.platform`. The tree lives in
|
||||
The notification delivery platform binds under `app.notification.platform`. The tree lives in
|
||||
`src/composition/notification-platform/src/main/resources/config/module-defaults/notification.yml`,
|
||||
which the support leaf's `ModuleDefaultsEnvironmentPostProcessor` loads at the lowest precedence,
|
||||
so an application without the module carries none of it. The module is in no default composition: a
|
||||
@@ -60,7 +60,7 @@ nonce and tag. A larger configured value would pass every check above the databa
|
||||
## Provider profiles
|
||||
|
||||
Profiles are a map under `providers`, keyed by profile id. Arbitrary deployment-chosen ids can be
|
||||
supplied as YAML or through Spring relaxed binding (`CA_SKELETON_NOTIFICATION_PLATFORM_PROVIDERS_<ID>_<FIELD>`).
|
||||
supplied as YAML or through Spring relaxed binding (`APP_NOTIFICATION_PLATFORM_PROVIDERS_<ID>_<FIELD>`).
|
||||
The shipped reference profiles `smtp` and `ses` additionally expose explicit `APP_NOTIFICATION_PLATFORM_SMTP_*`
|
||||
and `APP_NOTIFICATION_PLATFORM_SES_*` aliases so operators do not have to invent binding names.
|
||||
|
||||
@@ -135,7 +135,7 @@ already owns them and a second spelling would be a second thing to keep in step.
|
||||
| Property | Environment variable | Default | Bound |
|
||||
|---|---|---|---|
|
||||
| `smtp.sender-identity` | `APP_NOTIFICATION_PLATFORM_SMTP_SENDER_IDENTITY` | `no-reply@example.invalid` | address |
|
||||
| `smtp.max-concurrency` | `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` | `4` | positive |
|
||||
| `smtp.dispatch-concurrency` | `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` | `4` | positive |
|
||||
|
||||
SMTP transport configuration has one owner: Spring Mail. The actual `JavaMailSenderImpl` must use required STARTTLS (`mail.smtp.starttls.enable=true` plus `mail.smtp.starttls.required=true`) or implicit TLS (`mail.smtp.ssl.enable=true`). It must also have positive `mail.smtp.connectiontimeout`, `mail.smtp.timeout`, and `mail.smtp.writetimeout` values. SMTP assembly fails before serving traffic when those properties are absent or invalid.
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ env_keys:
|
||||
- name: APP_PERSISTENCE_VENDOR
|
||||
# source: persistence vendor selector used by application-local.yml and bootRunH2.
|
||||
# PostgreSQL is the shipped default; H2 is an explicit developer-only selection.
|
||||
property: ca-skeleton.persistence.vendor
|
||||
property: app.persistence.vendor
|
||||
type: enum
|
||||
default: postgresql
|
||||
allowed_values: [postgresql, h2]
|
||||
@@ -350,7 +350,7 @@ env_keys:
|
||||
required_test: jpa-contract:local-vendor-parity
|
||||
|
||||
- name: APP_REALTIME_REPLAY_ENABLED
|
||||
property: ca-skeleton.realtime.replay.enabled
|
||||
property: app.realtime.replay.enabled
|
||||
owner_module: adapter-outbound-persistence-jpa
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -364,7 +364,7 @@ env_keys:
|
||||
required_test: jpa-contract:realtime-replay-env
|
||||
|
||||
- name: APP_REALTIME_REPLAY_RETENTION
|
||||
property: ca-skeleton.realtime.replay.retention
|
||||
property: app.realtime.replay.retention
|
||||
owner_module: adapter-outbound-persistence-jpa
|
||||
type: duration
|
||||
default: 1h
|
||||
@@ -1596,7 +1596,7 @@ env_keys:
|
||||
required_test: rate-limit-contract:cleanup-grace-bounded
|
||||
|
||||
- name: APP_IDEMPOTENCY_TTL
|
||||
# ca-skeleton.capabilities.idempotency.replay-ttl: how long a completed response stays
|
||||
# app.capabilities.idempotency.replay-ttl: how long a completed response stays
|
||||
# replayable. One value for every provider; IdempotencySettings refuses more than 72h at startup.
|
||||
type: duration
|
||||
default: 24h
|
||||
@@ -1610,7 +1610,7 @@ env_keys:
|
||||
required_test: idempotency-contract:ttl-applied
|
||||
|
||||
- name: APP_IDEMPOTENCY_PROVIDER
|
||||
# ca-skeleton.capabilities.idempotency.provider. redis and postgresql each contribute only the
|
||||
# app.capabilities.idempotency.provider. redis and postgresql each contribute only the
|
||||
# store; app-bootstrap builds the one IdempotencyExecutor and refuses startup unless exactly one
|
||||
# store exists. postgresql uses the primary data source, applies its Flyway streams at startup
|
||||
# and refuses a non-PostgreSQL data source, so bootRunH2 runs with disabled or redis. Selection
|
||||
@@ -2350,7 +2350,7 @@ env_keys:
|
||||
# DEPRECATED 2026-08-10: this was a second Redis master switch, and the settings class that
|
||||
# bound it was removed with the previous Redis generation, so the key reached nothing.
|
||||
# APP_REDIS_ENABLED is the sole global activation authority; the cache role is selected by
|
||||
# ca-skeleton.capabilities.cache.bindings.default. The row is kept rather than deleted so a
|
||||
# app.capabilities.cache.bindings.default. The row is kept rather than deleted so a
|
||||
# deployment still setting this key can be told what replaced it.
|
||||
deprecated_orphaned: true
|
||||
deprecated_alias_for: APP_REDIS_ENABLED
|
||||
@@ -3682,7 +3682,7 @@ env_keys:
|
||||
required_test: async-contract:executor-queue-bounded
|
||||
|
||||
# === Notification delivery platform (NTF-025 — configuration surface) ===
|
||||
# The tree exists in application.yml as ca-skeleton.notification.platform, disabled by
|
||||
# The tree exists in application.yml as app.notification.platform, disabled by
|
||||
# default. Every key carries an inline default so a deployment that leaves the platform off
|
||||
# supplies nothing. Reference: docs/notification/configuration.md.
|
||||
|
||||
@@ -3816,7 +3816,7 @@ env_keys:
|
||||
allowed_values: null
|
||||
classification: sensitive-config
|
||||
required: false
|
||||
required_when: ca-skeleton.persistence-mongo.enabled=true AND no active-profile uri-secret
|
||||
required_when: app.persistence-mongo.enabled=true AND no active-profile uri-secret
|
||||
reload_policy: restart-only
|
||||
owner_branch: persistence-mongo-runtime-remediation
|
||||
validation: mongodb_uri_when_selected_as_connection_source
|
||||
@@ -3934,8 +3934,8 @@ env_keys:
|
||||
compatibility_impact: behavior-change
|
||||
required_test: adapter-contract:graphql-disabled-safe
|
||||
- name: APP_GRAPHQL_DEPLOYMENT_MODE
|
||||
# source: five-adapter-runtime-remediation §5.1 / GQL-INT-002 — replaces backend.graphql.production
|
||||
# and backend.graphql.environment, which defaulted to production=false with
|
||||
# source: five-adapter-runtime-remediation §5.1 / GQL-INT-002 — replaces app.graphql.production
|
||||
# and app.graphql.environment, which defaulted to production=false with
|
||||
# environment=PRODUCTION_PUBLIC and let anonymous-principal and allow-by-default authorization
|
||||
# read one axis while the other claimed production.
|
||||
type: enum
|
||||
@@ -3950,7 +3950,7 @@ env_keys:
|
||||
compatibility_impact: behavior-change
|
||||
required_test: adapter-contract:graphql-deployment-mode
|
||||
- name: APP_GRAPHQL_VALIDATION_POLICY_VERSION
|
||||
property: backend.graphql.validation-policy-version
|
||||
property: app.graphql.validation-policy-version
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: string
|
||||
default: v1
|
||||
@@ -3965,7 +3965,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_OBSERVED_OPERATION_NAMES
|
||||
property: backend.graphql.observed-operation-names
|
||||
property: app.graphql.observed-operation-names
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: csv
|
||||
default: ""
|
||||
@@ -3980,7 +3980,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_GRAPHIQL_ENABLED
|
||||
property: backend.graphql.console.graphiql-enabled
|
||||
property: app.graphql.console.graphiql-enabled
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -3995,7 +3995,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_INTROSPECTION_ENABLED
|
||||
property: backend.graphql.console.introspection-enabled
|
||||
property: app.graphql.console.introspection-enabled
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: boolean
|
||||
default: false
|
||||
@@ -4010,7 +4010,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_MAXIMUM_PAGE_SIZE
|
||||
property: backend.graphql.limits.maximum-page-size
|
||||
property: app.graphql.limits.maximum-page-size
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: integer
|
||||
default: 100
|
||||
@@ -4025,7 +4025,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_MAXIMUM_COMPLEXITY
|
||||
property: backend.graphql.limits.maximum-complexity
|
||||
property: app.graphql.limits.maximum-complexity
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: integer
|
||||
default: 10000
|
||||
@@ -4040,7 +4040,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_PREPARSED_CACHE_ENTRIES
|
||||
property: backend.graphql.limits.preparsed-cache-entries
|
||||
property: app.graphql.limits.preparsed-cache-entries
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: integer
|
||||
default: 1000
|
||||
@@ -4055,7 +4055,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_PREPARSED_CACHE_WEIGHT
|
||||
property: backend.graphql.limits.preparsed-cache-weight
|
||||
property: app.graphql.limits.preparsed-cache-weight
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: integer
|
||||
default: 10000000
|
||||
@@ -4070,7 +4070,7 @@ env_keys:
|
||||
required_test: graphql-contract:wired-operator-settings
|
||||
|
||||
- name: APP_GRAPHQL_PREPARSED_CACHE_EXPIRE_AFTER_ACCESS
|
||||
property: backend.graphql.limits.preparsed-cache-expire-after-access
|
||||
property: app.graphql.limits.preparsed-cache-expire-after-access
|
||||
owner_module: adapter-inbound-graphql
|
||||
type: duration
|
||||
default: 30m
|
||||
@@ -4147,7 +4147,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_CONTACT_ENCRYPTION_KEY
|
||||
# source: NTF-INT-007 — Encrypts recipient contact points at rest — addresses and phone numbers.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.contact-encryption-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.contact-encryption-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4163,7 +4163,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_CONTACT_LOOKUP_HMAC_KEY
|
||||
# source: NTF-INT-007 — Blind index over contact points, so a lookup never needs the plaintext.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.contact-lookup-hmac-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.contact-lookup-hmac-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4179,7 +4179,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_CALLBACK_SIGNING_KEY
|
||||
# source: NTF-INT-007 — Signs the callback URLs a provider posts delivery outcomes back to.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.callback-signing-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.callback-signing-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4195,7 +4195,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_PROVIDER_CREDENTIAL_KEY
|
||||
# source: NTF-INT-007 — Encrypts stored provider credentials, which are themselves secrets.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.provider-credential-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.provider-credential-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4211,7 +4211,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_PAYLOAD_ENCRYPTION_KEY
|
||||
# source: NTF-INT-007 — Encrypts notification variables and retained callback bodies at rest.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.payload-encryption-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.payload-encryption-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4227,7 +4227,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_PROVIDER_REQUEST_LOOKUP_HMAC_KEY
|
||||
# source: NTF-INT-007 — Keyed hash of provider request ids, which are provider-side identifiers.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.provider-request-lookup-hmac-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.provider-request-lookup-hmac-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4243,7 +4243,7 @@ env_keys:
|
||||
- name: APP_NOTIFICATION_PLATFORM_CALLBACK_FINGERPRINT_HMAC_KEY
|
||||
# source: NTF-INT-007 — Keyed fingerprint of callback bodies, used to detect replays.
|
||||
# Full row owned by secrets-classification.yaml. Bound by
|
||||
# ca-skeleton.notification.platform.secrets.callback-fingerprint-hmac-key; the platform decodes it at startup and
|
||||
# app.notification.platform.secrets.callback-fingerprint-hmac-key; the platform decodes it at startup and
|
||||
# refuses to boot if it is blank, shorter than 32 bytes, or equal to another purpose's key.
|
||||
type: string
|
||||
default: null
|
||||
@@ -4260,7 +4260,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the CONTACT_ENCRYPTION key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_CONTACT_ENCRYPTION_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.CONTACT_ENCRYPTION.
|
||||
# app.notification.platform.secrets.active-key-ids.CONTACT_ENCRYPTION.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
@@ -4276,7 +4276,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the CONTACT_LOOKUP_HMAC key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_CONTACT_LOOKUP_HMAC_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.CONTACT_LOOKUP_HMAC.
|
||||
# app.notification.platform.secrets.active-key-ids.CONTACT_LOOKUP_HMAC.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
@@ -4292,7 +4292,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the CALLBACK_SIGNING key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_CALLBACK_SIGNING_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.CALLBACK_SIGNING.
|
||||
# app.notification.platform.secrets.active-key-ids.CALLBACK_SIGNING.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
@@ -4308,7 +4308,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the PROVIDER_CREDENTIAL key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_PROVIDER_CREDENTIAL_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.PROVIDER_CREDENTIAL.
|
||||
# app.notification.platform.secrets.active-key-ids.PROVIDER_CREDENTIAL.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
@@ -4324,7 +4324,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the PAYLOAD_ENCRYPTION key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_PAYLOAD_ENCRYPTION_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.PAYLOAD_ENCRYPTION.
|
||||
# app.notification.platform.secrets.active-key-ids.PAYLOAD_ENCRYPTION.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
@@ -4340,7 +4340,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the PROVIDER_REQUEST_LOOKUP_HMAC key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_PROVIDER_REQUEST_LOOKUP_HMAC_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.PROVIDER_REQUEST_LOOKUP_HMAC.
|
||||
# app.notification.platform.secrets.active-key-ids.PROVIDER_REQUEST_LOOKUP_HMAC.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
@@ -4356,7 +4356,7 @@ env_keys:
|
||||
# source: NTF-INT-007 — the id written into every envelope the CALLBACK_FINGERPRINT_HMAC key produces.
|
||||
# An identifier, not key material, so it is public-config; the material itself is the
|
||||
# APP_NOTIFICATION_PLATFORM_CALLBACK_FINGERPRINT_HMAC_KEY row above. Bound into
|
||||
# ca-skeleton.notification.platform.secrets.active-key-ids.CALLBACK_FINGERPRINT_HMAC.
|
||||
# app.notification.platform.secrets.active-key-ids.CALLBACK_FINGERPRINT_HMAC.
|
||||
type: string
|
||||
default: null
|
||||
allowed_values: null
|
||||
|
||||
@@ -24,6 +24,9 @@ secrets:
|
||||
# "DB credential은 dual-bind 60s" + "__LOCAL_DEV_FAKE_DB_PASSWORD" 예시
|
||||
classification: secret
|
||||
source: secret-manager
|
||||
# Contributed by persistence-jpa (JpaStartupAutoConfiguration#jpaProductionSecrets) while the
|
||||
# module is on; the composition root's guard no longer reads the module switch (P22-new-1).
|
||||
required_when: app.persistence-jpa.enabled=true
|
||||
rotation_policy: dual-bind-60s
|
||||
prod_default: null
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
@@ -55,7 +58,7 @@ secrets:
|
||||
rotation_policy: restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.capabilities.cache.bindings.default=redis
|
||||
required_when: app.capabilities.cache.bindings.default=redis
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: feature-secrets-config-source-contract
|
||||
masking_rule: full
|
||||
@@ -81,7 +84,7 @@ secrets:
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.capabilities.cache.bindings.default=redis
|
||||
required_when: app.capabilities.cache.bindings.default=redis
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: codex-phase-a-ci-recovery
|
||||
masking_rule: full
|
||||
@@ -95,7 +98,7 @@ secrets:
|
||||
rotation_policy: restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.capabilities.rate-limit.provider=redis
|
||||
required_when: app.capabilities.rate-limit.provider=redis
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: redis-distributed-rate-limit
|
||||
masking_rule: full
|
||||
@@ -121,7 +124,7 @@ secrets:
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.capabilities.rate-limit.provider=redis
|
||||
required_when: app.capabilities.rate-limit.provider=redis
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: redis-distributed-rate-limit
|
||||
masking_rule: full
|
||||
@@ -135,7 +138,7 @@ secrets:
|
||||
rotation_policy: restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.security.auth-mode=redis-session
|
||||
required_when: app.security.auth-mode=redis-session
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: redis-production-capability
|
||||
masking_rule: full
|
||||
@@ -161,7 +164,7 @@ secrets:
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.security.auth-mode=redis-session
|
||||
required_when: app.security.auth-mode=redis-session
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: redis-production-capability
|
||||
masking_rule: full
|
||||
@@ -175,7 +178,7 @@ secrets:
|
||||
rotation_policy: cold-cutover-restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.capabilities.idempotency.provider=redis
|
||||
required_when: app.capabilities.idempotency.provider=redis
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: redis-production-capability-completion
|
||||
masking_rule: full
|
||||
@@ -189,7 +192,7 @@ secrets:
|
||||
rotation_policy: cold-cutover-restart-only
|
||||
prod_default: null
|
||||
# Required with app.redis.enabled=true and this role selected; checked by adapter-outbound-cache-redis RedisProductionSecrets.
|
||||
required_when: ca-skeleton.capabilities.lease.provider=redis
|
||||
required_when: app.capabilities.lease.provider=redis
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: redis-production-capability-completion
|
||||
masking_rule: full
|
||||
@@ -222,7 +225,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
@@ -238,7 +241,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
@@ -254,7 +257,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
@@ -270,7 +273,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
@@ -286,7 +289,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
@@ -302,7 +305,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
@@ -318,7 +321,7 @@ secrets:
|
||||
source: secret-manager
|
||||
rotation_policy: dual-read-restart-only
|
||||
prod_default: null
|
||||
required_when: ca-skeleton.notification.platform.enabled=true
|
||||
required_when: app.notification.platform.enabled=true
|
||||
dev_sentinel_prefix: __LOCAL_DEV_
|
||||
owner_branch: worktree-notification-platform
|
||||
masking_rule: full
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# W3-P20 — 설정 prefix `app.*` 통일(결정 16) + strict 바인딩
|
||||
|
||||
worktree: `.claude/worktrees/agent-a79f4feba1997eb73` (기준 HEAD `0ebb77b5`)
|
||||
|
||||
## 설정 prefix 이전 → 이후
|
||||
|
||||
env 키(`APP_*`) 이름은 하나도 바뀌지 않았다. 바뀐 것은 env가 채우는 설정 트리뿐이다.
|
||||
|
||||
| 이전 | 이후 | 소유(읽는 곳) |
|
||||
|---|---|---|
|
||||
| `ca-skeleton.async.executor` | `app.async.executor` | app-bootstrap `AsyncExecutorSettings` |
|
||||
| `ca-skeleton.bootstrap` | `app.bootstrap` | app-bootstrap `BootstrapSettings` |
|
||||
| `ca-skeleton.logging` | `app.logging` | app-bootstrap `LoggingSettings` |
|
||||
| `ca-skeleton.runtime` | `app.runtime` | app-bootstrap `RuntimeSafetySettings`, persistence-jpa `migration-on-startup` |
|
||||
| `ca-skeleton.secret-source` | `app.secret-source` | app-bootstrap `SecretSourceSettings` |
|
||||
| `ca-skeleton.security` | `app.security` | app-bootstrap `AuthenticationModeSettings`, web `SecuritySettings` |
|
||||
| `ca-skeleton.authz` | `app.authz` | web `RolePermissionPolicy` |
|
||||
| `ca-skeleton.cors` | `app.cors` | web `CorsSettings` |
|
||||
| `ca-skeleton.presentation` | `app.presentation` | web `PresentationSettings` |
|
||||
| `backend.web.mvc` | `app.web.mvc` | web `WebMvcPlatformSettings` |
|
||||
| `backend.web.advanced.mvc-virtual-threads` | `app.web.advanced.mvc-virtual-threads` | web-advanced `VirtualThreadSettings` |
|
||||
| `backend.graphql` | `app.graphql` | graphql `GraphQlPlatformSettings` |
|
||||
| `ca-skeleton.grpc.server` | `app.grpc.server` | grpc `GrpcServerSettings` |
|
||||
| `ca-skeleton.grpc.platform` | `app.grpc.platform` | grpc starter `GrpcPlatformProperties` (부모 `app.grpc`에 바인딩하는 것은 없다 — P5 메모) |
|
||||
| `ca-skeleton.grpc.advanced.<flag>.enabled` | `app.grpc.advanced.<flag>.enabled` | grpc-advanced `GrpcAdvancedCapability` |
|
||||
| `ca-skeleton.capabilities.{cache,rate-limit,lease,idempotency}` | `app.capabilities.{…}` | cache-redis `RedisCapabilitySettings`, composition:idempotency `IdempotencySettings`, persistence-jpa idempotency |
|
||||
| `ca-skeleton.notification.platform(.smtp,.secrets)` | `app.notification.platform(…)` | notification `NotificationPlatformSettings`·`NotificationSmtpSettings`·secrets |
|
||||
| `ca-skeleton.persistence.vendor` | `app.persistence.vendor` | persistence-jpa `PersistenceVendorSettings` |
|
||||
| `ca-skeleton.persistence-jpa.enabled` | `app.persistence-jpa.enabled` | persistence-jpa 스위치 |
|
||||
| `ca-skeleton.lock` | `app.lock` | persistence-jpa `LockSettings` |
|
||||
| `ca-skeleton.outbox` | `app.outbox` | composition:outbox-relay `OutboxSettings` |
|
||||
| `ca-skeleton.realtime.replay` | `app.realtime.replay` | persistence-jpa `JpaLiveEventReplay` |
|
||||
| `ca-skeleton.persistence-mongo(.platform)` | `app.persistence-mongo(…)` | persistence-mongo `MongoPersistenceSettings`·`MongoPlatformSettings` |
|
||||
| `ca-skeleton.privacy` | `app.privacy` | composition:service-runtime `PrivacySettings` |
|
||||
| `ca-skeleton.tracing` | `app.tracing` | composition:service-runtime `TracingSettings` |
|
||||
| `ca-skeleton.rate-limit.{limit,window,algorithm}` (bootstrap·sample test yml) | 삭제 | 읽는 코드 없음. `ca-skeleton.rate-limit.{enabled,…}`(sample)는 `app.rate-limit.*`가 되어 web `EdgeRateLimitTransportSettings`가 읽는 키와 합쳐졌다(값 동일, enabled=false) |
|
||||
| 그대로 | `app.redis`, `app.httpclient`, `app.fileserver-platform`, `app.object-storage`, `app.websocket`, `app.notification`(R0 gate), `app.rate-limit`, `app.jpa-platform`, `app.messaging`(vendored), `app.poster-image` | |
|
||||
| 그대로(설정 키가 아님) | `ca-skeleton.messaging.{schema-set,contract-catalog,contract-descriptor,partition-key}.v1`(hash domain), `ca-skeleton.grpc.authenticated-caller`(gRPC Context key), `logs/ca-skeleton.json`, metric `backend.redis.*`, vendored messaging의 superseded `backend.messaging` 거부 | |
|
||||
|
||||
## strict 바인딩 현황 (X2-P1-3c)
|
||||
|
||||
| 설정 | prefix | 방식 |
|
||||
|---|---|---|
|
||||
| composition:fileserver-platform, httpclient, composition:outbox-relay, composition:idempotency | 기존 | `StrictSettingsBinder`(이번에 env 검사 일반화) |
|
||||
| persistence-jpa `PersistenceVendorSettings`·`LockSettings`·`JpaSafetySettings` | `app.persistence`·`app.lock`·`app.jpa-platform` | `StrictSettingsBinder`(게이트된 설정의 `@Bean`) |
|
||||
| cache-redis `RedisCapabilitySettings` | `app.capabilities` | `StrictSettingsBinder.bindExcept`(idempotency lifecycle 키 제외) |
|
||||
| notification `NotificationRoutesSettings`·`NotificationPlatformSettings`·secrets·smtp | `app.notification`(platform·R0 gate 제외)·`app.notification.platform`(smtp·secrets·default-locale 제외)·`.secrets`·`.smtp` | `StrictSettingsBinder` |
|
||||
| messaging bridge `MessagingSettings` | `app.messaging`(vendored 최상위 항목 제외) | `StrictSettingsBinder.bindExcept` |
|
||||
| service-runtime `PrivacySettings`·`TracingSettings` | `app.privacy`·`app.tracing` | `StrictSettingsBinder` |
|
||||
| objectstorage `ObjectStorageCapabilitySettings` | `app.object-storage`(scan-maintenance 제외) | `StrictSettingsBinder` + registry support edge 추가 |
|
||||
| graphql `GraphQlPlatformSettings` | `app.graphql` | `ignoreUnknownFields = false`(inbound → outbound support edge 불가). 스위치 `enabled`를 component로 추가 |
|
||||
| websocket `WebSocketSettings` | `app.websocket` | `ignoreUnknownFields = false`(같은 이유) |
|
||||
| persistence-mongo `MongoPlatformSettings` | `app.persistence-mongo.platform` | `ignoreUnknownFields = false`(closure에 support 없음). 부모 `app.persistence-mongo`(스위치 하나)는 하위 트리 때문에 엄격하게 하지 않음 |
|
||||
| grpc `GrpcServerSettings`·`GrpcPlatformProperties` | `app.grpc.server`·`app.grpc.platform` | 기존 `ignoreUnknownFields = false`, 부모 `app.grpc`에 바인딩 없음 |
|
||||
|
||||
## 행 결과
|
||||
| ID | 결과 | 근거 |
|
||||
|---|---|---|
|
||||
| S6-#14 | 완료 | 결정 16: 설정 prefix를 `app.*` 하나로(위 표). `711a3968`·`fabb611e`. env 키 이름 변경 없음. `ConfigurationNamespaceContractTest`: 허용 root는 `app` 하나(`shippedConfigurationDeclaresOnlyRecordedRoots`), 모든 leaf의 `@ConfigurationProperties`·`String PREFIX` 상수가 `app.` 아래(`everyLeafPrefixSitsUnderTheApplicationRoot`, 새 테스트) — `src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/ConfigurationNamespaceContractTest.java`. yml root 병합 4곳(cache-redis·notification module-defaults, sample `application.yml`·systemTest yml). "capability" 용어 정리는 이번 범위 밖(키 이름만) |
|
||||
| S3-lead-4 | 완료 | `711a3968`: `src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/CapabilitySelectors.java`(ROOT·CACHE_DEFAULT_BINDING·IDEMPOTENCY_PROVIDER·RATE_LIMIT_PROVIDER·LEASE_PROVIDER). 사용: cache-redis `RedisCacheConfig`·`RedisCorrectnessRoleSelectors`·`RedisIdempotencyConfig`·`RedisLeaseConfig`·`RedisRateLimitConfig`·`RedisCapabilitySettings.bind`, persistence-jpa `PostgreSqlIdempotencyStoreConfig`·`IdempotencyReaper`·`IdempotencySchemaStream`, composition:idempotency `IdempotencyAutoConfiguration`. 현황표 방향(멱등성은 composition 모듈에)과 다르게 support에 둔 이유: persistence-jpa·cache-redis는 composition:idempotency에 의존할 수 없고(registry), 셋 다 support에 이미 의존한다. main의 `app.capabilities.*.provider` 문자열 리터럴 0건(`git grep '"app.capabilities' -- '*/src/main/*'`는 메시지·주석뿐) |
|
||||
| P11-new-1 | 완료 | `711a3968`: 읽지 않던 `clients[N].timeout.streaming-idle` 키 삭제 — `TimeoutSettings`·`HttpClientPlatformSettings.Timeout`·`HttpClientProfileFactory`·testFixtures `ClientProfiles`에서 `streamingIdle` 제거, `docs/httpclient/env-fields.yaml`·`configuration-reference.md` 행 삭제. `HttpClientPlatformEnvManifestTest.theManifestAndTheSettingsTreeAgree` PASS(manifest와 record 트리 일치). 이제 `APP_HTTPCLIENT_CLIENTS_0_TIMEOUT_STREAMING_IDLE`을 설정하면 strict binder가 이름으로 거부 |
|
||||
| P22-new-2 | 완료 | `b509991a`: `infra/redis-sdk/acl/application.acl`·`application-advanced.acl`·`all-accounts.acl`의 application 두 계정에서 `+@pubsub`·`&prod:*` 삭제(`resetchannels`만 남음). admin-readonly의 `+pubsub|channels` 등 introspection은 그대로(읽기 전용 관측). topology lane 결과는 아래 검증 절 |
|
||||
| S3-lead-2 | 완료 | `68cda1d3`: env 오타 검사를 `StrictSettingsBinder`(support)로 일반화하고 httpclient `HttpClientEnvironmentKeys`(리플렉션 역산) 삭제. system env는 unbound 검사에서 빼고(Spring 열거형 `app.outbox.poll.interval`이 하이픈 필드를 오판 — 모든 트리가 `app.*`가 되면서 모든 capability의 문제가 됨), prefix의 env 형태로 시작하는 변수가 (a) 이번 바인딩이 바인딩한 속성, (b) 다른 source가 선언한 속성, (c) placeholder가 읽는 변수 중 하나의 env 형태가 아니면 이름으로 거부. `StrictSettingsBinderTest`: `aCorrectlySpelledHyphenatedEnvironmentVariableBinds`(FAIL: `BindException: Failed to bind properties under 'sample.shared'`)→PASS, `aMisspelledEnvironmentVariableIsRefusedByName`(FAIL: `Expecting actual throwable to be an instance of CapabilityStartupValidationException but was BindException`)→PASS, `aVariableASettingReadsThroughAPlaceholderIsNotATypo`(FAIL: BindException)→PASS, `aSubtreeAnotherModuleOwnsIsLeftToThatModule`(FAIL: BindException)→PASS, `aHyphenatedListFromTheEnvironmentBindsWhenForeignKeysAreExcluded`(P20-new-2 회귀). httpclient `HttpClientPlatformEnvManifestTest.aMisspelledEnvironmentVariableIsRefused` PASS(공용 binder로). manifest 도출(`fieldToEnvTemplate`)은 테스트로 옮김. `src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/StrictSettingsBinder.java` |
|
||||
| X2-P1-3c | 완료 | 위 "strict 바인딩 현황" 표. 각 모듈 재현 테스트 FAIL(`Expecting: <Started application …> to have failed`)→PASS: `DistributedLockPersistenceConfigTest.aMisspelledLockKeyFailsStartup`, `JpaStartupAutoConfigurationTest.aMisspelledSafetyKeyFailsStartup`, `PersistenceVendorSelectionTest.aMisspelledPersistenceKeyFailsStartup`(`0f8e9053`), `RedisCapabilityCompositionTest.aMisspelledCapabilityKeyFailsStartup`(+`theIdempotencyLifecycleKeysAreLeftToTheirOwner`, `34fe03d1`), `NotificationPlatformCoreConfigurationTest.aMisspelledPlatformKeyFailsStartup`(`6ef946a0`), `MessagingPlatformBridgeAutoConfigurationTest.aMisspelledTopLevelMessagingKeyFailsStartup`(+`thePlatformsOwnSectionsAreLeftToThePlatform`, `2f19accc`), `ServiceRuntimeRegistrationTest.aMisspelledRuntimeKeyFailsStartup`(`976fcf0b`), `ObjectStorageCapabilityConfigTest.aMisspelledObjectStorageKeyFailsStartup`(`28fdbfb1`), `WebSocketSettingsTest.aMisspelledWebSocketKeyFailsStartup`·`GraphQlDeploymentModeContractTest.aMisspelledGraphQlKeyFailsStartup`·`MongoPersistenceConfigTest.aMisspelledPlatformKeyFailsStartup`(`8ff4371d`). graphql·websocket·mongo는 support edge가 없어(inbound→outbound 금지, mongo closure) Spring 고유 `ignoreUnknownFields=false` — yml/properties 오타는 거부, env 오타는 Spring이 system env를 검사에서 빼므로 거부하지 않음(차이를 README 대신 여기 기록). objectstorage는 registry에 support edge 추가(`28fdbfb1`, 커밋 메시지에 이유). `StrictSettingsBinder`는 `bindOrCreate`로(키가 없으면 기본값) |
|
||||
| P22-new-1 | 완료 | `842e2402`: `JpaStartupAutoConfiguration#jpaProductionSecrets`가 `RequiredProductionSecrets`로 `APP_DATASOURCE_PASSWORD`를 기여(모듈이 켜져 있을 때만). `SecretSourceValidator`는 `app.persistence-jpa.enabled`를 더 읽지 않고 `REQUIRED_PROD_SECRETS = [APP_PRIVACY_PSEUDONYMIZATION_SALT]`. 레지스트리 `secrets-classification.yaml`의 `APP_DATASOURCE_PASSWORD`에 `required_when: app.persistence-jpa.enabled=true`(`SecretsClassificationRegistryTest` 1:1 유지). `JpaStartupAutoConfigurationTest.theModuleContributesTheDatabasePasswordAsAProductionSecret` FAIL(`Expecting … to have a single bean of type RequiredProductionSecrets`)→PASS, `aSwitchedOffModuleOwesNoDatabasePassword` PASS, bootstrap `SecretSourceValidatorTest.theGuardAloneDoesNotRequireADatabasePassword`(스위치 true + 빈 비밀번호 + 기여 없음 → 기동) PASS |
|
||||
|
||||
## 제거된 코드
|
||||
| 대상 | 경로 | 마지막으로 존재한 커밋 | 이유 |
|
||||
|---|---|---|---|
|
||||
| `HttpClientEnvironmentKeys`(설정 record 트리를 리플렉션으로 순회해 env 이름 역산·거부) | `src/adapter/outbound/httpclient/src/main/java/dev/caskeleton/adapter/outbound/httpclient/autoconfigure/HttpClientEnvironmentKeys.java` | `0ebb77b5` | S3-lead-2: env 오타 거부를 `StrictSettingsBinder`가 모든 capability에 대해 한다. manifest 도출은 `HttpClientPlatformEnvManifestTest`로 |
|
||||
| `StrictSettingsBinder.bind(env, prefix, type, Predicate<ConfigurationPropertySource>)` overload | `src/adapter/outbound/support/.../StrictSettingsBinder.java` | `0ebb77b5` | httpclient 전용 우회였다. system env 제외가 기본 동작이 됨 |
|
||||
| 설정 키 `app.httpclient.clients[N].timeout.streaming-idle`(`APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_STREAMING_IDLE`)과 `TimeoutSettings.streamingIdle`·`HttpClientPlatformSettings.Timeout.streamingIdle` | `src/adapter/outbound/httpclient/.../profile/TimeoutSettings.java`, `docs/httpclient/env-fields.yaml` | `0ebb77b5` | P11-new-1: 바인딩만 되고 읽는 곳 없음(capability 규칙 3) |
|
||||
| yml 키 `ca-skeleton.rate-limit.{limit,window,algorithm}` | `src/app-bootstrap/src/test/resources/application-test.yml`, `src/sample-portfolio/src/systemTest/resources/application-test.yml` | `0ebb77b5` | 읽는 코드 없음. `app.rate-limit` 아래로 옮기면 web `EdgeRateLimitTransportSettings` 트리에 섞인다 |
|
||||
| `SecretSourceValidator`의 `RELATIONAL_PERSISTENCE_PROPERTY`·`isRelationalPersistenceOn()`(모듈 스위치 해석) | `src/app-bootstrap/src/main/java/dev/caskeleton/bootstrap/runtime/SecretSourceValidator.java` | `0ebb77b5` | P22-new-1: persistence-jpa가 기여 |
|
||||
| 설정 키 `app.notification.platform.smtp.max-concurrency`(이름 변경 → `dispatch-concurrency`, env `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` 그대로) | `NotificationSmtpSettings.java`, `notification.yml` | `0ebb77b5` | P20-new-1 |
|
||||
| Redis ACL `+@pubsub`·`&prod:*`(application 계정 2개) | `infra/redis-sdk/acl/*.acl` | `0ebb77b5` | P22-new-2 |
|
||||
|
||||
## 새로 발견한 결함
|
||||
- **P20-new-1** (고침, `6ef946a0`): `app.*` 통일로 `app.notification.platform.smtp.max-concurrency`(dispatch pool)의 relaxed env 형태가 `APP_NOTIFICATION_PLATFORM_SMTP_MAX_CONCURRENCY` — SMTP provider profile(`providers.smtp.max-concurrency`)의 placeholder 변수 — 와 같아져 한 변수가 두 속성을 설정하게 될 뻔했다(env가 yml보다 우선이라 `…_DISPATCH_CONCURRENCY`가 조용히 무시됨). 속성을 env 이름에 맞춰 `dispatch-concurrency`로. 전체 shipped yml·registry를 대상으로 "placeholder로 한 속성을 채우는 env가 relaxed 바인딩으로 다른 속성도 채우는가"를 스크립트로 확인해 남은 충돌 0건(sample의 죽은 `app.cache.redis.*` 한 건 제외 — 아래).
|
||||
- **P20-new-2** (고침, `68cda1d3`): `StrictSettingsBinder.bindExcept`가 system environment까지 filter된 view로 감쌌다. filter된 view는 Spring의 env 이름 매핑을 잃어, 하이픈이 든 list/map(`APP_…_ALLOWED_HOSTS_0`)이 env에서 오면 오류 없이 빈 값으로 바인딩됐다(composition:idempotency가 이 경로). system env는 filter하지 않게. `StrictSettingsBinderTest.aHyphenatedListFromTheEnvironmentBindsWhenForeignKeysAreExcluded`.
|
||||
- **P20-new-3** (남음): sample `application.yml`의 `app.cache.redis.*`(22개)·`app.outbound.http.*`(15개)·`app.messaging.kafka.brokers`·`app.notification.{email,slack}.provider`는 sample 조립에서 아무것도 바인딩하지 않는 죽은 키다(sample은 cache-redis·httpclient·notification을 싣지 않는다). sample 패키지는 P30 범위라 손대지 않음.
|
||||
- **P20-new-4** (남음): `src/README.md` "Outbound HTTP client" 절의 yaml 예시(`app.capabilities.http-client.expected-state`·`app.providers.http-client`)는 존재하지 않는 트리를 설명한다(prefix만 이번에 바뀜). Wave 5 문서 정리 대상.
|
||||
- **P20-new-5** (남음): persistence-jpa는 `app.persistence-jpa`(스위치)·`app.persistence`(vendor)·`app.jpa-platform`·`app.lock`·`app.outbox`·`app.realtime.replay`·`app.runtime.migration-on-startup`에 걸쳐 있다 — capability 규칙 4("prefix 하나")를 여전히 어긴다. `app.realtime.replay.retention`은 `@Value`라 strict 바인딩 밖. 키 재배치는 env·운영 문서 전체를 건드리는 별도 결정.
|
||||
|
||||
## 검증
|
||||
- `./gradlew check --continue --max-workers=3` — BUILD SUCCESSFUL(499 tasks)
|
||||
- `architectureCheck :app-bootstrap:verifyEnvKeys configContractCheck verifyDependencyLocks verifyPublicPathSnapshot` — 첫 실행에서 architectureTest 2건 실패(D3: `DistributedLockPersistenceConfig.lockSettings`에 스위치 조건 없음, B7: bridge 설정 bean이 public) → `e3e02052`로 고친 뒤 BUILD SUCCESSFUL. verifyEnvKeys: OK — 346 env keys
|
||||
- `mainCheck :app-bootstrap:integrationTest :app-bootstrap:systemTest :sample-portfolio:integrationTest :sample-portfolio:systemTest` — BUILD SUCCESSFUL
|
||||
- Redis topology lane(standalone, compose project `p20-redis`, 포트 16379, 끝나고 `down -v`): redis-runtime `LiveRedisCompositionTest` 7, redis-sdk `LiveRedisGuardrailTest` 6·`RedisTopologyContractTest` 8, cache-redis `LiveRedisSemanticScriptAclProbeTest` 2·`LiveRedisDistributedLeaseContractTest` 7·`LiveRedisSemanticPortsTest` 10 — 40개 전부 PASS. 추가로 `ACL DRYRUN ca-skeleton-application publish prod:x` → "no permissions", `get prod:x` → OK
|
||||
- `integrationCheck --continue` — BUILD SUCCESSFUL(12m 18s; 입력이 없는 lane은 설계대로 빠짐)
|
||||
- `-p optional-platforms ci` — 첫 실행 spotless 1건(`GrpcAdvancedModuleGuardTest`, 키 이름이 짧아져 줄바꿈 변화) → `13e624bd` 후 BUILD SUCCESSFUL
|
||||
- **로컬 기동**(`:app-bootstrap:qualificationBootJar`, `SPRING_PROFILES_ACTIVE=local`, `src/.env.example` 값): 모든 capability가 켜진 jar라 인프라 없이 차례로 막히는 곳을 하나씩 껐다 — mongo(active-profile 필요), JPA(PostgreSQL 없음), security issuer 필수, gRPC insecure-local(이제 `APP_GRPC_SERVER_ALLOW_INSECURE_LOCAL`이 relaxed 바인딩으로 `app.grpc.server.allow-insecure-local`에 닿는 것 확인), notification(JPA 필요), Redis 자격 증명, fileserver fingerprint key, httpclient client 없음, Kafka broker 주소, object-storage 바인딩 — 모두 설정 바인딩 오류가 아닌 기존의 이름 붙은 기동 검사. 이 과정에서 결함 하나 발견·수정(P20-new-6). `APP_HTTPCLIENT_CLIENTS_0_TIMEUOT_TOTAL_CALL`을 넣으면 `unrecognised environment variables under app.httpclient: [APP_HTTPCLIENT_CLIENTS_0_TIMEUOT_TOTAL_CALL]`로 거부, 올바른 이름이면 통과. 마지막 조합에서 `Started CaSkeletonApplication in 10.7 seconds`(60초 timeout으로 종료)
|
||||
- 수정 뒤 `:adapter:inbound:graphql:check` PASS
|
||||
|
||||
## 새로 발견한 결함 (추가)
|
||||
- **P20-new-6** (고침, `12c61a99`): graphql을 `ignoreUnknownFields=false`로 바꾸자, 필수·무기본값인 `app.graphql.deployment-mode`가 shipped `graphql.yml`의 `${APP_GRAPHQL_DEPLOYMENT_MODE:}`로 빈 값이 되어 "left unbound" 바인딩 오류로 먼저 실패 — `GraphQlDeploymentMode`의 이름 붙은 거절("app.graphql.deployment-mode is required … set APP_GRAPHQL_DEPLOYMENT_MODE")을 가렸다(qualification jar 로컬 기동에서 발견). `GraphQlActivationEnvironmentPostProcessor`가 해석값이 빈 그 항목을 `graphql-defaults` source에서 뺀다. `GraphQlCapabilityActivationTest.anUnsetModeIsRefusedByNameRatherThanAsAnUnboundKey` FAIL(`Expecting actual … UnsatisfiedDependencyException … graphQlPlatformConfigurationCheck` 에 이름 붙은 문구 없음)→PASS. 같은 성질(빈 placeholder + 비-String 필드 + strict)의 다른 곳은 shipped yml 전수 확인에서 없음(나머지 빈 기본값은 모두 String/list).
|
||||
- 마지막 커밋(`12c61a99`) 뒤 `check architectureCheck :app-bootstrap:verifyEnvKeys verifyDependencyLocks --continue` — BUILD SUCCESSFUL. `git status` 깨끗
|
||||
|
||||
통합 시 주의: 파일 전반(256개)이 키 이름을 바꾸므로 P30과 겹치는 파일(조건 annotation, sample yml 등)은 P30 쪽 새 코드에 `ca-skeleton.`/`backend.graphql`이 남지 않았는지 `git grep -nE '(^|[^/\w.-])ca-skeleton\.[a-z]|backend\.(graphql|web\.(mvc|advanced))' -- src`로 확인할 것(남아야 하는 것: 메시징 hash domain 4개, gRPC Context key 1개). `ConfigurationNamespaceContractTest.everyLeafPrefixSitsUnderTheApplicationRoot`가 설정 prefix 쪽은 잡는다.
|
||||
@@ -71,6 +71,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
|
||||
| 33 | 분리된 persistence leaf의 caller 트랜잭션 guard | `persistence-notification`·`persistence-fileserver` → `persistence-jpa` edge 추가, `CallerTransaction` 하나를 쓴다 | X1-#4, X1-지도-caller 트랜잭션 guard |
|
||||
| 34 | notification·fileserver id 포트를 domain `IdFactory`로 | 하지 않음 — 두 application leaf에 domain-core edge를 주지 않는다 → 보류 | P16-new-5 |
|
||||
| 35 | X2-P2-6b 나머지(principal tenant, GraphQL Spring Security resolver, 가명화 키) | 전부 하지 않음 — 소비자 없는 필드는 만들지 않고, adopter resolver bean 방식 유지, 키 분리는 의도(문서화) → 보류 | J-12 / X2-P2-6b |
|
||||
| 36 | persistence-jpa 설정 prefix 여러 개 | 기능별 분리 인정 — JPA 플랫폼 자체(스위치·vendor·jpa-platform·migration-on-startup)는 `app.persistence-jpa.*` 하나로, 여러 저장소가 공유하는 outbox·lock·replay는 기능 트리(`app.outbox`·`app.lock`·`app.realtime.replay`)로 두고 규칙 4에 이 예외를 적는다. `APP_*` env 키 유지 | P20-new-5 |
|
||||
|
||||
기존 원칙에서 바로 따라 나와 에이전트가 정한 것(소유자가 뒤집을 수 있음):
|
||||
|
||||
@@ -735,7 +736,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
|
||||
| X2-P1-2b | Required | httpclient `profile/RuntimeEnvironment`가 정본과 이름이 같음(Nit) | 남음 | `adapter/outbound/httpclient/.../profile/RuntimeEnvironment.java` (httpclient 안 참조 파일 4개 + 정본 import 1개) | W5 | `HttpClientHardening` 등으로 개명, 참조 4파일 수정 |
|
||||
| X2-P1-3a | Required(문서) | capability settings 규칙(strict 바인딩 + compact constructor)을 root 문서에 | 완료 | `AGENTS.md:216` capability 완료 기준 4, 커밋 `6d27356e` | - | - |
|
||||
| X2-P1-3b | Required | gRPC adapter strict prefix `ca-skeleton.grpc`가 벤더 `ca-skeleton.grpc.platform`과 겹침 | 완료 | Wave 1–2 P5 (fcddab7e·Wave 2 커밋): `GrpcSafeActivationTest.theVendorPlatformNamespaceBesideTheAdapterDoesNotFailItsStrictBinding` FAIL(`UnboundConfigurationPropertiesException: The elements [ca-skeleton.grpc.platform.enabled] were left unbound`)→PASS. 어댑터 prefix `ca-skeleton.grpc` → `ca-skeleton.grpc.server` `src/adapter/inbound/grpc/src/main/java/dev/caskeleton/adapter/inbound/grpc/GrpcServerSettings.java:17`, `GrpcServerConfig.java`. 어댑터 키는 env-keys registry에 행이 없었다(추가·수정 없음). 갱신: `src/adapter/inbound/grpc/{CLAUDE,README}.md`, `src/README.md:269`(env `CA_SKELETON_GRPC_SERVER_ALLOW_INSECURE_LOCAL`). **오케스트레이터 할 일:** `docs/capability-status.md:42`의 `ca-skeleton.grpc.enabled`·`ca-skeleton.grpc.allow-insecure-local`을 `.server.` 경로로. Wave 3-B(`app.*`)에서도 `app.grpc.server`처럼 벤더 prefix와 형제로 둬야 같은 충돌이 다시 안 생긴다. 커밋 `a498ad84` | - | adapter prefix를 `ca-skeleton.grpc.server` 등으로 분리(설정 키·env key·README 갱신) |
|
||||
| X2-P1-3c | Required | 오타 키 거부가 일부 capability에만 적용 | 남음 | strict 바인딩 4곳(fileserver·httpclient `StrictSettingsBinder`, `GrpcServerSettings.java:17`, `GrpcPlatformProperties.java:19`) / main `@ConfigurationProperties` 54파일(`git grep -l "@ConfigurationProperties" -- 'src/**/src/main/java/**'`) | W3 | `AGENTS.md:216` 기준대로 capability 모듈(cache-redis, persistence-jpa, persistence-mongo, messaging, notification, objectstorage, graphql, websocket) settings를 `StrictSettingsBinder`로 바인딩 |
|
||||
| X2-P1-3c | Required | 오타 키 거부가 일부 capability에만 적용 | 완료 | Wave 3 W3-P20 (Wave 3 커밋): 위 "strict 바인딩 현황" 표. 각 모듈 재현 테스트 FAIL(`Expecting: <Started application …> to have failed`)→PASS: `DistributedLockPersistenceConfigTest.aMisspelledLockKeyFailsStartup`, `JpaStartupAutoConfigurationTest.aMisspelledSafetyKeyFailsStartup`, `PersistenceVendorSelectionTest.aMisspelledPersistenceKeyFailsStartup`(`0f8e9053`), `RedisCapabilityCompositionTest.aMisspelledCapabilityKeyFailsStartup`(+`theIdempotencyLifecycleKeysAreLeftToTheirOwner`, `34fe03d1`), `NotificationPlatformCoreConfigurationTest.aMisspelledPlatformKeyFailsStartup`(`6ef946a0`), `MessagingPlatformBridgeAutoConfigurationTest.aMisspelledTopLevelMessagingKeyFailsStartup`(+`thePlatformsOwnSectionsAreLeftToThePlatform`, `2f19accc`), `ServiceRuntimeRegistrationTest.aMisspelledRuntimeKeyFailsStartup`(`976fcf0b`), `ObjectStorageCapabilityConfigTest.aMisspelledObjectStorageKeyFailsStartup`(`28fdbfb1`), `WebSocketSettingsTest.aMisspelledWebSocketKeyFailsStartup`·`GraphQlDeploymentModeContractTest.aMisspelledGraphQlKeyFailsStartup`·`MongoPersistenceConfigTest.aMisspelledPlatformKeyFailsStartup`(`8ff4371d`). graphql·websocket·mongo는 support edge가 없어(inbound→outbound 금지, mongo closure) Spring 고유 `ignoreUnknownFields=false` — yml/properties 오타는 거부, env 오타는 Spring이 system env를 검사에서 빼므로 거부하지 않음(차이를 README 대신 여기 기록). objectstorage는 registry에 support edge 추가(`28fdbfb1`, 커밋 메시지에 이유). `StrictSettingsBinder`는 `bindOrCreate`로(키가 없으면 기본값) | - | `AGENTS.md:216` 기준대로 capability 모듈(cache-redis, persistence-jpa, persistence-mongo, messaging, notification, objectstorage, graphql, websocket) settings를 `StrictSettingsBinder`로 바인딩 |
|
||||
| X2-P1-4a | Consider | web `cursor/CursorCodec`(dev key 하드코딩) 삭제 | 완료 | `docs/capability-status.md:94`, `HmacWebCursorCodec`도 삭제(`:97`), 커밋 `6d27356e` | - | - |
|
||||
| X2-P1-4b | Consider | 서명 계층 하나(inbound에서 서명, persistence는 typed keyset), 남으면 공용 서명 헬퍼 | 완료 | Wave 3 W3-P19 (Wave 3 라운드 3 커밋): 커밋 `35e1df8a`. `shared-contract/.../digest/HmacSha256.java`(sign/verify, 길이 먼저 확인 후 constant-time), `HmacSha256Test` 5건. 사용: graphql `HmacGraphQlCursorCodec`·`GraphQlIdentityFingerprinter`, persistence-jpa `SignedJsonCursorCodec`, notification HMAC 3곳, sample digester. 서명 codec은 유지(2026-09-25 결정). mongo `MongoKeysetCursorCodec`은 shared-contract edge 없어 유지, redis·identifier·fileserver는 동시 묶음/edge 없음으로 유지 | - | 결정(2026-09-25): Wave 3 라이브러리 유지 결정을 따름 — 서명 codec 유지, shared-contract에 sign/verify 헬퍼 하나로 중복 제거 |
|
||||
| X2-P1-5 | Consider | SHA-256 보일러플레이트 → shared-contract `Sha256` | 완료 | Wave 3 W3-P19 (Wave 3 라운드 3 커밋): 커밋 `bca2c682`. `shared-contract/.../digest/Sha256.java`(of/ofUtf8/newMessageDigest/hex), `Sha256Test` 5건. `MessageDigest.getInstance` main 36곳 → 10곳(mongo 3, application-objectstorage 2 — shared-contract edge 없음; vendored messaging 2·gRPC 2; cache-redis SHA-1 1) | - | shared-contract `Sha256.hex(String)`·`digest(byte[])` 추가, edge 있는 25파일 교체(objectstorage 12, sample 3, graphql 2, cache-redis 2, fileserver 2, notification 2, persistence-jpa 2); mongo 3·application-objectstorage 2(edge 없음)와 벤더 5는 유지 |
|
||||
@@ -860,9 +861,9 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
|
||||
| S3-#13b | Nit | draining·retry 소진을 `HttpRateLimitRejectedException`으로 던짐(텔레메트리 카테고리 오기) | 완료 | Wave 1–2 P11 (fcddab7e·Wave 2 커밋): `DefaultGenericHttpGatewayTest.anExhaustedRetryBudgetIsReportedAsItsOwnFailureNotARateLimit`·`aRetryRefusedByADrainingRuntimeIsReportedAsItsOwnFailureNotARateLimit` FAIL(`expected HttpRetryBudgetExhaustedException/HttpRuntimeDrainingException but was HttpRateLimitRejectedException`)→PASS. `HC/restclient/DefaultGenericHttpGateway.java:183,281`, 새 타입 `HC/api/error/HttpRetryBudgetExhaustedException.java`·`HttpRuntimeDrainingException.java`, `docs/httpclient/operations.md` 예외 표 갱신. 두 경로는 재시도 판정과 다음 attempt 사이의 경합에서만 도달하므로 테스트는 `TestGateways.forProfile(profile, transport, eligibility)`로 판정기를 주입해 재현 | - | draining·retry 소진 전용 예외(또는 카테고리)로 분리 |
|
||||
| S3-#13c | Nit | Redis health indicator 둘이 DOWN 값만 다름 | 남음 | `redis-runtime/.../sdk/config/RedisSdkAutoConfiguration.java:257`(DEGRADED)·`:285`(DOWN) | W5 | 상태 값만 인자로 받는 indicator 하나로 |
|
||||
| S3-lead-1 | 권고 | `RedisSecretSource` + `System.getenv` 기본값 vs `SecretSourcePort` (= X2 P1-1) | 완료 | 문제 아님: redis-runtime은 의존 edge가 없어 자체 SPI(`RedisSdkAutoConfiguration.java:168-171,334`)를 두고, cache-redis가 `SecretSourcePort`로 bridge(`cache-redis/.../capability/RedisCapabilityConfig.java:66`). X2 P1-1이 이 구조를 모범 사례로 판정 | - | - |
|
||||
| S3-lead-2 | 권고 | `HttpClientEnvironmentKeys`(리플렉션 env 이름 역산) vs `StrictSettingsBinder` (= X2 P1-3) | 남음 | `httpclient/.../autoconfigure/HttpClientEnvironmentKeys.java`(179줄, `RecordComponent` 순회), `HttpClientPlatformSettingsBinder.java:27`만 사용. 다른 capability는 env 오타 검사 없음 | W3 | env 이름 역산 검사를 support `StrictSettingsBinder` 옵션으로 옮겨 모든 capability가 같은 방식으로 오타 env를 거부 |
|
||||
| S3-lead-2 | 권고 | `HttpClientEnvironmentKeys`(리플렉션 env 이름 역산) vs `StrictSettingsBinder` (= X2 P1-3) | 완료 | Wave 3 W3-P20 (Wave 3 커밋): `68cda1d3`: env 오타 검사를 `StrictSettingsBinder`(support)로 일반화하고 httpclient `HttpClientEnvironmentKeys`(리플렉션 역산) 삭제. system env는 unbound 검사에서 빼고(Spring 열거형 `app.outbox.poll.interval`이 하이픈 필드를 오판 — 모든 트리가 `app.*`가 되면서 모든 capability의 문제가 됨), prefix의 env 형태로 시작하는 변수가 (a) 이번 바인딩이 바인딩한 속성, (b) 다른 source가 선언한 속성, (c) placeholder가 읽는 변수 중 하나의 env 형태가 아니면 이름으로 거부. `StrictSettingsBinderTest`: `aCorrectlySpelledHyphenatedEnvironmentVariableBinds`(FAIL: `BindException: Failed to bind properties under 'sample.shared'`)→PASS, `aMisspelledEnvironmentVariableIsRefusedByName`(FAIL: `Expecting actual throwable to be an instance of CapabilityStartupValidationException but was BindException`)→PASS, `aVariableASettingReadsThroughAPlaceholderIsNotATypo`(FAIL: BindException)→PASS, `aSubtreeAnotherModuleOwnsIsLeftToThatModule`(FAIL: BindException)→PASS, `aHyphenatedListFromTheEnvironmentBindsWhenForeignKeysAreExcluded`(P20-new-2 회귀). httpclient `HttpClientPlatformEnvManifestTest.aMisspelledEnvironmentVariableIsRefused` PASS(공용 binder로). manifest 도출(`fieldToEnvTemplate`)은 테스트로 옮김. `src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/StrictSettingsBinder.java` | - | env 이름 역산 검사를 support `StrictSettingsBinder` 옵션으로 옮겨 모든 capability가 같은 방식으로 오타 env를 거부 |
|
||||
| S3-lead-3 | 권고 | TLS material 로딩이 Redis와 httpclient에 따로 | 완료 | 문제 아님: Redis는 Lettuce `SslOptions`에 PEM 위치만 넘김(`RedisTopologyClientFactory.java:327-362`), httpclient는 JSSE `KeyStore`·`TrustManagerFactory` 구성(`security/TlsMaterialProvider.java`). 클라이언트 API가 달라 공유할 코드가 없고 redis-runtime은 의존 edge 0 | - | - |
|
||||
| S3-lead-4 | 권고 | `ca-skeleton.capabilities.*` selector 문자열이 여러 leaf에 흩어짐 | 남음 | main 13파일(sample, app-bootstrap 3, web 1, persistence-jpa 3, redis-runtime `RedisCorrectnessRoles.java`, cache-redis 4), `...idempotency.provider` 30회 | W3 | 역할별 selector 키를 한 곳(멱등성은 S1-lead-3의 composition 모듈, Redis는 `RedisCorrectnessRoles`)에 상수로 두고 나머지는 그 상수/조건 클래스를 사용 |
|
||||
| S3-lead-4 | 권고 | `ca-skeleton.capabilities.*` selector 문자열이 여러 leaf에 흩어짐 | 완료 | Wave 3 W3-P20 (Wave 3 커밋): `711a3968`: `src/adapter/outbound/support/src/main/java/dev/caskeleton/adapter/outbound/support/CapabilitySelectors.java`(ROOT·CACHE_DEFAULT_BINDING·IDEMPOTENCY_PROVIDER·RATE_LIMIT_PROVIDER·LEASE_PROVIDER). 사용: cache-redis `RedisCacheConfig`·`RedisCorrectnessRoleSelectors`·`RedisIdempotencyConfig`·`RedisLeaseConfig`·`RedisRateLimitConfig`·`RedisCapabilitySettings.bind`, persistence-jpa `PostgreSqlIdempotencyStoreConfig`·`IdempotencyReaper`·`IdempotencySchemaStream`, composition:idempotency `IdempotencyAutoConfiguration`. 현황표 방향(멱등성은 composition 모듈에)과 다르게 support에 둔 이유: persistence-jpa·cache-redis는 composition:idempotency에 의존할 수 없고(registry), 셋 다 support에 이미 의존한다. main의 `app.capabilities.*.provider` 문자열 리터럴 0건(`git grep '"app.capabilities' -- '*/src/main/*'`는 메시지·주석뿐) | - | 역할별 selector 키를 한 곳(멱등성은 S1-lead-3의 composition 모듈, Redis는 `RedisCorrectnessRoles`)에 상수로 두고 나머지는 그 상수/조건 클래스를 사용 |
|
||||
| S3-lead-5 | 권고 | `secret://<source>/<name>` 파싱이 다른 leaf에도 | 완료 | Wave 3 W3-P26 (Wave 3 라운드 2 커밋): `application-core` `SecretReference`(record source/name, `parse`·`isReference`, `application-core/.../outbound/SecretReference.java:47`)를 `SecretSourcePort` 옆에 추가. httpclient(`HttpClientAuthenticationAutoConfiguration.java:60-64`)와 cache-redis(`RedisKeys.java:83`)가 사용 — 둘 다 기존 edge(application-core) 안, registry 변경 없음. mongo·redis-runtime은 지시대로 유지. 테스트 `SecretReferenceTest` 6개(새 타입이라 FAIL은 컴파일 실패). cache-redis는 이름이 빈 `secret://src/`를 빈 키로 port에 넘기던 것이 이제 거부됨(`referenceWhoseNameIsBlankIsRejected`) | - | application-core `SecretSourcePort` 옆에 `SecretReference.parse` 하나, httpclient·cache-redis가 사용(mongo·redis-runtime은 edge 없어 유지) |
|
||||
|
||||
**조사 메모**
|
||||
@@ -992,7 +993,7 @@ Wave 3 라운드 1 결과로 받은 4건(2026-09-28, desktop):
|
||||
| S6-#11c | Consider | sample 테스트가 `TransactionPort` fake를 각자 작성 (= X1-#3 일부) | 완료 | application-core testFixtures `DirectTransactionPort`(`src/application-core/src/testFixtures/java/dev/caskeleton/application/transaction/testkit/DirectTransactionPort.java`), sample 테스트의 인라인 fake 0건, `6d27356e` | - | - |
|
||||
| S6-#12 | Consider | JPA 정책 클래스 겸용, 주입처 없는 bean, 테스트만 쓰는 플래그 | 완료 | `JpaPlatformAutoConfiguration` 삭제·`JpaStartupAutoConfiguration`으로 합침(`CS:238`), `app.jpa-platform.addons-enabled` 삭제(`CS:193`), `jpaDataSourceProfileValidator`가 `jpaResolvedDataSourceCheck`에 주입됨(`JS/JpaStartupAutoConfiguration.java:100,109-110`), `6d27356e` | - | - |
|
||||
| S6-#13 | Consider | 역할 없는 startup 예외 subclass 4개 | 완료 | Wave 3 W3-P25 (Wave 3 라운드 2 커밋): 4개 subclass 삭제, `StartupFailureException`을 final + package-private 생성자로(`support/.../startup/StartupFailureException.java:18,25`), 생성은 `StartupFailures`만. 테스트 23개 파일의 `isInstanceOf(XxxException.class)`를 `isInstanceOfSatisfying(StartupFailureException.class, e -> errorCode 단언)`으로. `StartupFailureExceptionTest`는 코드→exit 파라미터 테스트. support·persistence-jpa·cache-redis·app-bootstrap `test`/`architectureTest` PASS | - | `StartupFailureException` 하나 + 테스트는 `errorCode()` 단언; 생성은 `StartupFailures` factory만 |
|
||||
| S6-#14 | Consider | 스위치 prefix 3종, "capability" 뜻 여러 개 | 남음 | prefix: `ca-skeleton.*`(persistence-jpa, persistence-mongo, notification, outbox, grpc), `app.*`(messaging, redis, fileserver-platform, httpclient, object-storage, websocket), `backend.graphql`(`CS:30-45`). "capability": `@UseCaseCapability`, `capabilities.*` selector, `JpaCapability`, `MessagingCapabilities`. `MasterSwitch`·endpoint 미보고 부분은 삭제로 해당 없음 | W3 | 결정(2026-09-25): 설정 prefix를 `app.*`로 통일(`ca-skeleton.*`, `backend.graphql` → `app.*`), `APP_*` env 키 유지 |
|
||||
| S6-#14 | Consider | 스위치 prefix 3종, "capability" 뜻 여러 개 | 완료 | Wave 3 W3-P20 (Wave 3 커밋): 결정 16: 설정 prefix를 `app.*` 하나로(위 표). `711a3968`·`fabb611e`. env 키 이름 변경 없음. `ConfigurationNamespaceContractTest`: 허용 root는 `app` 하나(`shippedConfigurationDeclaresOnlyRecordedRoots`), 모든 leaf의 `@ConfigurationProperties`·`String PREFIX` 상수가 `app.` 아래(`everyLeafPrefixSitsUnderTheApplicationRoot`, 새 테스트) — `src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/ConfigurationNamespaceContractTest.java`. yml root 병합 4곳(cache-redis·notification module-defaults, sample `application.yml`·systemTest yml). "capability" 용어 정리는 이번 범위 밖(키 이름만) | - | 결정(2026-09-25): 설정 prefix를 `app.*`로 통일(`ca-skeleton.*`, `backend.graphql` → `app.*`), `APP_*` env 키 유지 |
|
||||
| S6-#15 | Consider | bootstrap `:test`에 저장소 governance 테스트 | 남음 | `src/app-bootstrap/src/test/java/dev/caskeleton/bootstrap/contract/` 하위 45파일 7,302줄(`208077fd` 50파일), 이 중 34개가 저장소 파일·리소스를 직접 읽음 | W4 | `architectureTest`처럼 별도 strict lane으로 옮기고 읽는 파일을 `inputs`로 선언 |
|
||||
| S6-#16a | Nit | 이력·리뷰 ID 주석 | 남음 | bootstrap main 이력/ID 줄 35개(105에서 감소, 주석 비율 19%), websocket 2개(해소 수준) | W5 | bootstrap 남은 35줄 삭제 |
|
||||
| S6-#16b | Nit | `CapabilityDependencyEnvironmentValidator` 30줄 Javadoc | 해당 없음(코드 삭제) | `CS:249` | - | - |
|
||||
@@ -1166,7 +1167,7 @@ Wave 1–2 구현 묶음(`P1`–`P13`)이 작업 중 찾은 결함과 통합 검
|
||||
| P10-new-1 | 발견 | `src/.env.example:25`가 `APP_SERVER_FORWARD_HEADERS_STRATEGY=framework`를 권했다. `framework`는 Spring `ForwardedHeaderFilter`가 모든 peer의 `X-Forwarded-For`를 믿어 `getRemoteAddr()` 자체를 호출자가 고르게 하므로, rate-limit 모드와 상관없이 비인증 키를 우회할 수 있었다. `na… | 완료 | Wave 1–2 P10 (fcddab7e·Wave 2 커밋): 결과 파일 `docs/reviews/2026-09-25-review-followup-results/P10.md` | - | - |
|
||||
| P10-new-2 | 발견 | `WebMvcRequestIdFilter`의 traceparent 정규식은 all-zero trace id 등을 받아들였고 `RequestLoggingFilter`의 `TraceParent.parse`는 거부해서, 같은 요청에서 두 필터가 다른 trace id를 가질 수 있었다(I-4b의 한 원인). 이제 `TraceParent.parse` 하나만 쓴다. | 완료 | Wave 1–2 P10 (fcddab7e·Wave 2 커밋): 결과 파일 `docs/reviews/2026-09-25-review-followup-results/P10.md` | - | - |
|
||||
| P10-new-3 | 발견 | 옛 콜백 컨트롤러의 `@RequestBody byte[]`는 form POST(`application/x-www-form-urlencoded`, query string 없음)에서 Spring 7 `ServletServerHttpRequest.getBody()`가 요청 파라미터로 다시 만든 본문을 준다(`getBodyFromServletRequestParameters`, spring-web 7.0.9 bytec… | 완료 | Wave 1–2 P10 (fcddab7e·Wave 2 커밋): 결과 파일 `docs/reviews/2026-09-25-review-followup-results/P10.md` | - | - |
|
||||
| P11-new-1 | 발견 | `app.httpclient.clients[N].timeout.streaming-idle`(`APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_STREAMING_IDLE`)은 바인딩만 되고 main 코드 어디서도 읽지 않음(reactive 삭제 전에도 그랬음). `HC/profile/TimeoutSettings.java:25`, `docs/httpclient/configuration-reference… | 남음 | 결과 파일 `docs/reviews/2026-09-25-review-followup-results/P11.md` | W3 | 읽지 않는 `timeout.streaming-idle` 키·env 키 삭제 |
|
||||
| P11-new-1 | 발견 | `app.httpclient.clients[N].timeout.streaming-idle`(`APP_HTTPCLIENT_CLIENTS_N_TIMEOUT_STREAMING_IDLE`)은 바인딩만 되고 main 코드 어디서도 읽지 않음(reactive 삭제 전에도 그랬음). `HC/profile/TimeoutSettings.java:25`, `docs/httpclient/configuration-reference… | 완료 | Wave 3 W3-P20 (Wave 3 커밋): `711a3968`: 읽지 않던 `clients[N].timeout.streaming-idle` 키 삭제 — `TimeoutSettings`·`HttpClientPlatformSettings.Timeout`·`HttpClientProfileFactory`·testFixtures `ClientProfiles`에서 `streamingIdle` 제거, `docs/httpclient/env-fields.yaml`·`configuration-reference.md` 행 삭제. `HttpClientPlatformEnvManifestTest.theManifestAndTheSettingsTreeAgree` PASS(manifest와 record 트리 일치). 이제 `APP_HTTPCLIENT_CLIENTS_0_TIMEOUT_STREAMING_IDLE`을 설정하면 strict binder가 이름으로 거부 | - | 읽지 않는 `timeout.streaming-idle` 키·env 키 삭제 |
|
||||
| P11-new-2 | 발견 | `scripts/verify-httpclient-docs.py:22`가 없는 경로 `src/app-bootstrap/.../autoconfigure/httpclient/HttpClientStartupValidator.java`를 읽어 `FileNotFoundError`로 실패함. 경로를 `.../httpclient/autoconfigure`로 바꿔 돌리면 `rotation-drain-timeout`이 `doc… | 남음 | 결과 파일 `docs/reviews/2026-09-25-review-followup-results/P11.md` | W5 | `scripts/verify-httpclient-docs.py` 경로 수정, `rotation-drain-timeout` 문서 추가 |
|
||||
| P11-new-3 | 발견 | `httpClientFailureInjectionTest`의 `FailureInjectionContractTest.disabledProxyFailsBeforeARequestCanBeSent`가 이 머신에서 실패(`expected: NOT_SENT but was: SENT_NO_RESPONSE`). Docker userland proxy(`docker-proxy` 동작 중)가 꺼진 Toxiproxy 리스너의 p… | 남음 | 결과 파일 `docs/reviews/2026-09-25-review-followup-results/P11.md` | W4 | Docker userland proxy에 의존하지 않는 방식으로 lane 수정(기준 커밋에서도 실패 — 기존 결함) |
|
||||
| P11-new-4 | 발견 | Dynamic Target cross-origin hop은 `SensitiveHeaderStripper` 표준 이름(`authorization`·`cookie`·`x-api-key`·`api-key` 등)만 제거하므로, 호출자가 `HeaderPolicy`로 넘긴 관례 밖 이름의 자격증명 헤더(예: `X-Client-Key`)는 다음 origin으로 따라감 `HC/dynamic/DefaultDynamicTarg… | 완료 | Wave 2.5 W2-P14 (Wave 3 라운드 1 커밋): 결정 23. `DefaultDynamicTargetGatewayTest.crossOriginHopKeepsOnlySafeCallerHeaders` FAIL(`[(true, true), (true, true)]`)→PASS. `HC/dynamic/DefaultDynamicTargetGateway.java:164,172-185` cross-origin hop에서 호출자 헤더를 allowlist(`Accept`·`Accept-Language`·`Content-Type`·`Content-Language`)로만 남김. 자격증명 binding 헤더는 hop마다 새 target 기준으로 다시 붙음(기존) | - | 결정 23: cross-origin hop에서 호출자 헤더 전부 제거, 안전한 헤더만 유지 |
|
||||
@@ -1215,8 +1216,8 @@ Wave 1–2 구현 묶음(`P1`–`P13`)이 작업 중 찾은 결함과 통합 검
|
||||
| P21-new-1 | 발견 | handler가 `Retry`를 답하면 Kafka consumer가 시도 횟수를 세지 않아 partition이 영구히 멈췄다. | 완료 | Wave 3 P21: 예외와 같은 시도 예산·격리 사용 | - | - |
|
||||
| P21-new-2 | 발견 | 다시 읽은 delivery가 항상 `deliveryAttempt=1`을 보고했다. | 완료 | Wave 3 P21 | - | - |
|
||||
| P21-new-3 | 발견 | `src/messaging/CLAUDE.md`가 `MessagingPublicSurfaceContractTest`를 인용 — 테스트는 app-bootstrap에 있다(P21은 없다고 보고). 통합 때 이 테스트가 P21 변경(reactive facade 삭제, leaf 병합, starter-kafka 공개 consumer seam)을 반영하지 못해 실패 → 기대값 수정, starter-kafka에 `api kafka-clients` 선언. | 남음 | Wave 3 라운드 3 통합 | W5 | messaging CLAUDE.md의 테스트 위치 문구를 app-bootstrap 경로로 |
|
||||
| P22-new-1 | 발견 | bootstrap `SecretSourceValidator`가 persistence-jpa의 모듈 스위치를 읽어 `APP_DATASOURCE_PASSWORD` 필요 여부를 판정(모듈 지식이 bootstrap에). | 남음 | Wave 3 P22 결과 파일 | W3 | Redis처럼 persistence-jpa가 secret 요구를 기여. P20 |
|
||||
| P22-new-2 | 발견 | `infra/redis-sdk/acl/application.acl`·`all-accounts.acl`이 pub/sub 삭제 뒤에도 `+@pubsub`·`&prod:*`를 준다(최소 권한 위반, fixture). | 남음 | Wave 3 P22 결과 파일 | W3 | ACL fixture에서 제거 후 topology lane 재실행. P20 |
|
||||
| P22-new-1 | 발견 | bootstrap `SecretSourceValidator`가 persistence-jpa의 모듈 스위치를 읽어 `APP_DATASOURCE_PASSWORD` 필요 여부를 판정(모듈 지식이 bootstrap에). | 완료 | Wave 3 W3-P20 (Wave 3 커밋): `842e2402`: `JpaStartupAutoConfiguration#jpaProductionSecrets`가 `RequiredProductionSecrets`로 `APP_DATASOURCE_PASSWORD`를 기여(모듈이 켜져 있을 때만). `SecretSourceValidator`는 `app.persistence-jpa.enabled`를 더 읽지 않고 `REQUIRED_PROD_SECRETS = [APP_PRIVACY_PSEUDONYMIZATION_SALT]`. 레지스트리 `secrets-classification.yaml`의 `APP_DATASOURCE_PASSWORD`에 `required_when: app.persistence-jpa.enabled=true`(`SecretsClassificationRegistryTest` 1:1 유지). `JpaStartupAutoConfigurationTest.theModuleContributesTheDatabasePasswordAsAProductionSecret` FAIL(`Expecting … to have a single bean of type RequiredProductionSecrets`)→PASS, `aSwitchedOffModuleOwesNoDatabasePassword` PASS, bootstrap `SecretSourceValidatorTest.theGuardAloneDoesNotRequireADatabasePassword`(스위치 true + 빈 비밀번호 + 기여 없음 → 기동) PASS | - | Redis처럼 persistence-jpa가 secret 요구를 기여. P20 |
|
||||
| P22-new-2 | 발견 | `infra/redis-sdk/acl/application.acl`·`all-accounts.acl`이 pub/sub 삭제 뒤에도 `+@pubsub`·`&prod:*`를 준다(최소 권한 위반, fixture). | 완료 | Wave 3 W3-P20 (Wave 3 커밋): `b509991a`: `infra/redis-sdk/acl/application.acl`·`application-advanced.acl`·`all-accounts.acl`의 application 두 계정에서 `+@pubsub`·`&prod:*` 삭제(`resetchannels`만 남음). admin-readonly의 `+pubsub channels` 등 introspection은 그대로(읽기 전용 관측). topology lane 결과는 아래 검증 절 | - | ACL fixture에서 제거 후 topology lane 재실행. P20 |
|
||||
| P22-new-3 | 발견 | redis-sdk 공개 API가 runtime 타입을 노출하면서 runtime을 `implementation`으로만 의존. `ca.spring-library`에 `api` 구성이 없어 한 줄로 못 고침. | 완료 | Wave 3 W3-P29 (Wave 3 라운드 3 커밋): `3967c9ef`. redis-sdk만 `java-library` + `api project(':adapter:outbound:redis-runtime')` / 통합 검증 통과(redis-sdk java-library + api redis-runtime) | - | 컨벤션에 `java-library` 적용 또는 공개 표면에서 runtime 타입 제거. P29 |
|
||||
| ORCH-new-4 | 발견 | redis-sdk `RedisSdkModuleBoundaryTest`·`RedisSupportMatrixTest`가 옛 split package(`redis-runtime/.../redis/sdk`)를 훑음 — P22 worktree에서 통과, main 통합에서 `NoSuchFileException`(ORCH-new-2와 같은 유형: 저장소 파일을 읽지만 test inputs 미선언). | 남음 | 경로는 통합 때 수정(`redis-sdk` 하나) | W4 | 읽는 파일을 test `inputs`로 선언 |
|
||||
| P19-new-1 | 발견 | notification `platform.api.TenantId`가 비어 있지 않음·100자 이하만 검사 — web·GraphQL이 거부하는 tenant(공백·줄바꿈·경로 문자)를 받는다. 강화하면 이미 저장된 행을 못 읽을 수 있다. | 완료 | Wave 3 W3-P30 (Wave 3 라운드 4 커밋): 커밋 `1fc862a8`. `application-notification/.../platform/api/TenantId.java`는 그대로(저장된 행을 읽는 타입 — 이전 규칙으로 쓴 행도 읽힘, `NotificationSubmissionServiceTest.aTenantStoredUnderTheOldRuleIsStillReadable`). 새 쓰기만 `dispatch/WritableTenant.require`(package-private)로 application-core `TenantId` 문법(`[A-Za-z0-9][A-Za-z0-9_.-]{0,63}`)을 요구, 어긋나면 `NotificationValidationException`(`VALIDATION_FAILED`, 다른 제출 검증과 같은 코드): `NotificationSubmissionService.prepare`(submit·schedule 공통 첫 단계), `AcceptNotificationApplicationUseCase.handle`(첫 쓰기인 연락처 등록 전). 테스트: `NotificationSubmissionServiceTest.aSubmissionForATenantOutsideTheTransportGrammarIsRefused`(공백·줄바꿈·`../`·`/`·선행 `-` 5건) FAIL(`Expecting actual not to be null`) → PASS, `AcceptNotificationApplicationUseCaseTest.anAcceptanceForATenantOutsideTheTransportGrammarRegistersNothing` FAIL → PASS. 기본 단일 tenant `"default"`(`NotificationPlatformCodecConfig.java:57`)는 문법 안. 검증: application-notification 230, adapter:outbound:notification·web-notification·composition notification `check` PASS | - | 읽기는 관대하게, 새 쓰기만 공용 `TenantId` 문법으로. P30 |
|
||||
@@ -1227,3 +1228,9 @@ Wave 1–2 구현 묶음(`P1`–`P13`)이 작업 중 찾은 결함과 통합 검
|
||||
| P30-new-1 | 발견 | fileserver `DefaultCleanupService.cleanStaging`이 `claimForCleanup`(JPA `@Modifying` update)을 트랜잭션 밖에서 불러 실제 store에서는 세션 있는 staging 정리가 매번 실패·재시도 후 포기됐다. | 완료 | Wave 3 P30 `4de7717d`: guard 추가 전 호출자를 트랜잭션 안으로 | - | - |
|
||||
| P30-new-2 | 발견 | notification dispatch Blocked 분기가 recipient 전이 트랜잭션을 닫은 뒤 request 상태 roll-up을 트랜잭션 밖에서 실행. | 완료 | Wave 3 P30 `4de7717d` | - | - |
|
||||
| P30-new-3 | 발견 | objectstorage local-dev provider의 create-only 게시가 이제 한 프로세스 안에서만 보장된다(JDK에 디렉터리 핸들 기준 create-only rename·link가 없어 검증된 부모에서 부재 확인+rename, JVM 단위 lock). 예전 hard-link 방식은 프로세스 간에도 보장했다. provider는 단일 프로세스·local-dev 전용으로 선언돼 있다. | 남음 | Wave 3 P30 결과 파일 | W5 | provider README에 단일 프로세스 보장 범위 명시 |
|
||||
| P20-new-1 | 발견 | `app.*` 통일 뒤 `app.notification.platform.smtp.max-concurrency`의 env 형태가 SMTP provider profile 키와 겹쳐 변수 하나가 둘 다 설정. | 완료 | Wave 3 P20 `6ef946a0`: 속성을 `dispatch-concurrency`로(env 키 `APP_NOTIFICATION_PLATFORM_SMTP_DISPATCH_CONCURRENCY` 그대로) | - | - |
|
||||
| P20-new-2 | 발견 | `StrictSettingsBinder.bindExcept`가 system env까지 filter해 하이픈 든 list/map이 env에서 빈 값으로 바인딩. | 완료 | Wave 3 P20 `68cda1d3` | - | - |
|
||||
| P20-new-3 | 발견 | sample `application.yml`의 `app.cache.redis.*`(22)·`app.outbound.http.*`(15)·`app.messaging.kafka.brokers`·`app.notification.{email,slack}.provider`가 아무것도 바인딩하지 않는 죽은 키. | 남음 | Wave 3 P20 결과 파일 | W5 | 삭제(동작하지 않는 옵션은 키를 두지 않는다) |
|
||||
| P20-new-4 | 발견 | `src/README.md` "Outbound HTTP client" yaml 예시가 존재하지 않는 트리를 설명. | 남음 | Wave 3 P20 결과 파일 | W5 | 현재 `app.httpclient.*` 트리로 |
|
||||
| P20-new-5 | 발견 | persistence-jpa 설정이 `app.persistence-jpa`·`app.persistence`·`app.jpa-platform`·`app.lock`·`app.outbox`·`app.realtime.replay`·`app.runtime.migration-on-startup`에 흩어짐 — capability 규칙 4(prefix 하나) 위반. | 남음 | Wave 3 P20 결과 파일 | W4 | 결정 36: 플랫폼 키를 `app.persistence-jpa.*`로 모으고 AGENTS.md 규칙 4에 공유 기능 트리 예외. P33 |
|
||||
| P20-new-6 | 발견 | graphql strict 바인딩 뒤 빈 `deployment-mode`가 이름 붙은 거절 대신 일반 바인딩 오류로 먼저 실패. | 완료 | Wave 3 P20 `12c61a99` | - | - |
|
||||
|
||||
@@ -77,3 +77,14 @@ cd src
|
||||
- 커밋 메시지 끝: `Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>`
|
||||
- 보고는 짧게: 변경 / 확인(실행한 명령과 결과 수치) / 남은 문제. Wave마다 Slack `#clean-architecture-전체`(channel_id `C0BCN9H9ABH`)에 작업 브리핑(`:memo: *[작업] …*` 템플릿, 둘째 줄에 `repo`·`branch`·시각).
|
||||
- 사용자는 작은 증분마다 확인받는 것보다 검증까지 끝낸 큰 덩어리를 선호한다. 진짜로 사용자 몫인 결정만 묻는다(여러 개면 한 번에 모아서, 기본값 추천과 함께). 사용량 한도가 있으니 에이전트는 묶음을 크게 잡아 수를 줄인다(지난번 구현 에이전트는 묶음당 약 36만~72만 토큰).
|
||||
|
||||
---
|
||||
|
||||
## 일시 정지 상태 (2026-09-29, 사용량 때문에 사용자 요청으로 멈춤)
|
||||
|
||||
- 브랜치 HEAD `8bbf1bf0`까지 커밋됨(Wave 3 라운드 1–4의 P30까지). **main 작업 트리에 P20(설정 prefix `app.*`) 통합분이 미커밋으로 있다** — P30과의 충돌 11건과 남은 옛 키 3파일은 이미 풀었다. 재개하면 먼저 Wave 3 종료 검증을 다시 돌리고(로그 scratchpad `w3-*.log`, 멈출 때 실행 중이었음), 통과하면 `docs/capability-status.md`에 `W3-P20.md` 「제거된 코드」 행을 붙이고 커밋 `review-followup Wave 3`.
|
||||
- 현황표: 완료 606 · 해당 없음 133 · 보류 5 · 남음 173(W4 63 · W5 110). 소유자 결정은 36번까지(현황표 「소유자 결정」 절).
|
||||
- 계획서 「Wave 4」에 묶음 P31–P34가 있다. P31·P32·P34는 도중에 멈췄다 — worktree 브랜치에 커밋이 남아 있다(`worktree-agent-a3ab3a38ced388a02` P31 4커밋+미커밋 1, `worktree-agent-a37868fbf0dfdeb96` P32 3커밋, `worktree-agent-aa5edcaae241be106` P34 2커밋+미커밋 4, 기준 `8bbf1bf0`). 결과 파일은 scratchpad `W4-P3x.md`(있으면). 재개 시: 각 브랜치 커밋을 확인하고 새 에이전트에 "이 브랜치에서 이어서"로 넘기거나 커밋분만 cherry-pick 후 남은 행으로 새 묶음. P33은 아직 시작 전(P20-new-5 결정 36 포함).
|
||||
- Wave 3 통합 때 반복된 문제: worktree에서 통과하고 main에서만 실패하는 테스트(저장소 파일을 읽으면서 test inputs 미선언) — P34가 전수 점검 중이었다.
|
||||
- Wave 3 종료 검증 결과(멈춘 뒤 끝남): mainCheck·architecture/public path/env/config·integration·integrationCheck·build-logic·optional-platforms·releaseCheck/qualificationBootJar 통과, **check·ci 실패** — 재개하면 먼저 원인 확인(로그 scratchpad `w3-check.log`):
|
||||
> Task :adapter:outbound:persistence-jpa:spotlessJavaCheck FAILED
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Scope: the `:grpc-advanced:*` family. Everything here is off by default and stays off until a
|
||||
deployment names it. Nothing in this family ships in a runtime composition today.
|
||||
|
||||
Flags are `ca-skeleton.grpc.advanced.<capability>.enabled`. `GrpcAdvancedCapability` owns the list of
|
||||
Flags are `app.grpc.advanced.<capability>.enabled`. `GrpcAdvancedCapability` owns the list of
|
||||
capability names; `GrpcAdvancedSupportMatrix` owns their current grades.
|
||||
|
||||
---
|
||||
|
||||
@@ -5,8 +5,8 @@ empty — so nothing here fires in production yet. It is written now because the
|
||||
the ones an on-call cannot work out from first principles at three in the morning, and shipping the
|
||||
behaviour before the runbook means the first person to meet one is doing that.
|
||||
|
||||
Configuration lives under `ca-skeleton.grpc.platform.*` and is bound by `GrpcPlatformProperties`.
|
||||
The platform does not start unless `ca-skeleton.grpc.platform.enabled=true`.
|
||||
Configuration lives under `app.grpc.platform.*` and is bound by `GrpcPlatformProperties`.
|
||||
The platform does not start unless `app.grpc.platform.enabled=true`.
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +94,7 @@ capacity on nothing.
|
||||
means the bottleneck is admission, not the work.
|
||||
2. Check which saturation counter is moving — executor, channel or flow control. They look identical
|
||||
in a latency graph and have different fixes.
|
||||
3. Raising `ca-skeleton.grpc.platform.executor-queue-capacity` defers the problem; it does not remove
|
||||
3. Raising `app.grpc.platform.executor-queue-capacity` defers the problem; it does not remove
|
||||
it. `GrpcExecutorProfile` refuses a queue above ten thousand for that reason.
|
||||
|
||||
---
|
||||
@@ -138,5 +138,5 @@ construction rather than redacted.
|
||||
- **Reflection in production.** `GrpcReflectionMode.defaultFor` returns `DISABLED` for `STAGE` and
|
||||
`PROD`. Reflection publishes the whole schema to anyone who can open a connection.
|
||||
- **Every advanced capability.** See `docs/runbooks/grpc-advanced-capabilities.md`.
|
||||
- **The platform itself.** `ca-skeleton.grpc.platform.enabled` defaults to false, and every `:grpc:*`
|
||||
- **The platform itself.** `app.grpc.platform.enabled` defaults to false, and every `:grpc:*`
|
||||
leaf is build-only in the registry.
|
||||
|
||||
@@ -42,7 +42,7 @@ status: stub
|
||||
### Step 2 — 임시 격리
|
||||
- 일시 실패는 자동 backoff 재시도(30s × 2^(attempt-1) + jitter, max attempts 3)가 동작 — 즉시 수동 개입 불필요
|
||||
- broker 장기 다운이면 DEAD 전이 누적 전에 broker 회복을 우선 (max attempts 소진 시 `runbook://outbox/dead-letter`로 이관)
|
||||
- relay 자체를 멈춰야 하면 `ca-skeleton.outbox.relay-enabled=false`로 스케줄러 비활성 (이벤트는 outbox 테이블에 안전하게 보존됨 — 유실 없음)
|
||||
- relay 자체를 멈춰야 하면 `app.outbox.relay-enabled=false`로 스케줄러 비활성 (이벤트는 outbox 테이블에 안전하게 보존됨 — 유실 없음)
|
||||
|
||||
## 3. Diagnosis
|
||||
|
||||
@@ -62,7 +62,7 @@ status: stub
|
||||
|
||||
- 단기: broker 회복 후 backoff 만료 시 자동 재발행 — `outcome=PUBLISHED` 회복 확인
|
||||
- IN_FLIGHT orphan(claim 후 crash)은 in-flight-timeout(기본 PT5M) 경과 후 자동 재claim — at-least-once이므로 중복 발행 가능, consumer dedupe(idempotencyKey)가 흡수
|
||||
- 장기: `ca-skeleton.outbox.poll-interval`/`batch-size` 조정, broker 가용성 SLA 점검, 빈발 event_type의 payload 계약 검토
|
||||
- 장기: `app.outbox.poll-interval`/`batch-size` 조정, broker 가용성 SLA 점검, 빈발 event_type의 payload 계약 검토
|
||||
|
||||
## 5. Escalation
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# feature-security-operational-baseline D5 — deny-by-default public path snapshot.
|
||||
# SSOT: ca-skeleton.security.public-paths default in app-bootstrap/src/main/resources/config/security.yml
|
||||
# SSOT: app.security.public-paths default in app-bootstrap/src/main/resources/config/security.yml
|
||||
# -> SecurityConfig permitAll(); anyRequest authenticated. An operator's own SECURITY_PUBLIC_PATHS
|
||||
# overrides it at run time and is outside this snapshot.
|
||||
# Update only after review with: ./gradlew verifyPublicPathSnapshot -PapprovePublicPathChange
|
||||
|
||||
@@ -236,7 +236,7 @@ W1·W2 잔여 21행(Wave 2.5)은 P14로 1라운드에서 함께 처리한다. W1
|
||||
- [x] 라운드 1: P14 · P15 · P16 · P17 → 통합·검증·커밋 (2026-09-28, `9fdb0af4`·`c4a066df`·라운드 1 마무리 커밋)
|
||||
- [x] 라운드 2: P18 · P24 · P25 · P26 → 통합·검증·커밋 (2026-09-28~29, `4fb7943b`·`64a83918`·`25de288a`·`423a29c4`)
|
||||
- [x] 라운드 3: P19 · P21 · P22 · P23 · P27 · P28 → 통합·검증·커밋 (P23은 P18과 겹치지 않아 라운드 2 자리에서 먼저 시작)
|
||||
- [ ] 라운드 4: P20 · P30 (P29는 라운드 3에서 끝남) → 통합 → Wave 종료 검증 → 현황표·「제거된 코드」 갱신 → 커밋 `review-followup Wave 3`
|
||||
- [x] 라운드 4: P20 · P30 (P29는 라운드 3에서 끝남) → 통합 → Wave 종료 검증 → 현황표·「제거된 코드」 갱신 → 커밋 `review-followup Wave 3`
|
||||
|
||||
## Wave 4 — 테스트 규칙 (상세 Task: 2026-09-29)
|
||||
|
||||
@@ -248,7 +248,7 @@ Wave 3 통합에서 세 번 같은 유형이 드러났다(ORCH-new-2·4·5): 저
|
||||
|---|---|---|
|
||||
| P31 | 포트 계약 kit 1 — core·messaging·Redis·멱등성·lock·lease(결정 8): 포트 소유 leaf testFixtures에 추상 `XxxContract`, fake와 실제 어댑터가 함께 | `TEST-F-1` `TEST-F-5` `TEST-FAKE-패턴` `TEST-이행-3` `TEST-FAKE-RedisCommandGateway` `TEST-FAKE-MessagePublisher` `TEST-FAKE-IdempotencyStorePort` `X1-#3a` `X1-#3d` `X1-#6d` `X1-지도-테스트 fake / contract kit` `S6-lead-2` `S7-lead-4` `S2-lead-2` `X1-#6b` `S1-#3b` `P9-new-3` `G-2b` |
|
||||
| P32 | 포트 계약 kit 2 — object storage·fileserver·notification·sample(Mockito 포트 대역 제거) | `TEST-FAKE-ObjectControlStore` `TEST-FAKE-UploadApplicationService` `TEST-FAKE-DeliveryProjectionStorePort` `X1-#3b` `X1-#3c` `TEST-이행-2b` `P14-new-5` `D-4` `C-10 / S2-#11` `P4-new-1` |
|
||||
| P33 | 약한 단언·테스트 형식·빠진 테스트, AGENTS.md 규칙 2(DisplayName 한국어), 계층별 모범 모듈 | `TEST-F-2a` `TEST-F-2d` `TEST-F-2e` `TEST-F-2f` `TEST-F-2g` `TEST-F-3` `TEST-F-6` `TEST-F-7` `TEST-F-8` `TEST-이행-4` `TEST-이행-5` `TEST-DisplayName` `J-4c` `J-9b` `H-3d` `I-2c` `I-3c` `E-3c` `E-4c` `E-6a` `F-1d` `F-5d` `K-5b` `L-4a` `L-7b` `S6-#15` `O-3d` |
|
||||
| P33 | 약한 단언·테스트 형식·빠진 테스트, AGENTS.md 규칙 2(DisplayName 한국어), 계층별 모범 모듈 | `TEST-F-2a` `TEST-F-2d` `TEST-F-2e` `TEST-F-2f` `TEST-F-2g` `TEST-F-3` `TEST-F-6` `TEST-F-7` `TEST-F-8` `TEST-이행-4` `TEST-이행-5` `TEST-DisplayName` `J-4c` `J-9b` `H-3d` `I-2c` `I-3c` `E-3c` `E-4c` `E-6a` `F-1d` `F-5d` `K-5b` `L-4a` `L-7b` `S6-#15` `O-3d` `P20-new-5`(결정 36) |
|
||||
| P34 | 불안정 테스트·test inputs 누락 전수·compose lane 실제 실행 | `ORCH-new-1` `P25-new-1` `ORCH-new-2` `ORCH-new-4` `NEW-1b` `P11-new-3` `P13-new-2` |
|
||||
|
||||
- [ ] P31 · P32 · P33 · P34 병렬(4개) → 통합·Wave 종료 검증 → 커밋 `review-followup Wave 4`
|
||||
@@ -272,3 +272,4 @@ W5 행 전부, `docs/study/*.ko.md`·`docs/*-superpowers-package/`를 현재 코
|
||||
현황표: 859행(812 + 후속 발견 47) 중 완료 370 · 해당 없음 112 · 보류 2 · 남음 375(W1 4 · W2 17 · W3 196 · W4 57 · W5 101). 묶음별 결과 파일은 `docs/reviews/2026-09-25-review-followup-results/P*.md`, 에이전트 지시·스크립트는 `docs/superpowers/plans/2026-09-25-review-followup-tools/`.
|
||||
|
||||
작업 환경 이동(2026-09-28): 노트북 부하로 이후 작업은 desktop(`ssh desktop`, `/home/donghyeon/workspace/chat-gpt-container/codebase/clean-architecture-backend-template`)에서 이어 한다. 재개 프롬프트: `docs/reviews/2026-09-28-review-followup-resume-prompt.md`.
|
||||
| 3 | 완료 (2026-09-29) | `check`(leaf 전체) · `ci verifyDependencyLocks --warning-mode=fail`(714 task) · `mainCheck` · architecture/public path/env keys/config contract · bootstrap·sample integration/system · `integrationCheck`(로컬 통과 — NEW-16 해결) · build-logic test · optional-platforms `ci` · `releaseCheck` · `qualificationBootJar` 통과. 라운드마다 통합 게이트 + 벤더 lane(PG·Kafka·Redis topology·MinIO·Mongo) | 라운드 커밋 `9fdb0af4`…`8bbf1bf0` + `review-followup Wave 3` | 소유자 결정 28–36 추가. 통합 때 드러난 문제: worktree에서 통과·main에서 실패하는 테스트(test inputs 미선언, ORCH-new-2·4·5), 합친 뒤 의미 충돌(P18 × P25, P20 × P30) |
|
||||
|
||||
@@ -12,9 +12,9 @@ nothing happens until service code calls it.
|
||||
|
||||
| Capability | How it is turned on | What it adds | Tests |
|
||||
| --- | --- | --- | --- |
|
||||
| MVC virtual threads | `backend.web.advanced.mvc-virtual-threads.enabled=true` (+ admission limit and budgets) | A different scheduling model for **every** request | `MvcAdvancedConfigurationTest`, `VirtualThreadAdmissionTest` |
|
||||
| NDJSON streaming | `backend.web.advanced.ndjson.enabled=true` | Long-lived connections | `MvcStreamingWiringTest`, `WebStreamCoreTest`, `WebStreamDrainTest`, `WebStreamingSoakIT` |
|
||||
| JSON text sequences (RFC 7464) | `backend.web.advanced.json-sequence.enabled=true` | Long-lived connections | as NDJSON |
|
||||
| MVC virtual threads | `app.web.advanced.mvc-virtual-threads.enabled=true` (+ admission limit and budgets) | A different scheduling model for **every** request | `MvcAdvancedConfigurationTest`, `VirtualThreadAdmissionTest` |
|
||||
| NDJSON streaming | `app.web.advanced.ndjson.enabled=true` | Long-lived connections | `MvcStreamingWiringTest`, `WebStreamCoreTest`, `WebStreamDrainTest`, `WebStreamingSoakIT` |
|
||||
| JSON text sequences (RFC 7464) | `app.web.advanced.json-sequence.enabled=true` | Long-lived connections | as NDJSON |
|
||||
| JSON Merge Patch (RFC 7396) | library — `JsonMergePatchApplier` | Partial documents | `JsonMergePatchApplierTest` |
|
||||
| JSON Patch (RFC 6902) | library — `JsonPatchApplier` | Arbitrary pointers | `JsonPatchApplierTest` |
|
||||
| CBOR / XML codecs | library — `WebCborMapperFactory`, `WebXmlMapperFactory`; the backend jar is the service's choice | A second decoder | `WebCodecMapperTest`, `WebCodecSecurityTest` |
|
||||
|
||||
@@ -80,7 +80,7 @@ equivalents in `application-core/idempotency` — `IdempotencyStorePort`, `Idemp
|
||||
`IdempotencyScopeDigest` and `RequestFingerprint` — with two provider stores behind the port:
|
||||
PostgreSQL (`PostgreSqlIdempotencyStore` in `persistence-jpa`) and Redis
|
||||
(`RedisIdempotencyStoreAdapter` in `cache-redis`), selected by
|
||||
`ca-skeleton.capabilities.idempotency.provider`. That is what the design's Tasks 39 and 40 ask for,
|
||||
`app.capabilities.idempotency.provider`. That is what the design's Tasks 39 and 40 ask for,
|
||||
built in the direction the registry permits.
|
||||
|
||||
Implementing the design's SPI literally would have required
|
||||
@@ -141,7 +141,7 @@ answers in the `Envelope` contract, and a caller's operation that is not theirs
|
||||
(`OPERATION_NOT_FOUND`) as one that does not exist. The controller and the three use cases are
|
||||
assembled by `app-bootstrap` `autoconfigure/operation/DurableOperationConfig`, which turns on only
|
||||
when the operation store and the outbox append port exist (the JPA module with
|
||||
`ca-skeleton.outbox.enabled=true`). Submit and cancel need `operation:submit` / `operation:cancel`
|
||||
`app.outbox.enabled=true`). Submit and cancel need `operation:submit` / `operation:cancel`
|
||||
(`security.yml` grants both to the `operation-submit` role).
|
||||
|
||||
The state machine is enforced three times on purpose: in `DurableOperation`'s constructor, in the
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ is one series per resource.
|
||||
## Cross-origin requests fail only in the browser
|
||||
|
||||
The API answers correctly and the browser refuses the response. CORS is `CorsSettings`
|
||||
(`ca-skeleton.cors.*`) applied by `SecurityConfig`. Startup refuses two settings:
|
||||
(`app.cors.*`) applied by `SecurityConfig`. Startup refuses two settings:
|
||||
|
||||
- `APP_SECURITY_CORS_ENABLED=true` with no origin.
|
||||
- `*` in `APP_SECURITY_CORS_ORIGINS` with `APP_SECURITY_CORS_ALLOW_CREDENTIALS=true` — no browser
|
||||
|
||||
@@ -5,7 +5,7 @@ framing exists, but since the WebFlux twin was removed (2026-09-25) nothing on t
|
||||
writes it.
|
||||
|
||||
The writers ship in `adapter:inbound:web-advanced` (opt-in, switched by
|
||||
`backend.web.advanced.ndjson.enabled` / `backend.web.advanced.json-sequence.enabled`); no default
|
||||
`app.web.advanced.ndjson.enabled` / `app.web.advanced.json-sequence.enabled`); no default
|
||||
composition carries them.
|
||||
|
||||
## Three outcomes, not two
|
||||
|
||||
@@ -20,7 +20,7 @@ The profile ships in `adapter:inbound:web-advanced`, which no default compositio
|
||||
that leaf to the service, then two settings — the profile refuses to be constructed with only one:
|
||||
|
||||
```yaml
|
||||
backend:
|
||||
app:
|
||||
web:
|
||||
advanced:
|
||||
mvc-virtual-threads:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
user default off
|
||||
user ca-skeleton-application on >fixture-application sanitize-payload ~prod:* resetchannels &prod:* -@all +@connection +@pubsub +@transaction +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream -keys -flushdb -flushall -shutdown -debug -sort -sort_ro -smembers -randomkey -migrate -swapdb -select +cluster|slots +cluster|shards +cluster|nodes +cluster|info +cluster|myid
|
||||
user ca-skeleton-application-advanced on >fixture-advanced sanitize-payload ~prod:* resetchannels &prod:* -@all +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream +@pubsub +@transaction +time +evalsha +evalsha_ro +script|load +script|exists +fcall +fcall_ro -keys -flushdb -flushall -shutdown -debug -eval -eval_ro -smembers -sort -sort_ro -randomkey -migrate -swapdb -select +cluster|slots +cluster|shards +cluster|nodes +cluster|info +cluster|myid
|
||||
user ca-skeleton-application on >fixture-application sanitize-payload ~prod:* resetchannels -@all +@connection +@transaction +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream -keys -flushdb -flushall -shutdown -debug -sort -sort_ro -smembers -randomkey -migrate -swapdb -select +cluster|slots +cluster|shards +cluster|nodes +cluster|info +cluster|myid
|
||||
user ca-skeleton-application-advanced on >fixture-advanced sanitize-payload ~prod:* resetchannels -@all +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream +@transaction +time +evalsha +evalsha_ro +script|load +script|exists +fcall +fcall_ro -keys -flushdb -flushall -shutdown -debug -eval -eval_ro -smembers -sort -sort_ro -randomkey -migrate -swapdb -select +cluster|slots +cluster|shards +cluster|nodes +cluster|info +cluster|myid
|
||||
user ca-skeleton-raw-gateway on >fixture-raw sanitize-payload ~prod:* resetchannels -@all +smembers +sort +sort_ro
|
||||
user ca-skeleton-admin-readonly on >fixture-admin ~* resetchannels -@all +info +dbsize +time +lastsave +memory|usage +memory|stats +slowlog|get +slowlog|len +latency|latest +latency|history +client|list +client|info +command|info +command|docs +command|count +command|getkeysandflags +config|get +acl|dryrun +acl|whoami +cluster|info +cluster|slots +cluster|shards +cluster|nodes +object|encoding +object|freq +object|idletime +pubsub|channels +pubsub|numsub +pubsub|shardchannels +xinfo|stream +xinfo|groups +xinfo|consumers +function|list +function|stats +cluster|keyslot +cluster|myid
|
||||
user ca-skeleton-replication on >fixture-replication ~* resetchannels -@all +psync +replconf +ping
|
||||
|
||||
@@ -1 +1 @@
|
||||
user ca-skeleton-application-advanced on >fixture-advanced sanitize-payload ~prod:* resetchannels &prod:* -@all +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream +@pubsub +@transaction +time +evalsha +evalsha_ro +script|load +script|exists +fcall +fcall_ro -keys -flushdb -flushall -shutdown -debug -eval -eval_ro -smembers -sort -sort_ro -randomkey -migrate -swapdb -select
|
||||
user ca-skeleton-application-advanced on >fixture-advanced sanitize-payload ~prod:* resetchannels -@all +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream +@transaction +time +evalsha +evalsha_ro +script|load +script|exists +fcall +fcall_ro -keys -flushdb -flushall -shutdown -debug -eval -eval_ro -smembers -sort -sort_ro -randomkey -migrate -swapdb -select
|
||||
|
||||
@@ -1 +1 @@
|
||||
user ca-skeleton-application on >fixture-application sanitize-payload ~prod:* resetchannels &prod:* -@all +@connection +@pubsub +@transaction +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream -keys -flushdb -flushall -shutdown -debug -sort -sort_ro -smembers -randomkey -migrate -swapdb -select
|
||||
user ca-skeleton-application on >fixture-application sanitize-payload ~prod:* resetchannels -@all +@connection +@transaction +@read +@write +@string +@hash +@list +@set +@sortedset +@bitmap +@hyperloglog +@geo +@stream -keys -flushdb -flushall -shutdown -debug -sort -sort_ro -smembers -randomkey -migrate -swapdb -select
|
||||
|
||||
@@ -72,8 +72,8 @@ def configuration_properties() -> list[str]:
|
||||
"""Every leaf property under `app.httpclient`, nested and dynamic blocks included.
|
||||
|
||||
Read from the environment-field manifest rather than from the record source. The manifest is
|
||||
derived from `HttpClientPlatformSettings` by `HttpClientEnvironmentKeys` and held to it in both
|
||||
directions by `HttpClientPlatformEnvManifestTest`, so it cannot drift from the code; parsing the
|
||||
derived from `HttpClientPlatformSettings` and held to it in both directions by
|
||||
`HttpClientPlatformEnvManifestTest`, so it cannot drift from the code; parsing the
|
||||
record here a second time, with a regex, could only agree with it by luck. The previous version
|
||||
of this function did exactly that and saw eighteen top-level names, which is why a nested pool,
|
||||
timeout or TLS setting could be added and documented nowhere.
|
||||
|
||||
+3
-3
@@ -270,7 +270,7 @@ Kafka 없이 기동합니다. 나머지 기능은 `app-bootstrap/build.gradle`
|
||||
| 외부 HTTP 호출 | `runtimeOnly project(':adapter:outbound:httpclient')` | client 하나 이상: `APP_HTTPCLIENT_CLIENTS_0_*` (`docs/httpclient/env-fields.yaml`) | `APP_HTTPCLIENT_ENABLED` |
|
||||
| 객체 저장소 (S3/로컬) | `runtimeOnly project(':adapter:outbound:objectstorage')` | 전용 env 없음. `app.object-storage.*`의 provider·destination을 `application-*.yml`에 적음 | `app.object-storage.enabled` |
|
||||
| WebSocket (STOMP push) | `runtimeOnly project(':adapter:inbound:websocket')` | 없음(기본값으로 동작). origin은 `APP_WEBSOCKET_ALLOWED_ORIGINS` | `APP_WEBSOCKET_ENABLED` |
|
||||
| gRPC 서버 | `runtimeOnly project(':adapter:inbound:grpc')` | `CA_SKELETON_GRPC_SERVER_ALLOW_INSECURE_LOCAL=true` (지금 받는 listener가 loopback plaintext뿐) | `ca-skeleton.grpc.server.enabled` |
|
||||
| gRPC 서버 | `runtimeOnly project(':adapter:inbound:grpc')` | `APP_GRPC_SERVER_ALLOW_INSECURE_LOCAL=true` (지금 받는 listener가 loopback plaintext뿐) | `app.grpc.server.enabled` |
|
||||
| 파일 서버 (JPA를 함께 가져옴) | `runtimeOnly project(':composition:fileserver-platform')` | `APP_FILESERVER_PLATFORM_STORAGE_ROOT`, `APP_FILESERVER_PLATFORM_OBSERVABILITY_FINGERPRINT_KEY`, 그리고 `FileAccessPolicyPort` bean 또는 `APP_FILESERVER_PLATFORM_SECURITY_ACCESS_POLICY=role-based` | `APP_FILESERVER_PLATFORM_ENABLED` |
|
||||
| 알림 (SMTP/SES, JPA 줄도 필요) | `runtimeOnly project(':composition:notification-platform')` | 키 8종과 각 `_ID`(`APP_NOTIFICATION_PLATFORM_*_KEY`, `*_KEY_ID`), 쓰는 provider 설정(`APP_NOTIFICATION_PLATFORM_SMTP_*` 또는 `_SES_*`) | `APP_NOTIFICATION_PLATFORM_ENABLED` |
|
||||
|
||||
@@ -338,7 +338,7 @@ Kafka·Redis는 위 "기능 추가 = 한 줄 + env" 표의 한 줄로 고릅니
|
||||
현재 canonical activation은 다음 두 설정 트리만 사용합니다.
|
||||
|
||||
```yaml
|
||||
ca-skeleton:
|
||||
app:
|
||||
capabilities:
|
||||
http-client:
|
||||
expected-state: DISABLED
|
||||
@@ -539,7 +539,7 @@ docker compose -f docker-compose.yml -f docker-compose.local.yml up -d --wait db
|
||||
컨테이너로 띄우는 `scripts/bootstrap-local.sh` 경로는 이 호스트 포트를 쓰지 않습니다. compose 가 app
|
||||
컨테이너의 `APP_DATASOURCE_URL` 을 내부 네트워크 주소 `jdbc:postgresql://db:5432/...` 로 덮어씁니다.
|
||||
|
||||
`ca-skeleton.persistence.vendor`(`postgresql` | `h2`)가 어느 vendor 구성을 조립할지 고르는 단일
|
||||
`app.persistence.vendor`(`postgresql` | `h2`)가 어느 vendor 구성을 조립할지 고르는 단일
|
||||
스위치입니다. 값이 둘 중 하나가 아니면 기동이 실패하고, prod 에서 `h2` 이거나 datasource URL 이
|
||||
`jdbc:h2:` 이면 `PersistenceVendorProdSafetyValidator` 가 기동을 거부합니다(env 로 덮어써도 동일).
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ required-class 검사가 이 테스트가 조용히 사라지는 것을 막는
|
||||
- feature-agnostic: `classpath:graphql/**` 스키마와 모든 `@Controller` `@QueryMapping`/
|
||||
`@MutationMapping` 을 generic 하게 합성한다. **WorkLog 등 구체 기능을 이름으로 알지 않는다.**
|
||||
- 있으면 켜진다: 서비스가 `app-bootstrap/build.gradle`에 `runtimeOnly project(':adapter:inbound:graphql')`
|
||||
한 줄로 고른다(기본 조립에는 없다). `APP_GRAPHQL_ENABLED=false`(`backend.graphql.enabled`)만 끄며,
|
||||
한 줄로 고른다(기본 조립에는 없다). `APP_GRAPHQL_ENABLED=false`(`app.graphql.enabled`)만 끄며,
|
||||
그때 `GraphQlActivationEnvironmentPostProcessor`가 Spring GraphQL 자동 설정도 exclude 한다.
|
||||
실제 활성화 시 composition root 는 인증/인가·CORS 정책과 GraphiQL/introspection 운영 설정을 함께
|
||||
명시해야 한다.
|
||||
|
||||
@@ -102,18 +102,18 @@ gRPC 와 달리 spring-graphql / graphql-java 는 Spring Boot BOM 이 관리한
|
||||
버전 명시도, 모듈 스코프 platform import 도 필요 없다 — `build.gradle` 은 BOM-managed 좌표만
|
||||
선언하고, per-module `gradle.lockfile` 이 strict locking 으로 정확한 버전을 고정한다.
|
||||
|
||||
## 설정 — 프레임워크 `spring.graphql.*` + 플랫폼 `backend.graphql.*`
|
||||
## 설정 — 프레임워크 `spring.graphql.*` + 플랫폼 `app.graphql.*`
|
||||
|
||||
전송 계층 설정(path, graphiql, introspection, schema location)은 프레임워크 `spring.graphql.*`
|
||||
가 소유한다. composition-root `application.yml` 에서 설정하며 모듈별 `yml` 은 없다.
|
||||
|
||||
플랫폼 정책은 `spring.graphql.*` 로 표현할 수 없다 — cost/page 한계, preparsed
|
||||
캐시 경계, 관측 label 로 허용할 operation 이름은 전부 이 leaf 의 결정이다. 그래서
|
||||
`GraphQlPlatformProperties` 가 **`backend.graphql`** prefix 로 `@ConfigurationProperties` 를
|
||||
`GraphQlPlatformProperties` 가 **`app.graphql`** prefix 로 `@ConfigurationProperties` 를
|
||||
바인딩한다(`spring.graphql.platform.*` 이 아니다 — 그 prefix 는 존재한 적이 없다).
|
||||
|
||||
```yaml
|
||||
backend:
|
||||
app:
|
||||
graphql:
|
||||
deployment-mode: PRODUCTION_INTERNAL
|
||||
validation-policy-version: v1 # preparsed 캐시 키의 일부
|
||||
|
||||
@@ -67,8 +67,8 @@ dependencies {
|
||||
|
||||
// GraphQlPlatformProperties is a @ConfigurationProperties binding, so this leaf owes the
|
||||
// repository-wide processor parity gate (`verifyConfigurationPropertiesProcessor`) a metadata
|
||||
// declaration — an adopter configuring backend.graphql.* gets IDE completion and validation
|
||||
// from the generated metadata rather than from prose. (The prefix is `backend.graphql`; this
|
||||
// declaration — an adopter configuring app.graphql.* gets IDE completion and validation
|
||||
// from the generated metadata rather than from prose. (The prefix is `app.graphql`; this
|
||||
// comment used to say `spring.graphql.platform.*`, which never existed.)
|
||||
|
||||
// A raw request body can only be capped before something decodes it, and on a servlet stack the
|
||||
|
||||
+43
-7
@@ -16,11 +16,13 @@ import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.env.YamlPropertySourceLoader;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.core.env.EnumerablePropertySource;
|
||||
import org.springframework.core.env.MapPropertySource;
|
||||
import org.springframework.core.env.PropertySource;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
/**
|
||||
* Everything about {@code backend.graphql} that has to be settled before a bean exists.
|
||||
* Everything about {@code app.graphql} that has to be settled before a bean exists.
|
||||
*
|
||||
* <p>An environment post-processor rather than a bean: these are the failures that have to arrive
|
||||
* first, naming what an operator set, instead of surfacing as a bean somewhere downstream that
|
||||
@@ -28,8 +30,8 @@ import org.springframework.core.io.ClassPathResource;
|
||||
*
|
||||
* <ol>
|
||||
* <li><b>Contribute the module's settings.</b> {@code config/graphql.yml} maps the {@code
|
||||
* APP_GRAPHQL_*} variables onto {@code backend.graphql.*}, which an environment variable
|
||||
* cannot reach directly. Added last, so a deployment's own value always wins, and loaded only
|
||||
* APP_GRAPHQL_*} variables onto {@code app.graphql.*}, which an environment variable cannot
|
||||
* reach directly. Added last, so a deployment's own value always wins, and loaded only
|
||||
* because the module is on the classpath — removing the module removes its settings.
|
||||
* <li><b>Refuse a retired safety key.</b> See {@link GraphQlRetiredSafetyAxis}.
|
||||
* <li><b>Give the framework's console flags the platform's defaults.</b> Spring Boot answers
|
||||
@@ -37,7 +39,7 @@ import org.springframework.core.io.ClassPathResource;
|
||||
* the lowest precedence, so an operator who sets either key still wins and still gets
|
||||
* validated.
|
||||
* <li><b>Make an explicit off complete.</b> The module is on when present. {@code
|
||||
* backend.graphql.enabled=false} turns off {@link GraphQlRootAutoConfiguration}, but Spring
|
||||
* app.graphql.enabled=false} turns off {@link GraphQlRootAutoConfiguration}, but Spring
|
||||
* GraphQL's own auto-configurations would still publish {@code /graphql} from the schema on
|
||||
* the classpath. So an explicit off appends them — read from Boot's own registration file,
|
||||
* not listed here — to {@code spring.autoconfigure.exclude}, after whatever the deployment
|
||||
@@ -52,7 +54,9 @@ public class GraphQlActivationEnvironmentPostProcessor
|
||||
|
||||
static final String RESOURCE = "config/graphql.yml";
|
||||
|
||||
private static final String SWITCH = "backend.graphql.enabled";
|
||||
private static final String SWITCH = "app.graphql.enabled";
|
||||
|
||||
private static final String DEPLOYMENT_MODE = "app.graphql.deployment-mode";
|
||||
|
||||
private static final String EXCLUDE = "spring.autoconfigure.exclude";
|
||||
|
||||
@@ -63,8 +67,8 @@ public class GraphQlActivationEnvironmentPostProcessor
|
||||
private static final Map<String, String> FRAMEWORK_DEFAULTS =
|
||||
Map.of(
|
||||
"spring.graphql.schema.introspection.enabled",
|
||||
"backend.graphql.console.introspection-enabled",
|
||||
"spring.graphql.graphiql.enabled", "backend.graphql.console.graphiql-enabled");
|
||||
"app.graphql.console.introspection-enabled",
|
||||
"spring.graphql.graphiql.enabled", "app.graphql.console.graphiql-enabled");
|
||||
|
||||
private static final String SOURCE_NAME = "graphQlPlatformConsoleDefaults";
|
||||
|
||||
@@ -76,6 +80,7 @@ public class GraphQlActivationEnvironmentPostProcessor
|
||||
new YamlPropertySourceLoader()
|
||||
.load("graphql-defaults (" + RESOURCE + ")", new ClassPathResource(RESOURCE, classLoader))
|
||||
.forEach(environment.getPropertySources()::addLast);
|
||||
withoutAnUnsetDeploymentMode(environment);
|
||||
} catch (IOException failure) {
|
||||
throw new UncheckedIOException("failed to read " + RESOURCE, failure);
|
||||
}
|
||||
@@ -100,6 +105,37 @@ public class GraphQlActivationEnvironmentPostProcessor
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Drops the shipped {@code deployment-mode} entry when it resolves to nothing.
|
||||
*
|
||||
* <p>The mode has no default on purpose, and {@link GraphQlDeploymentMode} refuses a missing one
|
||||
* by name. The shipped file maps it as {@code ${APP_GRAPHQL_DEPLOYMENT_MODE:}}, though, and under
|
||||
* strict binding ({@code ignoreUnknownFields = false}) a present-but-empty key is reported as
|
||||
* "left unbound" before the named refusal can run. An unset mode is therefore made absent, not
|
||||
* empty; a mode set anywhere — environment, {@code .env}, system property, file — still binds.
|
||||
*/
|
||||
private static void withoutAnUnsetDeploymentMode(ConfigurableEnvironment environment) {
|
||||
String mode = environment.getProperty(DEPLOYMENT_MODE);
|
||||
if (mode != null && !mode.isBlank()) {
|
||||
return;
|
||||
}
|
||||
for (PropertySource<?> source : environment.getPropertySources().stream().toList()) {
|
||||
if (source.getName().startsWith("graphql-defaults")
|
||||
&& source instanceof EnumerablePropertySource<?> enumerable
|
||||
&& enumerable.containsProperty(DEPLOYMENT_MODE)) {
|
||||
Map<String, Object> kept = new LinkedHashMap<>();
|
||||
for (String name : enumerable.getPropertyNames()) {
|
||||
if (!DEPLOYMENT_MODE.equals(name)) {
|
||||
kept.put(name, enumerable.getProperty(name));
|
||||
}
|
||||
}
|
||||
environment
|
||||
.getPropertySources()
|
||||
.replace(source.getName(), new MapPropertySource(source.getName(), kept));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void excludeTheFrameworkAutoConfigurations(
|
||||
ConfigurableEnvironment environment, ClassLoader classLoader) {
|
||||
List<String> excluded =
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public enum GraphQlDeploymentMode {
|
||||
|
||||
/** What an operator has to set, and where, when the mode is missing. */
|
||||
public static final String REQUIRED_MESSAGE =
|
||||
"backend.graphql.deployment-mode is required while backend.graphql.enabled=true; set "
|
||||
"app.graphql.deployment-mode is required while app.graphql.enabled=true; set "
|
||||
+ "APP_GRAPHQL_DEPLOYMENT_MODE to one of LOCAL, DEV, PRODUCTION_INTERNAL, "
|
||||
+ "PRODUCTION_PUBLIC";
|
||||
|
||||
|
||||
+3
-3
@@ -36,8 +36,8 @@ class GraphQlExecutionChainConfiguration {
|
||||
* application knowledge: a deny-by-default skeleton policy would answer nothing and adopters
|
||||
* would replace it with an allow-all one, while an allow-by-default policy shipped into
|
||||
* production would be an unauthorized endpoint. So a development mode gets the permissive default
|
||||
* that lets the schema be explored, and a production {@code backend.graphql.deployment-mode}
|
||||
* refuses to start without an explicit policy.
|
||||
* that lets the schema be explored, and a production {@code app.graphql.deployment-mode} refuses
|
||||
* to start without an explicit policy.
|
||||
*/
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@@ -49,7 +49,7 @@ class GraphQlExecutionChainConfiguration {
|
||||
if (properties.production()) {
|
||||
throw new GraphQlPlatformConfigurationException(
|
||||
List.of(
|
||||
"backend.graphql.deployment-mode="
|
||||
"app.graphql.deployment-mode="
|
||||
+ properties.deploymentMode()
|
||||
+ " requires an explicit GraphQlAuthorizationPolicy bean; the platform has no "
|
||||
+ "application coordinates to authorize on its own"));
|
||||
|
||||
+27
-10
@@ -23,14 +23,20 @@ import org.springframework.boot.context.properties.bind.DefaultValue;
|
||||
* @param deploymentMode the single safety posture; required, see {@link GraphQlDeploymentMode}
|
||||
* @param console query console and introspection exposure
|
||||
* @param limits page and cost ceilings
|
||||
* @param validationPolicyVersion part of the preparsed cache key
|
||||
* @param observedOperationNames operation names allowed as an observation label
|
||||
* @param enabled the capability switch. Conditions read the property; it is a component so that the
|
||||
* tree binds with unknown keys refused ({@code ignoreUnknownFields = false}) — a misspelt
|
||||
* {@code app.graphql.*} key fails startup instead of leaving a default limit in force
|
||||
*/
|
||||
@ConfigurationProperties("backend.graphql")
|
||||
@ConfigurationProperties(prefix = "app.graphql", ignoreUnknownFields = false)
|
||||
public record GraphQlPlatformSettings(
|
||||
GraphQlDeploymentMode deploymentMode,
|
||||
@DefaultValue Console console,
|
||||
@DefaultValue Limits limits,
|
||||
@DefaultValue("v1") String validationPolicyVersion,
|
||||
@DefaultValue Set<String> observedOperationNames) {
|
||||
@DefaultValue Set<String> observedOperationNames,
|
||||
@DefaultValue("true") boolean enabled) {
|
||||
|
||||
public GraphQlPlatformSettings {
|
||||
// Belt and braces for programmatic construction: the binder honours @DefaultValue, but this
|
||||
@@ -109,34 +115,45 @@ public record GraphQlPlatformSettings(
|
||||
Console.disabled(),
|
||||
Limits.defaults(),
|
||||
"v1",
|
||||
Set.of());
|
||||
Set.of(),
|
||||
true);
|
||||
}
|
||||
|
||||
/** Returns a copy running under a different deployment mode. */
|
||||
public GraphQlPlatformSettings withDeploymentMode(GraphQlDeploymentMode mode) {
|
||||
return new GraphQlPlatformSettings(
|
||||
mode, console, limits, validationPolicyVersion, observedOperationNames);
|
||||
mode, console, limits, validationPolicyVersion, observedOperationNames, enabled);
|
||||
}
|
||||
|
||||
/** Returns a copy with GraphiQL enabled or disabled. */
|
||||
public GraphQlPlatformSettings withGraphiqlEnabled(boolean enabled) {
|
||||
return withConsole(new Console(enabled, console.introspectionEnabled()));
|
||||
public GraphQlPlatformSettings withGraphiqlEnabled(boolean graphiql) {
|
||||
return withConsole(new Console(graphiql, console.introspectionEnabled()));
|
||||
}
|
||||
|
||||
/** Returns a copy with introspection enabled or disabled. */
|
||||
public GraphQlPlatformSettings withIntrospectionEnabled(boolean enabled) {
|
||||
return withConsole(new Console(console.graphiqlEnabled(), enabled));
|
||||
public GraphQlPlatformSettings withIntrospectionEnabled(boolean introspection) {
|
||||
return withConsole(new Console(console.graphiqlEnabled(), introspection));
|
||||
}
|
||||
|
||||
/** Returns a copy with a different console policy. */
|
||||
public GraphQlPlatformSettings withConsole(Console replacement) {
|
||||
return new GraphQlPlatformSettings(
|
||||
deploymentMode, replacement, limits, validationPolicyVersion, observedOperationNames);
|
||||
deploymentMode,
|
||||
replacement,
|
||||
limits,
|
||||
validationPolicyVersion,
|
||||
observedOperationNames,
|
||||
enabled);
|
||||
}
|
||||
|
||||
/** Returns a copy with different limits. */
|
||||
public GraphQlPlatformSettings withLimits(Limits replacement) {
|
||||
return new GraphQlPlatformSettings(
|
||||
deploymentMode, console, replacement, validationPolicyVersion, observedOperationNames);
|
||||
deploymentMode,
|
||||
console,
|
||||
replacement,
|
||||
validationPolicyVersion,
|
||||
observedOperationNames,
|
||||
enabled);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -74,7 +74,7 @@ public final class GraphQlPlatformStartupValidator {
|
||||
}
|
||||
throw new GraphQlPlatformConfigurationException(
|
||||
List.of(
|
||||
"backend.graphql.deployment-mode="
|
||||
"app.graphql.deployment-mode="
|
||||
+ mode
|
||||
+ " is not permitted in the "
|
||||
+ runtime.profileName()
|
||||
@@ -121,7 +121,7 @@ public final class GraphQlPlatformStartupValidator {
|
||||
problems.add(
|
||||
"client policy maxPageSize ("
|
||||
+ runtime.clientPolicy().maxPageSize()
|
||||
+ ") exceeds backend.graphql.limits.maximum-page-size ("
|
||||
+ ") exceeds app.graphql.limits.maximum-page-size ("
|
||||
+ runtime.properties().limits().maximumPageSize()
|
||||
+ ")");
|
||||
}
|
||||
@@ -130,14 +130,14 @@ public final class GraphQlPlatformStartupValidator {
|
||||
problems.add(
|
||||
"client policy maxComplexity ("
|
||||
+ runtime.clientPolicy().maxComplexity()
|
||||
+ ") exceeds backend.graphql.limits.maximum-complexity ("
|
||||
+ ") exceeds app.graphql.limits.maximum-complexity ("
|
||||
+ runtime.properties().limits().maximumComplexity()
|
||||
+ ")");
|
||||
}
|
||||
if (runtime.clientPolicy().introspectionAllowed()
|
||||
&& !runtime.properties().console().introspectionEnabled()) {
|
||||
problems.add(
|
||||
"client policy allows introspection while backend.graphql.console.introspection-enabled "
|
||||
"client policy allows introspection while app.graphql.console.introspection-enabled "
|
||||
+ "is false; one of the two is not what the operator configured");
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public final class GraphQlPlatformStartupValidator {
|
||||
&& runtime.frameworkIntrospectionEnabled()
|
||||
!= runtime.properties().console().introspectionEnabled()) {
|
||||
problems.add(
|
||||
"backend.graphql.console.introspection-enabled ("
|
||||
"app.graphql.console.introspection-enabled ("
|
||||
+ runtime.properties().console().introspectionEnabled()
|
||||
+ ") contradicts spring.graphql.schema.introspection.enabled ("
|
||||
+ runtime.frameworkIntrospectionEnabled()
|
||||
@@ -157,7 +157,7 @@ public final class GraphQlPlatformStartupValidator {
|
||||
if (runtime.frameworkGraphiqlEnabled() != null
|
||||
&& runtime.frameworkGraphiqlEnabled() != runtime.properties().console().graphiqlEnabled()) {
|
||||
problems.add(
|
||||
"backend.graphql.console.graphiql-enabled ("
|
||||
"app.graphql.console.graphiql-enabled ("
|
||||
+ runtime.properties().console().graphiqlEnabled()
|
||||
+ ") contradicts spring.graphql.graphiql.enabled ("
|
||||
+ runtime.frameworkGraphiqlEnabled()
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ class GraphQlRequestContextConfiguration {
|
||||
/**
|
||||
* The limits applied to a request when the adopter has not registered a client policy.
|
||||
*
|
||||
* <p>Page size, complexity and introspection follow {@code backend.graphql.*}; the rest are the
|
||||
* <p>Page size, complexity and introspection follow {@code app.graphql.*}; the rest are the
|
||||
* calibration starting points from the design. An adopter replaces this bean rather than editing
|
||||
* a table of constants.
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ class GraphQlRequestContextConfiguration {
|
||||
if (properties.production()) {
|
||||
throw new GraphQlPlatformConfigurationException(
|
||||
List.of(
|
||||
"backend.graphql.deployment-mode="
|
||||
"app.graphql.deployment-mode="
|
||||
+ properties.deploymentMode()
|
||||
+ " requires an explicit GraphQlPrincipalResolver bean; production refuses "
|
||||
+ "anonymous callers, so the anonymous default would reject every request"));
|
||||
|
||||
+9
-9
@@ -8,11 +8,11 @@ import org.springframework.core.env.Environment;
|
||||
/**
|
||||
* The two retired safety keys, refused rather than ignored (GQL-INT-002).
|
||||
*
|
||||
* <p>{@code backend.graphql.production} and {@code backend.graphql.environment} are no longer
|
||||
* record components, and Spring's binder ignores unknown keys by default. Left alone, an operator
|
||||
* who sets the key they have always set gets a clean startup and a silently different safety
|
||||
* posture — which is a worse outcome than the split-brain being fixed, because the old
|
||||
* configuration at least did something.
|
||||
* <p>{@code app.graphql.production} and {@code app.graphql.environment} are no longer record
|
||||
* components, and Spring's binder ignores unknown keys by default. Left alone, an operator who sets
|
||||
* the key they have always set gets a clean startup and a silently different safety posture — which
|
||||
* is a worse outcome than the split-brain being fixed, because the old configuration at least did
|
||||
* something.
|
||||
*
|
||||
* <p>Checked whether or not the replacement is also set. A deployment carrying both is exactly the
|
||||
* state that produced the defect: two keys that can disagree about one question, with the winner
|
||||
@@ -26,10 +26,10 @@ public final class GraphQlRetiredSafetyAxis {
|
||||
|
||||
private static final Map<String, String> RETIRED_KEYS =
|
||||
Map.of(
|
||||
"backend.graphql.production",
|
||||
"app.graphql.production",
|
||||
"it drove anonymous principal handling and allow-by-default authorization while the "
|
||||
+ "environment enum drove introspection, so the two could disagree",
|
||||
"backend.graphql.environment",
|
||||
"app.graphql.environment",
|
||||
"it drove introspection and GraphiQL while the production boolean drove authorization, "
|
||||
+ "so the two could disagree");
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class GraphQlRetiredSafetyAxis {
|
||||
* @return the problems; empty when the capability switch is off or no retired key is present
|
||||
*/
|
||||
public static List<String> problems(Environment environment) {
|
||||
if (!"true".equalsIgnoreCase(environment.getProperty("backend.graphql.enabled", "true"))) {
|
||||
if (!"true".equalsIgnoreCase(environment.getProperty("app.graphql.enabled", "true"))) {
|
||||
return List.of();
|
||||
}
|
||||
List<String> problems = new ArrayList<>();
|
||||
@@ -53,7 +53,7 @@ public final class GraphQlRetiredSafetyAxis {
|
||||
+ " is retired ("
|
||||
+ RETIRED_KEYS.get(key)
|
||||
+ "). Remove it and set APP_GRAPHQL_DEPLOYMENT_MODE "
|
||||
+ "(backend.graphql.deployment-mode) to one of LOCAL, DEV, PRODUCTION_INTERNAL, "
|
||||
+ "(app.graphql.deployment-mode) to one of LOCAL, DEV, PRODUCTION_INTERNAL, "
|
||||
+ "PRODUCTION_PUBLIC.");
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -9,17 +9,17 @@ import org.springframework.context.annotation.Import;
|
||||
* The one place that decides whether this application exposes a GraphQL endpoint.
|
||||
*
|
||||
* <p>On when present: an application that selected this module wants GraphQL, so a missing {@code
|
||||
* backend.graphql.enabled} means on. Absent from the build is the ordinary off state.
|
||||
* app.graphql.enabled} means on. Absent from the build is the ordinary off state.
|
||||
*
|
||||
* <p>An inbound adapter's off contract is not only about beans. Spring GraphQL publishes {@code
|
||||
* /graphql} from its own auto-configuration, with no project bean involved, so an explicit {@code
|
||||
* backend.graphql.enabled=false} also excludes those auto-configurations — see {@link
|
||||
* app.graphql.enabled=false} also excludes those auto-configurations — see {@link
|
||||
* GraphQlActivationEnvironmentPostProcessor}. A bean-inventory assertion cannot see a route the
|
||||
* framework published.
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(
|
||||
prefix = "backend.graphql",
|
||||
prefix = "app.graphql",
|
||||
name = "enabled",
|
||||
havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#
|
||||
# 이 모듈이 직접 읽는다(GraphQlActivationEnvironmentPostProcessor). 우선순위는 가장 낮아서
|
||||
# application*.yml, 환경 변수, 시스템 속성이 항상 이긴다. 환경 변수는 APP_GRAPHQL_* 이고 설정 트리는
|
||||
# backend.graphql.* 라서, 이 파일이 둘을 잇는다. 이 모듈을 빌드에서 빼면 이 파일도 함께 빠진다.
|
||||
backend:
|
||||
# app.graphql.* 라서, 이 파일이 둘을 잇는다. 이 모듈을 빌드에서 빼면 이 파일도 함께 빠진다.
|
||||
app:
|
||||
graphql:
|
||||
# true | false — 모듈이 있으면 켜진다. false 로 끄면 Spring GraphQL 자신의 자동 설정도 빠져서
|
||||
# /graphql 이 열리지 않는다.
|
||||
@@ -29,4 +29,4 @@ backend:
|
||||
info:
|
||||
capabilities:
|
||||
graphql:
|
||||
enabled: ${backend.graphql.enabled:true}
|
||||
enabled: ${app.graphql.enabled:true}
|
||||
|
||||
+2
-2
@@ -51,10 +51,10 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
// The transport is off unless a deployment asks for it, so a boundary qualification has to
|
||||
// ask too. Before the master switch existed this test passed by accident: the endpoint was
|
||||
// published from the classpath.
|
||||
"backend.graphql.enabled=true",
|
||||
"app.graphql.enabled=true",
|
||||
// Required alongside the switch: the safety posture has no default, because the defaults it
|
||||
// used to have were a production enum and a non-production boolean that disagreed.
|
||||
"backend.graphql.deployment-mode=LOCAL",
|
||||
"app.graphql.deployment-mode=LOCAL",
|
||||
"spring.graphql.graphiql.enabled=false",
|
||||
"spring.graphql.schema.introspection.enabled=false",
|
||||
"spring.graphql.schema.locations=classpath:graphql-qualification-no-discovery/",
|
||||
|
||||
+5
-5
@@ -62,7 +62,7 @@ import org.springframework.stereotype.Controller;
|
||||
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
|
||||
properties = {
|
||||
// The transport is off unless a deployment asks for it, so an execution-path test has to ask.
|
||||
"backend.graphql.enabled=true",
|
||||
"app.graphql.enabled=true",
|
||||
"spring.graphql.graphiql.enabled=false",
|
||||
// The schema permits introspection at the deployment level, and the two flags agree so the
|
||||
// contradiction check stays quiet. What refuses the query is the anonymous profile's client
|
||||
@@ -73,12 +73,12 @@ import org.springframework.stereotype.Controller;
|
||||
"spring.graphql.schema.additional-files="
|
||||
+ "classpath:graphql/skeleton.graphqls,"
|
||||
+ "classpath:graphql-platform/platform.graphqls",
|
||||
"backend.graphql.deployment-mode=LOCAL",
|
||||
"backend.graphql.console.introspection-enabled=true",
|
||||
"backend.graphql.limits.maximum-page-size=100",
|
||||
"app.graphql.deployment-mode=LOCAL",
|
||||
"app.graphql.console.introspection-enabled=true",
|
||||
"app.graphql.limits.maximum-page-size=100",
|
||||
// Small enough that one nested selection exceeds it, large enough that the allowed queries do
|
||||
// not. The unregistered-coordinate default weight is what both sides are measured against.
|
||||
"backend.graphql.limits.maximum-complexity=100"
|
||||
"app.graphql.limits.maximum-complexity=100"
|
||||
})
|
||||
@AutoConfigureTestRestTemplate
|
||||
class GraphQlPlatformExecutionPathTest {
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@ class GraphQlBatchLoaderWiringTest {
|
||||
private final ApplicationContextRunner runner =
|
||||
new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(GraphQlRootAutoConfiguration.class))
|
||||
.withPropertyValues(
|
||||
"backend.graphql.enabled=true", "backend.graphql.deployment-mode=LOCAL");
|
||||
.withPropertyValues("app.graphql.enabled=true", "app.graphql.deployment-mode=LOCAL");
|
||||
|
||||
@Test
|
||||
@DisplayName("the platform supplies the whole batch chain when GraphQL is on")
|
||||
|
||||
+14
@@ -1,8 +1,10 @@
|
||||
package dev.caskeleton.adapter.inbound.graphql.autoconfigure;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.catchThrowable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
@@ -49,6 +51,18 @@ class GraphQlCapabilityActivationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("mode를 정하지 않으면 strict 바인딩 오류가 아니라 이름 붙은 거절로 기동이 실패한다")
|
||||
void anUnsetModeIsRefusedByNameRatherThanAsAnUnboundKey() {
|
||||
// when
|
||||
Throwable thrown = catchThrowable(() -> start().close());
|
||||
|
||||
// then
|
||||
assertThat(thrown)
|
||||
.hasStackTraceContaining("app.graphql.deployment-mode is required")
|
||||
.hasStackTraceContaining("APP_GRAPHQL_DEPLOYMENT_MODE");
|
||||
}
|
||||
|
||||
private static ConfigurableApplicationContext start(String... arguments) {
|
||||
return new SpringApplicationBuilder(Application.class)
|
||||
.web(WebApplicationType.NONE)
|
||||
|
||||
+37
-21
@@ -26,9 +26,9 @@ import org.springframework.core.env.StandardEnvironment;
|
||||
/**
|
||||
* One deployment mode decides every production-safety behaviour (GQL-INT-002).
|
||||
*
|
||||
* <p>There used to be two axes. {@code backend.graphql.production} defaulted to {@code false} and
|
||||
* {@code backend.graphql.environment} defaulted to {@code PRODUCTION_PUBLIC}, in the same record,
|
||||
* so the shipped default was a deployment that called itself internet-facing production while every
|
||||
* <p>There used to be two axes. {@code app.graphql.production} defaulted to {@code false} and
|
||||
* {@code app.graphql.environment} defaulted to {@code PRODUCTION_PUBLIC}, in the same record, so
|
||||
* the shipped default was a deployment that called itself internet-facing production while every
|
||||
* protection that read the boolean behaved as if it were not. That is not a display inconsistency:
|
||||
* anonymous principal handling, allow-by-default authorization, and part of request protection read
|
||||
* only the boolean, so the enum could say production while the endpoint answered as development.
|
||||
@@ -42,7 +42,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
private final ApplicationContextRunner runner =
|
||||
new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(GraphQlRootAutoConfiguration.class))
|
||||
.withPropertyValues("backend.graphql.enabled=true");
|
||||
.withPropertyValues("app.graphql.enabled=true");
|
||||
|
||||
@ParameterizedTest
|
||||
@EnumSource(GraphQlDeploymentMode.class)
|
||||
@@ -81,15 +81,32 @@ class GraphQlDeploymentModeContractTest {
|
||||
|
||||
assertThat(failure)
|
||||
.isInstanceOf(GraphQlPlatformConfigurationException.class)
|
||||
.hasMessageContaining("backend.graphql.deployment-mode=LOCAL")
|
||||
.hasMessageContaining("app.graphql.deployment-mode=LOCAL")
|
||||
.hasMessageContaining("[PRODUCTION_INTERNAL, PRODUCTION_PUBLIC]");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("app.graphql 아래 오타 키는 기동을 실패시킨다")
|
||||
void aMisspelledGraphQlKeyFailsStartup() {
|
||||
// when
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"app.graphql.deployment-mode=LOCAL",
|
||||
"spring.profiles.active=local",
|
||||
"app.graphql.limits.maximum-page-sise=5")
|
||||
.run(
|
||||
context -> {
|
||||
// then
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context.getStartupFailure()).hasStackTraceContaining("maximum-page-sise");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("the context refuses a mode that does not match its runtime profile")
|
||||
void theContextRefusesAModeForAnotherRuntime() {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=DEV", "spring.profiles.active=local")
|
||||
.withPropertyValues("app.graphql.deployment-mode=DEV", "spring.profiles.active=local")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
@@ -107,7 +124,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
|
||||
assertThat(new GraphQlPlatformStartupValidator().problems(settings))
|
||||
.as("a message that does not name the property sends an operator reading")
|
||||
.anySatisfy(problem -> assertThat(problem).contains("backend.graphql.deployment-mode"));
|
||||
.anySatisfy(problem -> assertThat(problem).contains("app.graphql.deployment-mode"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -144,7 +161,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(strings = {"backend.graphql.production", "backend.graphql.environment"})
|
||||
@ValueSource(strings = {"app.graphql.production", "app.graphql.environment"})
|
||||
@DisplayName("a retired safety key is a migration error naming the replacement")
|
||||
void aRetiredKeyIsAMigrationError(String retired) {
|
||||
List<String> problems =
|
||||
@@ -163,8 +180,8 @@ class GraphQlDeploymentModeContractTest {
|
||||
GraphQlRetiredSafetyAxis.problems(
|
||||
environmentWith(
|
||||
Map.of(
|
||||
"backend.graphql.deployment-mode", "LOCAL",
|
||||
"backend.graphql.environment", "PRODUCTION_PUBLIC")));
|
||||
"app.graphql.deployment-mode", "LOCAL",
|
||||
"app.graphql.environment", "PRODUCTION_PUBLIC")));
|
||||
|
||||
assertThat(problems)
|
||||
.as(
|
||||
@@ -175,8 +192,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
@Test
|
||||
@DisplayName("with the master off the retired keys are not read at all")
|
||||
void withTheMasterOffTheNamespaceIsNotValidated() {
|
||||
ConfigurableEnvironment environment =
|
||||
environmentWith(Map.of("backend.graphql.production", "true"));
|
||||
ConfigurableEnvironment environment = environmentWith(Map.of("app.graphql.production", "true"));
|
||||
environment.getPropertySources().addFirst(off());
|
||||
|
||||
assertThat(GraphQlRetiredSafetyAxis.problems(environment))
|
||||
@@ -193,14 +209,14 @@ class GraphQlDeploymentModeContractTest {
|
||||
.hasFailed()
|
||||
.getFailure()
|
||||
.rootCause()
|
||||
.hasMessageContaining("backend.graphql.deployment-mode"));
|
||||
.hasMessageContaining("app.graphql.deployment-mode"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("a development mode gets the permissive authorization default")
|
||||
void aDevelopmentModeGetsThePermissiveDefault() {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=LOCAL")
|
||||
.withPropertyValues("app.graphql.deployment-mode=LOCAL")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -216,7 +232,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
@DisplayName("a production mode refuses the permissive default, naming the mode")
|
||||
void aProductionModeRefusesThePermissiveDefault(String mode) {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=" + mode)
|
||||
.withPropertyValues("app.graphql.deployment-mode=" + mode)
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
@@ -231,7 +247,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
@DisplayName("production 은 익명 principal resolver 로 떠서 모든 요청을 거부하는 대신 기동을 거부한다")
|
||||
void aProductionModeRefusesTheAnonymousPrincipalResolver(String mode) {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=" + mode)
|
||||
.withPropertyValues("app.graphql.deployment-mode=" + mode)
|
||||
.withBean(
|
||||
GraphQlAuthorizationPolicy.class, () -> GraphQlAuthorizationPolicy.builder().build())
|
||||
.run(
|
||||
@@ -247,7 +263,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
@DisplayName("production 은 인가 정책과 principal resolver 를 둘 다 주면 기동한다")
|
||||
void aProductionModeWithAnExplicitPolicyAndResolverStarts() {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=PRODUCTION_INTERNAL")
|
||||
.withPropertyValues("app.graphql.deployment-mode=PRODUCTION_INTERNAL")
|
||||
.withBean(
|
||||
GraphQlAuthorizationPolicy.class, () -> GraphQlAuthorizationPolicy.builder().build())
|
||||
.withBean(GraphQlPrincipalResolver.class, () -> request -> Optional.empty())
|
||||
@@ -258,7 +274,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
@DisplayName("the mode reaches the interceptor that decides what an anonymous caller may do")
|
||||
void theModeReachesTheRequestPath() {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=LOCAL")
|
||||
.withPropertyValues("app.graphql.deployment-mode=LOCAL")
|
||||
.run(
|
||||
context -> {
|
||||
GraphQlPlatformSettings settings = context.getBean(GraphQlPlatformSettings.class);
|
||||
@@ -304,7 +320,7 @@ class GraphQlDeploymentModeContractTest {
|
||||
@DisplayName("the platform's console setting is what the framework is given")
|
||||
void thePlatformConsoleSettingReachesTheFramework() {
|
||||
ConfigurableEnvironment environment =
|
||||
environmentWith(Map.of("backend.graphql.console.introspection-enabled", "true"));
|
||||
environmentWith(Map.of("app.graphql.console.introspection-enabled", "true"));
|
||||
|
||||
new GraphQlActivationEnvironmentPostProcessor().postProcessEnvironment(environment, null);
|
||||
|
||||
@@ -331,12 +347,12 @@ class GraphQlDeploymentModeContractTest {
|
||||
environment.getPropertySources().addFirst(source("contract", properties));
|
||||
environment
|
||||
.getPropertySources()
|
||||
.addLast(source("master", Map.of("backend.graphql.enabled", "true")));
|
||||
.addLast(source("master", Map.of("app.graphql.enabled", "true")));
|
||||
return environment;
|
||||
}
|
||||
|
||||
private static MapPropertySource off() {
|
||||
return source("off", Map.of("backend.graphql.enabled", "false"));
|
||||
return source("off", Map.of("app.graphql.enabled", "false"));
|
||||
}
|
||||
|
||||
private static MapPropertySource source(String name, Map<String, String> properties) {
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@ class GraphQlObservationWiringTest {
|
||||
AutoConfigurations.of(
|
||||
GraphQlRootAutoConfiguration.class, GraphQlObservationAutoConfiguration.class))
|
||||
.withBean(ObservationRegistry.class, ObservationRegistry::create)
|
||||
.withPropertyValues(
|
||||
"backend.graphql.enabled=true", "backend.graphql.deployment-mode=LOCAL");
|
||||
.withPropertyValues("app.graphql.enabled=true", "app.graphql.deployment-mode=LOCAL");
|
||||
|
||||
@Test
|
||||
void theFrameworkInstrumentationResolvesThePlatformConvention() {
|
||||
|
||||
+18
-21
@@ -41,8 +41,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
// it is testing the missing-mode refusal rather than whatever it meant to test. That
|
||||
// refusal has its own cases in GraphQlDeploymentModeContractTest. Later property values
|
||||
// override earlier ones, so a case that needs a different mode simply names it.
|
||||
.withPropertyValues(
|
||||
"backend.graphql.enabled=true", "backend.graphql.deployment-mode=LOCAL");
|
||||
.withPropertyValues("app.graphql.enabled=true", "app.graphql.deployment-mode=LOCAL");
|
||||
|
||||
@Test
|
||||
void aContextWithOnlyTheDeploymentModeSetBootsWithSafeDefaults() {
|
||||
@@ -81,7 +80,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
@Test
|
||||
void productionRefusesToStartWithoutAnExplicitAuthorizationPolicy() {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=PRODUCTION_INTERNAL")
|
||||
.withPropertyValues("app.graphql.deployment-mode=PRODUCTION_INTERNAL")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
@@ -116,7 +115,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
@Test
|
||||
void aClientPolicyLooserThanTheConfiguredCeilingIsRejectedAtStartup() {
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.limits.maximum-page-size=25")
|
||||
.withPropertyValues("app.graphql.limits.maximum-page-size=25")
|
||||
.withBean(GraphQlClientPolicy.class, () -> GraphQlClientPolicy.defaults(500, 10_000, false))
|
||||
.run(
|
||||
context ->
|
||||
@@ -124,7 +123,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
.hasFailed()
|
||||
.getFailure()
|
||||
.rootCause()
|
||||
.hasMessageContaining("exceeds backend.graphql.limits.maximum-page-size"));
|
||||
.hasMessageContaining("exceeds app.graphql.limits.maximum-page-size"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -137,8 +136,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"backend.graphql.deployment-mode=LOCAL",
|
||||
"backend.graphql.console.introspection-enabled=true")
|
||||
"app.graphql.deployment-mode=LOCAL", "app.graphql.console.introspection-enabled=true")
|
||||
.withBean(GraphQlProperties.class, () -> framework)
|
||||
.run(
|
||||
context ->
|
||||
@@ -156,7 +154,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
framework.getGraphiql().setEnabled(true);
|
||||
|
||||
runner
|
||||
.withPropertyValues("backend.graphql.deployment-mode=LOCAL")
|
||||
.withPropertyValues("app.graphql.deployment-mode=LOCAL")
|
||||
.withBean(GraphQlProperties.class, () -> framework)
|
||||
.run(
|
||||
context ->
|
||||
@@ -174,8 +172,7 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"backend.graphql.deployment-mode=LOCAL",
|
||||
"backend.graphql.console.introspection-enabled=true")
|
||||
"app.graphql.deployment-mode=LOCAL", "app.graphql.console.introspection-enabled=true")
|
||||
.withBean(GraphQlProperties.class, () -> framework)
|
||||
.run(context -> assertThat(context).hasNotFailed());
|
||||
}
|
||||
@@ -200,19 +197,19 @@ class GraphQlPlatformAutoConfigurationTest {
|
||||
String metadata = readClasspathResource("META-INF/spring-configuration-metadata.json");
|
||||
|
||||
assertThat(metadata)
|
||||
.contains("backend.graphql.deployment-mode")
|
||||
.doesNotContain("backend.graphql.production")
|
||||
.doesNotContain("backend.graphql.environment")
|
||||
.contains("backend.graphql.console.graphiql-enabled")
|
||||
.contains("backend.graphql.console.introspection-enabled")
|
||||
.contains("backend.graphql.limits.maximum-page-size")
|
||||
.contains("backend.graphql.limits.maximum-complexity")
|
||||
.contains("app.graphql.deployment-mode")
|
||||
.doesNotContain("app.graphql.production")
|
||||
.doesNotContain("app.graphql.environment")
|
||||
.contains("app.graphql.console.graphiql-enabled")
|
||||
.contains("app.graphql.console.introspection-enabled")
|
||||
.contains("app.graphql.limits.maximum-page-size")
|
||||
.contains("app.graphql.limits.maximum-complexity")
|
||||
// Keys that only failed the boot or were echoed back unused were removed (2026-09-25).
|
||||
.doesNotContain("backend.graphql.cursor.key-ids")
|
||||
.doesNotContain("backend.graphql.unsupported.multipart-upload")
|
||||
.doesNotContain("app.graphql.cursor.key-ids")
|
||||
.doesNotContain("app.graphql.unsupported.multipart-upload")
|
||||
// Servlet-only template (D4): no reactive profile to choose, no event loop to bridge off.
|
||||
.doesNotContain("backend.graphql.execution-profile")
|
||||
.doesNotContain("backend.graphql.unbridged-blocking-resolvers");
|
||||
.doesNotContain("app.graphql.execution-profile")
|
||||
.doesNotContain("app.graphql.unbridged-blocking-resolvers");
|
||||
}
|
||||
|
||||
private static GraphQlProperties frameworkDefaults() {
|
||||
|
||||
+1
-2
@@ -35,8 +35,7 @@ class GraphQlPolicyRequestPathTest {
|
||||
private final ApplicationContextRunner runner =
|
||||
new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(GraphQlRootAutoConfiguration.class))
|
||||
.withPropertyValues(
|
||||
"backend.graphql.enabled=true", "backend.graphql.deployment-mode=LOCAL");
|
||||
.withPropertyValues("app.graphql.enabled=true", "app.graphql.deployment-mode=LOCAL");
|
||||
|
||||
@Test
|
||||
@DisplayName("the policies that are wired reach the request path through the instrumentation")
|
||||
|
||||
+1
-2
@@ -39,8 +39,7 @@ class GraphQlPlatformWebInterceptorRequestBoundsTest {
|
||||
private final ApplicationContextRunner runner =
|
||||
new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(GraphQlRootAutoConfiguration.class))
|
||||
.withPropertyValues(
|
||||
"backend.graphql.enabled=true", "backend.graphql.deployment-mode=LOCAL")
|
||||
.withPropertyValues("app.graphql.enabled=true", "app.graphql.deployment-mode=LOCAL")
|
||||
.withBean(
|
||||
GraphQlClientPolicy.class,
|
||||
() ->
|
||||
|
||||
+1
-2
@@ -44,8 +44,7 @@ class GraphQlRequestStageErrorMappingTest {
|
||||
private final ApplicationContextRunner runner =
|
||||
new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(GraphQlRootAutoConfiguration.class))
|
||||
.withPropertyValues(
|
||||
"backend.graphql.enabled=true", "backend.graphql.deployment-mode=LOCAL");
|
||||
.withPropertyValues("app.graphql.enabled=true", "app.graphql.deployment-mode=LOCAL");
|
||||
|
||||
@Test
|
||||
@DisplayName("principal resolver 가 던진 ApiErrorCarrier 는 요청 단계에서도 자기 code 로 나간다")
|
||||
|
||||
@@ -38,11 +38,11 @@ Package root: `dev.caskeleton.adapter.inbound.grpc`.
|
||||
- 프로덕션 feature RPC 를 스켈레톤에 두는 것 — health/reflection 표면만 (web 의
|
||||
`HealthcheckController` 와 동일 원칙).
|
||||
|
||||
## Config knobs (`ca-skeleton.grpc.server.*`)
|
||||
## Config knobs (`app.grpc.server.*`)
|
||||
|
||||
타입드 `@ConfigurationProperties` 만 두고, 값은 composition-root `application.yml` 에 산다
|
||||
(모듈별 `yml` 없음). prefix가 `ca-skeleton.grpc`가 아니라 `.server`까지인 이유: 바인딩이
|
||||
`ignoreUnknownFields = false`라서, 부모 prefix를 쓰면 벤더 starter의 `ca-skeleton.grpc.platform.*`
|
||||
(모듈별 `yml` 없음). prefix가 `app.grpc`가 아니라 `.server`까지인 이유: 바인딩이
|
||||
`ignoreUnknownFields = false`라서, 부모 prefix를 쓰면 벤더 starter의 `app.grpc.platform.*`
|
||||
키가 들어오는 순간 기동이 실패한다(`GrpcSafeActivationTest`).
|
||||
|
||||
| key | default | 의미 |
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
```
|
||||
|
||||
이 줄을 지우면 서버, 포트, 설정 바인딩이 모두 함께 빠진다.
|
||||
- 켜기와 끄기: 모듈이 있으면 켜진다. `ca-skeleton.grpc.server.enabled=false`로만 끈다.
|
||||
- 켜기와 끄기: 모듈이 있으면 켜진다. `app.grpc.server.enabled=false`로만 끈다.
|
||||
- 필요한 설정: 전용 `APP_*` env 키는 registry에 없다. 켜진 상태에서 지금 구현이 받는 listener는
|
||||
loopback plaintext뿐이라 `ca-skeleton.grpc.server.allow-insecure-local=true`(env
|
||||
`CA_SKELETON_GRPC_SERVER_ALLOW_INSECURE_LOCAL=true`)를 명시해야 기동한다. 선택: `ca-skeleton.grpc.server.port`
|
||||
loopback plaintext뿐이라 `app.grpc.server.allow-insecure-local=true`(env
|
||||
`APP_GRPC_SERVER_ALLOW_INSECURE_LOCAL=true`)를 명시해야 기동한다. 선택: `app.grpc.server.port`
|
||||
(기본 9090), `.bind-address`(기본 127.0.0.1), `.reflection-enabled`, `.shutdown-grace-seconds`.
|
||||
|
||||
## 왜 self-managed Netty 인가
|
||||
|
||||
+3
-3
@@ -11,8 +11,8 @@ import org.springframework.context.annotation.Bean;
|
||||
/**
|
||||
* Wires the gRPC transport machinery. Registered through this module's own {@code
|
||||
* AutoConfiguration.imports}: on when the module is present, off with {@code
|
||||
* ca-skeleton.grpc.server.enabled=false}. The plaintext listener still refuses to start unless
|
||||
* {@code ca-skeleton.grpc.server.allow-insecure-local=true} is explicit.
|
||||
* app.grpc.server.enabled=false}. The plaintext listener still refuses to start unless {@code
|
||||
* app.grpc.server.allow-insecure-local=true} is explicit.
|
||||
*
|
||||
* <p>All collaborators are plain objects composed here, mirroring the clean DI style used across
|
||||
* the skeleton. A feature service is exposed only when its {@link BindableService} bean carries
|
||||
@@ -20,7 +20,7 @@ import org.springframework.context.annotation.Bean;
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.grpc.server",
|
||||
prefix = "app.grpc.server",
|
||||
name = "enabled",
|
||||
havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
|
||||
+2
-2
@@ -10,11 +10,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* gRPC server settings bound from {@code ca-skeleton.grpc.server.*}. Typed configuration only (no
|
||||
* gRPC server settings bound from {@code app.grpc.server.*}. Typed configuration only (no
|
||||
* per-module {@code yml}); values live in the composition-root {@code application.yml}, matching
|
||||
* the ca-skeleton config convention. See README for the self-managed-Netty rationale.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "ca-skeleton.grpc.server", ignoreUnknownFields = false)
|
||||
@ConfigurationProperties(prefix = "app.grpc.server", ignoreUnknownFields = false)
|
||||
@Validated
|
||||
public class GrpcServerSettings {
|
||||
|
||||
|
||||
+5
-5
@@ -70,11 +70,11 @@ class GrpcP1BoundaryWireTest {
|
||||
new ApplicationContextRunner()
|
||||
.withUserConfiguration(GrpcServerConfig.class, FeatureConfiguration.class)
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true",
|
||||
"ca-skeleton.grpc.server.port=0",
|
||||
"ca-skeleton.grpc.server.bind-address=127.0.0.1",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true",
|
||||
"ca-skeleton.grpc.server.reflection-enabled=false");
|
||||
"app.grpc.server.enabled=true",
|
||||
"app.grpc.server.port=0",
|
||||
"app.grpc.server.bind-address=127.0.0.1",
|
||||
"app.grpc.server.allow-insecure-local=true",
|
||||
"app.grpc.server.reflection-enabled=false");
|
||||
|
||||
@Test
|
||||
void missingAuthenticationMetadataIsRejectedWithAStableContract() {
|
||||
|
||||
+23
-25
@@ -42,15 +42,14 @@ class GrpcSafeActivationTest {
|
||||
@Test
|
||||
void presentWithoutTheSwitchIsOnAndStillRefusesAnImplicitPlaintextListener() {
|
||||
contextRunner
|
||||
.withPropertyValues("ca-skeleton.grpc.server.port=0")
|
||||
.withPropertyValues("app.grpc.server.port=0")
|
||||
.run(context -> assertRootCauseContains(context.getStartupFailure(), "insecure"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void switchedOffCreatesNoGrpcRuntimeBeansOrListener() {
|
||||
contextRunner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=false", "ca-skeleton.grpc.server.port=0")
|
||||
.withPropertyValues("app.grpc.server.enabled=false", "app.grpc.server.port=0")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).doesNotHaveBean(GrpcServerSettings.class);
|
||||
@@ -63,8 +62,7 @@ class GrpcSafeActivationTest {
|
||||
@Test
|
||||
void enabledTransportRequiresAnExplicitLocalInsecureOverride() {
|
||||
contextRunner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true", "ca-skeleton.grpc.server.port=0")
|
||||
.withPropertyValues("app.grpc.server.enabled=true", "app.grpc.server.port=0")
|
||||
.run(context -> assertRootCauseContains(context.getStartupFailure(), "insecure"));
|
||||
}
|
||||
|
||||
@@ -72,10 +70,10 @@ class GrpcSafeActivationTest {
|
||||
void insecureTransportRejectsANonLoopbackBindAddress() {
|
||||
contextRunner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true",
|
||||
"ca-skeleton.grpc.server.port=0",
|
||||
"ca-skeleton.grpc.server.bind-address=0.0.0.0",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true")
|
||||
"app.grpc.server.enabled=true",
|
||||
"app.grpc.server.port=0",
|
||||
"app.grpc.server.bind-address=0.0.0.0",
|
||||
"app.grpc.server.allow-insecure-local=true")
|
||||
.run(context -> assertRootCauseContains(context.getStartupFailure(), "loopback"));
|
||||
}
|
||||
|
||||
@@ -83,10 +81,10 @@ class GrpcSafeActivationTest {
|
||||
void enabledTransportRejectsAPortOutsideTheTcpRange() {
|
||||
contextRunner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true",
|
||||
"ca-skeleton.grpc.server.port=65536",
|
||||
"ca-skeleton.grpc.server.bind-address=127.0.0.1",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true")
|
||||
"app.grpc.server.enabled=true",
|
||||
"app.grpc.server.port=65536",
|
||||
"app.grpc.server.bind-address=127.0.0.1",
|
||||
"app.grpc.server.allow-insecure-local=true")
|
||||
.run(context -> assertRootCauseContains(context.getStartupFailure(), "port"));
|
||||
}
|
||||
|
||||
@@ -94,11 +92,11 @@ class GrpcSafeActivationTest {
|
||||
void enabledTransportRejectsANegativeShutdownGrace() {
|
||||
contextRunner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true",
|
||||
"ca-skeleton.grpc.server.port=0",
|
||||
"ca-skeleton.grpc.server.bind-address=127.0.0.1",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true",
|
||||
"ca-skeleton.grpc.server.shutdown-grace-seconds=-1")
|
||||
"app.grpc.server.enabled=true",
|
||||
"app.grpc.server.port=0",
|
||||
"app.grpc.server.bind-address=127.0.0.1",
|
||||
"app.grpc.server.allow-insecure-local=true",
|
||||
"app.grpc.server.shutdown-grace-seconds=-1")
|
||||
.run(
|
||||
context ->
|
||||
assertRootCauseContains(context.getStartupFailure(), "shutdownGraceSeconds"));
|
||||
@@ -109,10 +107,10 @@ class GrpcSafeActivationTest {
|
||||
contextRunner
|
||||
.withUserConfiguration(FeatureServiceConfiguration.class)
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true",
|
||||
"ca-skeleton.grpc.server.port=0",
|
||||
"ca-skeleton.grpc.server.bind-address=127.0.0.1",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true")
|
||||
"app.grpc.server.enabled=true",
|
||||
"app.grpc.server.port=0",
|
||||
"app.grpc.server.bind-address=127.0.0.1",
|
||||
"app.grpc.server.allow-insecure-local=true")
|
||||
.run(context -> assertRootCauseContains(context.getStartupFailure(), "authentication"));
|
||||
}
|
||||
|
||||
@@ -120,9 +118,9 @@ class GrpcSafeActivationTest {
|
||||
void theVendorPlatformNamespaceBesideTheAdapterDoesNotFailItsStrictBinding() {
|
||||
contextRunner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.port=0",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true",
|
||||
"ca-skeleton.grpc.platform.enabled=true")
|
||||
"app.grpc.server.port=0",
|
||||
"app.grpc.server.allow-insecure-local=true",
|
||||
"app.grpc.platform.enabled=true")
|
||||
.run(context -> assertThat(context).hasNotFailed());
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -27,10 +27,10 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Boots the skeleton gRPC machinery in a real Spring context on an ephemeral port ({@code
|
||||
* ca-skeleton.grpc.server.port=0}) with ZERO feature services and proves it stands up a working
|
||||
* surface: the {@link GrpcServerRunner} SmartLifecycle starts, the standard {@code grpc.health.v1}
|
||||
* health service reports SERVING, and v1 server reflection lists the built-in services. A real
|
||||
* Netty channel exercises the wire, so this is a genuine transport smoke test, not a wiring mock.
|
||||
* app.grpc.server.port=0}) with ZERO feature services and proves it stands up a working surface:
|
||||
* the {@link GrpcServerRunner} SmartLifecycle starts, the standard {@code grpc.health.v1} health
|
||||
* service reports SERVING, and v1 server reflection lists the built-in services. A real Netty
|
||||
* channel exercises the wire, so this is a genuine transport smoke test, not a wiring mock.
|
||||
*/
|
||||
class GrpcServerRunnerBootTest {
|
||||
|
||||
@@ -38,11 +38,11 @@ class GrpcServerRunnerBootTest {
|
||||
new ApplicationContextRunner()
|
||||
.withUserConfiguration(GrpcServerConfig.class)
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.grpc.server.enabled=true",
|
||||
"ca-skeleton.grpc.server.port=0",
|
||||
"ca-skeleton.grpc.server.bind-address=127.0.0.1",
|
||||
"ca-skeleton.grpc.server.allow-insecure-local=true",
|
||||
"ca-skeleton.grpc.server.reflection-enabled=true");
|
||||
"app.grpc.server.enabled=true",
|
||||
"app.grpc.server.port=0",
|
||||
"app.grpc.server.bind-address=127.0.0.1",
|
||||
"app.grpc.server.allow-insecure-local=true",
|
||||
"app.grpc.server.reflection-enabled=true");
|
||||
|
||||
@Test
|
||||
void skeletonServerStartsAndServesHealthAndReflectionWithNoFeatures() {
|
||||
|
||||
@@ -24,9 +24,9 @@ registry(`src/config/architecture/modules.json`)의 그 leaf `allowed_dependenci
|
||||
|
||||
| 기능 | 켜는 설정 | 만드는 bean |
|
||||
| --- | --- | --- |
|
||||
| MVC virtual thread 실행기 + admission 제한 | `backend.web.advanced.mvc-virtual-threads.enabled=true`, `admission-limit`, `database-pool-size`, `outbound-bulkhead`, `admission-wait` | `applicationTaskExecutor`, `VirtualThreadAdmissionGuard`, `VirtualThreadProfile` |
|
||||
| NDJSON 스트리밍 | `backend.web.advanced.ndjson.enabled=true` | `mvcNdjsonWriter` + 공유 `WebStreamPolicy`·`WebStreamRegistry`·`StreamRecordEncoder` |
|
||||
| JSON text sequence (RFC 7464) | `backend.web.advanced.json-sequence.enabled=true` | `mvcJsonSequenceWriter` + 같은 공유 bean |
|
||||
| MVC virtual thread 실행기 + admission 제한 | `app.web.advanced.mvc-virtual-threads.enabled=true`, `admission-limit`, `database-pool-size`, `outbound-bulkhead`, `admission-wait` | `applicationTaskExecutor`, `VirtualThreadAdmissionGuard`, `VirtualThreadProfile` |
|
||||
| NDJSON 스트리밍 | `app.web.advanced.ndjson.enabled=true` | `mvcNdjsonWriter` + 공유 `WebStreamPolicy`·`WebStreamRegistry`·`StreamRecordEncoder` |
|
||||
| JSON text sequence (RFC 7464) | `app.web.advanced.json-sequence.enabled=true` | `mvcJsonSequenceWriter` + 같은 공유 bean |
|
||||
|
||||
virtual thread 실행기는 `TaskDecorator` bean 을 요구한다(요청 상관관계 전파). 조립 순서는
|
||||
`TaskExecutionAutoConfiguration` 앞이다. 스트리밍 두 기능은 Boot 의 `JsonMapper` bean 으로 레코드를
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.springframework.context.annotation.Import;
|
||||
@AutoConfiguration
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "backend.web.advanced.json-sequence",
|
||||
prefix = "app.web.advanced.json-sequence",
|
||||
name = "enabled",
|
||||
havingValue = "true")
|
||||
@Import(MvcStreamingSupportConfiguration.class)
|
||||
|
||||
+1
-4
@@ -14,10 +14,7 @@ import org.springframework.context.annotation.Import;
|
||||
/** Wires servlet-side NDJSON streaming only. */
|
||||
@AutoConfiguration
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "backend.web.advanced.ndjson",
|
||||
name = "enabled",
|
||||
havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = "app.web.advanced.ndjson", name = "enabled", havingValue = "true")
|
||||
@Import(MvcStreamingSupportConfiguration.class)
|
||||
public class MvcStreamingExecutorConfiguration {
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import org.springframework.core.task.support.TaskExecutorAdapter;
|
||||
@EnableConfigurationProperties(VirtualThreadSettings.class)
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "backend.web.advanced.mvc-virtual-threads",
|
||||
prefix = "app.web.advanced.mvc-virtual-threads",
|
||||
name = "enabled",
|
||||
havingValue = "true")
|
||||
public class VirtualThreadMvcConfiguration {
|
||||
|
||||
+2
-2
@@ -7,14 +7,14 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Settings bound from {@code backend.web.advanced.mvc-virtual-threads.*}.
|
||||
* Settings bound from {@code app.web.advanced.mvc-virtual-threads.*}.
|
||||
*
|
||||
* <p>The downstream budgets are settings rather than something read from the pool at runtime,
|
||||
* deliberately. Reading them would make the check pass automatically — whatever the pool is, the
|
||||
* admission limit would be compared against it and the operator would never be asked to think about
|
||||
* the relationship. Writing them down here is what makes a mismatch visible in a diff.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "backend.web.advanced.mvc-virtual-threads")
|
||||
@ConfigurationProperties(prefix = "app.web.advanced.mvc-virtual-threads")
|
||||
@Validated
|
||||
public class VirtualThreadSettings {
|
||||
|
||||
|
||||
+15
-15
@@ -46,10 +46,10 @@ class MvcAdvancedConfigurationTest {
|
||||
// thread has no relationship to the submitter.
|
||||
new WebApplicationContextRunner()
|
||||
.withPropertyValues(
|
||||
"backend.web.advanced.mvc-virtual-threads.enabled=true",
|
||||
"backend.web.advanced.mvc-virtual-threads.admission-limit=8",
|
||||
"backend.web.advanced.mvc-virtual-threads.database-pool-size=4",
|
||||
"backend.web.advanced.mvc-virtual-threads.outbound-bulkhead=4")
|
||||
"app.web.advanced.mvc-virtual-threads.enabled=true",
|
||||
"app.web.advanced.mvc-virtual-threads.admission-limit=8",
|
||||
"app.web.advanced.mvc-virtual-threads.database-pool-size=4",
|
||||
"app.web.advanced.mvc-virtual-threads.outbound-bulkhead=4")
|
||||
.withUserConfiguration(VirtualThreadMvcConfiguration.class)
|
||||
.run(context -> assertThat(context).hasFailed());
|
||||
}
|
||||
@@ -77,7 +77,7 @@ class MvcAdvancedConfigurationTest {
|
||||
// Four beans with a dependency chain between them. A cycle or a missing dependency here is not
|
||||
// visible from any unit test of the classes involved.
|
||||
runner
|
||||
.withPropertyValues("backend.web.advanced.ndjson.enabled=true")
|
||||
.withPropertyValues("app.web.advanced.ndjson.enabled=true")
|
||||
.withUserConfiguration(MvcStreamingExecutorConfiguration.class)
|
||||
.run(
|
||||
context ->
|
||||
@@ -94,7 +94,7 @@ class MvcAdvancedConfigurationTest {
|
||||
@DisplayName("JSON sequence has its own activation property")
|
||||
void jsonSequenceStartsIndependentlyOfNdjson() {
|
||||
runner
|
||||
.withPropertyValues("backend.web.advanced.json-sequence.enabled=true")
|
||||
.withPropertyValues("app.web.advanced.json-sequence.enabled=true")
|
||||
.withUserConfiguration(MvcJsonSequenceConfiguration.class)
|
||||
.run(
|
||||
context ->
|
||||
@@ -114,10 +114,10 @@ class MvcAdvancedConfigurationTest {
|
||||
// concurrency bound and replaced it with nothing.
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"backend.web.advanced.mvc-virtual-threads.enabled=true",
|
||||
"backend.web.advanced.mvc-virtual-threads.admission-limit=100",
|
||||
"backend.web.advanced.mvc-virtual-threads.database-pool-size=20",
|
||||
"backend.web.advanced.mvc-virtual-threads.outbound-bulkhead=20")
|
||||
"app.web.advanced.mvc-virtual-threads.enabled=true",
|
||||
"app.web.advanced.mvc-virtual-threads.admission-limit=100",
|
||||
"app.web.advanced.mvc-virtual-threads.database-pool-size=20",
|
||||
"app.web.advanced.mvc-virtual-threads.outbound-bulkhead=20")
|
||||
.withUserConfiguration(VirtualThreadMvcConfiguration.class)
|
||||
.run(
|
||||
context -> {
|
||||
@@ -139,10 +139,10 @@ class MvcAdvancedConfigurationTest {
|
||||
// place — the capability switched on and nothing changed.
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"backend.web.advanced.mvc-virtual-threads.enabled=true",
|
||||
"backend.web.advanced.mvc-virtual-threads.admission-limit=8",
|
||||
"backend.web.advanced.mvc-virtual-threads.database-pool-size=4",
|
||||
"backend.web.advanced.mvc-virtual-threads.outbound-bulkhead=4")
|
||||
"app.web.advanced.mvc-virtual-threads.enabled=true",
|
||||
"app.web.advanced.mvc-virtual-threads.admission-limit=8",
|
||||
"app.web.advanced.mvc-virtual-threads.database-pool-size=4",
|
||||
"app.web.advanced.mvc-virtual-threads.outbound-bulkhead=4")
|
||||
.withUserConfiguration(VirtualThreadMvcConfiguration.class)
|
||||
.run(
|
||||
context ->
|
||||
@@ -158,7 +158,7 @@ class MvcAdvancedConfigurationTest {
|
||||
// will not refresh, which is the intended outcome: a node that accepts every arrival and
|
||||
// queues it on budgets that did not grow is worse than a node that does not start.
|
||||
runner
|
||||
.withPropertyValues("backend.web.advanced.mvc-virtual-threads.enabled=true")
|
||||
.withPropertyValues("app.web.advanced.mvc-virtual-threads.enabled=true")
|
||||
.withUserConfiguration(VirtualThreadMvcConfiguration.class)
|
||||
.run(
|
||||
context ->
|
||||
|
||||
+2
-2
@@ -64,8 +64,8 @@ class WebAdvancedRollbackIT {
|
||||
// matchIfMissing = true would pass the test above and fail this one.
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"backend.web.advanced.ndjson.enabled=false",
|
||||
"backend.web.advanced.mvc-virtual-threads.enabled=false")
|
||||
"app.web.advanced.ndjson.enabled=false",
|
||||
"app.web.advanced.mvc-virtual-threads.enabled=false")
|
||||
.withUserConfiguration(
|
||||
MvcStreamingExecutorConfiguration.class,
|
||||
MvcJsonSequenceConfiguration.class,
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import org.springframework.context.annotation.Import;
|
||||
@AutoConfiguration
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.notification.platform",
|
||||
prefix = "app.notification.platform",
|
||||
name = "enabled",
|
||||
havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import org.springframework.security.web.SecurityFilterChain;
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.notification.platform.callbacks",
|
||||
prefix = "app.notification.platform.callbacks",
|
||||
name = "enabled",
|
||||
havingValue = "true")
|
||||
public class CallbackMvcSecurityConfiguration {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.notification.platform.callbacks",
|
||||
prefix = "app.notification.platform.callbacks",
|
||||
name = "enabled",
|
||||
havingValue = "true")
|
||||
public class CallbackRequestConfiguration {
|
||||
|
||||
+2
-3
@@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.notification.platform.callbacks",
|
||||
prefix = "app.notification.platform.callbacks",
|
||||
name = "enabled",
|
||||
havingValue = "true")
|
||||
@RequestMapping("/internal/notification/callbacks")
|
||||
@@ -55,8 +55,7 @@ public final class NotificationCallbackMvcController {
|
||||
public NotificationCallbackMvcController(
|
||||
ProviderCallbackIngress ingestion,
|
||||
CallbackRequestFactory requestFactory,
|
||||
@Value("${ca-skeleton.notification.platform.callbacks.max-body-bytes:65508}")
|
||||
int maxBodyBytes) {
|
||||
@Value("${app.notification.platform.callbacks.max-body-bytes:65508}") int maxBodyBytes) {
|
||||
this.ingestion = Objects.requireNonNull(ingestion, "ingestion");
|
||||
this.requestFactory = Objects.requireNonNull(requestFactory, "requestFactory");
|
||||
if (maxBodyBytes < 1 || maxBodyBytes > MAX_STORABLE_BODY_BYTES) {
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.notification.platform",
|
||||
prefix = "app.notification.platform",
|
||||
name = "enabled",
|
||||
havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "ca-skeleton.notification.platform",
|
||||
prefix = "app.notification.platform",
|
||||
name = "enabled",
|
||||
havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
|
||||
+4
-4
@@ -25,7 +25,7 @@ class NotificationWebAutoConfigurationTest {
|
||||
@Test
|
||||
void nothingIsRegisteredWhileThePlatformIsOff() {
|
||||
servlet
|
||||
.withPropertyValues("ca-skeleton.notification.platform.enabled=false")
|
||||
.withPropertyValues("app.notification.platform.enabled=false")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
@@ -38,7 +38,7 @@ class NotificationWebAutoConfigurationTest {
|
||||
@Test
|
||||
void theSubmissionSurfaceRegistersWithThePlatformAndTheCallbackEndpointStaysOnItsOwnSwitch() {
|
||||
servlet
|
||||
.withPropertyValues("ca-skeleton.notification.platform.enabled=true")
|
||||
.withPropertyValues("app.notification.platform.enabled=true")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
@@ -54,8 +54,8 @@ class NotificationWebAutoConfigurationTest {
|
||||
.withConfiguration(AutoConfigurations.of(NotificationWebAutoConfiguration.class))
|
||||
.withUserConfiguration(UseCases.class)
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.notification.platform.enabled=true",
|
||||
"ca-skeleton.notification.platform.callbacks.enabled=true")
|
||||
"app.notification.platform.enabled=true",
|
||||
"app.notification.platform.callbacks.enabled=true")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class CallbackRequestConfigurationTest {
|
||||
@DisplayName("callbacks on supplies both beans the endpoints take")
|
||||
void callbacksOnSuppliesTheBeans() {
|
||||
runner
|
||||
.withPropertyValues("ca-skeleton.notification.platform.callbacks.enabled=true")
|
||||
.withPropertyValues("app.notification.platform.callbacks.enabled=true")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
|
||||
@@ -62,7 +62,7 @@ production configuration and compare the result with the committed snapshot.
|
||||
|
||||
### JWT / Redis session 상호배타 모드
|
||||
|
||||
`ca-skeleton.security.auth-mode=jwt|redis-session`은 하나만 선택한다. JWT mode는 stateless이고
|
||||
`app.security.auth-mode=jwt|redis-session`은 하나만 선택한다. JWT mode는 stateless이고
|
||||
CSRF/session repository를 만들지 않는다. Redis session mode는 `Secure`, `HttpOnly`, host-only
|
||||
session cookie, `SameSite=Lax`, cookie/header CSRF와 `migrateSession` fixation 방어를 함께 켠다.
|
||||
|
||||
@@ -293,7 +293,7 @@ commit-aware response wrapper 계약을 구현한다. 또한 이 모듈은 HTML
|
||||
- inbound web은 `shared-contract`의 `EdgeRateLimitPort`만 호출한다. Redis key, Lua, local counter와
|
||||
provider 설정을 알지 못한다.
|
||||
- outbound provider activation SSOT는
|
||||
`ca-skeleton.capabilities.rate-limit.provider=disabled|redis`이고, HTTP enforcement의 별도 축은
|
||||
`app.capabilities.rate-limit.provider=disabled|redis`이고, HTTP enforcement의 별도 축은
|
||||
`app.rate-limit.enabled`다. transport가 enabled인데 exact provider가 없거나 중복이면 startup을
|
||||
실패시킨다.
|
||||
- fixed window, sliding counter, token bucket 선택과 policy revision은 Redis provider가 소유한다.
|
||||
|
||||
+1
-4
@@ -29,10 +29,7 @@ import org.springframework.web.client.RestClientException;
|
||||
* README for the design rationale.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(
|
||||
name = "ca-skeleton.security.auth-mode",
|
||||
havingValue = "jwt",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "app.security.auth-mode", havingValue = "jwt", matchIfMissing = true)
|
||||
public class JwtDecoderConfig {
|
||||
|
||||
static final String ERROR_TIMESTAMP_INVALID = "jwt_timestamp_invalid";
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import org.springframework.session.web.http.DefaultCookieSerializer;
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableSpringHttpSession
|
||||
@ConditionalOnProperty(
|
||||
name = "ca-skeleton.security.auth-mode",
|
||||
name = "app.security.auth-mode",
|
||||
havingValue = "redis-session",
|
||||
matchIfMissing = false)
|
||||
public class RedisSessionWebConfig {
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class SecurityConfig {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(
|
||||
name = "ca-skeleton.security.auth-mode",
|
||||
name = "app.security.auth-mode",
|
||||
havingValue = "redis-session",
|
||||
matchIfMissing = false)
|
||||
PrimitiveSessionSecurityContextRepository primitiveSessionSecurityContextRepository() {
|
||||
|
||||
+4
-4
@@ -8,11 +8,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
/**
|
||||
* App-side role→permission mapping source.
|
||||
*
|
||||
* <p>Bound from {@code ca-skeleton.authz.role-permissions.<role> = [resource:action, ...]}. Keys
|
||||
* are <em>raw</em> IdP role names (no {@code ROLE_} prefix), e.g.:
|
||||
* <p>Bound from {@code app.authz.role-permissions.<role> = [resource:action, ...]}. Keys are
|
||||
* <em>raw</em> IdP role names (no {@code ROLE_} prefix), e.g.:
|
||||
*
|
||||
* <pre>
|
||||
* ca-skeleton:
|
||||
* app:
|
||||
* authz:
|
||||
* role-permissions:
|
||||
* user: [worklog:read, worklog:write]
|
||||
@@ -21,7 +21,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* <p>See README for the design rationale.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "ca-skeleton.authz")
|
||||
@ConfigurationProperties(prefix = "app.authz")
|
||||
public record RolePermissionPolicy(Map<String, List<String>> rolePermissions) {
|
||||
|
||||
public RolePermissionPolicy {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import tools.jackson.core.StreamReadFeature;
|
||||
@AutoConfiguration
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
@ConditionalOnProperty(
|
||||
prefix = "backend.web.mvc",
|
||||
prefix = "app.web.mvc",
|
||||
name = "enabled",
|
||||
havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import org.springframework.util.unit.DataSize;
|
||||
* @param trustInboundRequestId whether a caller may choose its own request id
|
||||
* @param maxJsonBodySize the largest JSON request body accepted; 1MB when omitted
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "backend.web.mvc")
|
||||
@ConfigurationProperties(prefix = "app.web.mvc")
|
||||
public record WebMvcPlatformSettings(
|
||||
Boolean enabled, Boolean trustInboundRequestId, DataSize maxJsonBodySize) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public record WebMvcPlatformSettings(
|
||||
trustInboundRequestId = trustInboundRequestId != null && trustInboundRequestId;
|
||||
maxJsonBodySize = maxJsonBodySize == null ? DataSize.ofMegabytes(1) : maxJsonBodySize;
|
||||
if (maxJsonBodySize.toBytes() < 1) {
|
||||
throw new IllegalArgumentException("backend.web.mvc.max-json-body-size must be positive");
|
||||
throw new IllegalArgumentException("app.web.mvc.max-json-body-size must be positive");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
* HTTP bridge settings bound to the transport-only {@code app.rate-limit} axis.
|
||||
*
|
||||
* <p>The outbound provider is selected independently by {@code
|
||||
* ca-skeleton.capabilities.rate-limit.provider}; enabling this bridge never selects a provider or a
|
||||
* app.capabilities.rate-limit.provider}; enabling this bridge never selects a provider or a
|
||||
* fallback.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "app.rate-limit")
|
||||
|
||||
+6
-10
@@ -7,20 +7,16 @@ import java.util.List;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* CORS settings bound from {@code ca-skeleton.cors.*}. See README for the validation-policy
|
||||
* rationale.
|
||||
*/
|
||||
/** CORS settings bound from {@code app.cors.*}. See README for the validation-policy rationale. */
|
||||
@Validated
|
||||
@ConfigurationProperties(prefix = "ca-skeleton.cors")
|
||||
@ConfigurationProperties(prefix = "app.cors")
|
||||
public record CorsSettings(
|
||||
boolean enabled,
|
||||
List<String> allowedOrigins,
|
||||
List<String> allowedMethods,
|
||||
List<String> allowedHeaders,
|
||||
boolean allowCredentials,
|
||||
@PositiveOrZero(
|
||||
message = "APP_SECURITY_CORS_MAX_AGE (ca-skeleton.cors.max-age-seconds) must be >= 0")
|
||||
@PositiveOrZero(message = "APP_SECURITY_CORS_MAX_AGE (app.cors.max-age-seconds) must be >= 0")
|
||||
long maxAgeSeconds) {
|
||||
|
||||
public CorsSettings {
|
||||
@@ -28,13 +24,13 @@ public record CorsSettings(
|
||||
if (enabled && (allowedOrigins == null || allowedOrigins.isEmpty())) {
|
||||
throw new IllegalArgumentException(
|
||||
"APP_SECURITY_CORS_ENABLED=true requires a non-empty APP_SECURITY_CORS_ORIGINS "
|
||||
+ "(ca-skeleton.cors.allowed-origins)");
|
||||
+ "(app.cors.allowed-origins)");
|
||||
}
|
||||
// A wildcard origin must not be combined with credentials.
|
||||
if (allowCredentials && allowedOrigins != null && allowedOrigins.contains("*")) {
|
||||
throw new IllegalArgumentException(
|
||||
"APP_SECURITY_CORS_ALLOW_CREDENTIALS=true must not be combined with a wildcard "
|
||||
+ "\"*\" in APP_SECURITY_CORS_ORIGINS (ca-skeleton.cors.allowed-origins); "
|
||||
+ "\"*\" in APP_SECURITY_CORS_ORIGINS (app.cors.allowed-origins); "
|
||||
+ "list explicit origins instead");
|
||||
}
|
||||
if (allowedOrigins == null) {
|
||||
@@ -85,7 +81,7 @@ public record CorsSettings(
|
||||
|
||||
private static IllegalArgumentException notAnOrigin(String origin) {
|
||||
return new IllegalArgumentException(
|
||||
"APP_SECURITY_CORS_ORIGINS (ca-skeleton.cors.allowed-origins) entry \""
|
||||
"APP_SECURITY_CORS_ORIGINS (app.cors.allowed-origins) entry \""
|
||||
+ origin
|
||||
+ "\" must be exactly scheme://host[:port] with http or https: no path, trailing"
|
||||
+ " slash, query, fragment, user info, wildcard host or \"null\"");
|
||||
|
||||
+2
-4
@@ -4,10 +4,8 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* Bound from {@code ca-skeleton.presentation.*}. See README for the validation-policy rationale.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "ca-skeleton.presentation")
|
||||
/** Bound from {@code app.presentation.*}. See README for the validation-policy rationale. */
|
||||
@ConfigurationProperties(prefix = "app.presentation")
|
||||
public record PresentationSettings(String apiBasePath) {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PresentationSettings.class);
|
||||
|
||||
+3
-4
@@ -7,10 +7,9 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.bind.ConstructorBinding;
|
||||
|
||||
/**
|
||||
* Exclusive JWT or Redis-backed browser-session security policy bound from {@code
|
||||
* ca-skeleton.security.*}.
|
||||
* Exclusive JWT or Redis-backed browser-session security policy bound from {@code app.security.*}.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "ca-skeleton.security")
|
||||
@ConfigurationProperties(prefix = "app.security")
|
||||
public record SecuritySettings(
|
||||
AuthenticationMode authMode,
|
||||
String issuerUri,
|
||||
@@ -30,7 +29,7 @@ public record SecuritySettings(
|
||||
this.authMode = authMode == null ? AuthenticationMode.JWT : authMode;
|
||||
if (this.authMode == AuthenticationMode.JWT && (issuerUri == null || issuerUri.isBlank())) {
|
||||
throw new IllegalArgumentException(
|
||||
"APP_SECURITY_JWT_ISSUER (ca-skeleton.security.issuer-uri) is required");
|
||||
"APP_SECURITY_JWT_ISSUER (app.security.issuer-uri) is required");
|
||||
}
|
||||
this.issuerUri = issuerUri == null ? "" : issuerUri.trim();
|
||||
if (audience == null) {
|
||||
|
||||
+12
-12
@@ -167,18 +167,18 @@ class CorsSecurityFilterIntegrationTest {
|
||||
boolean enabled, String origin, boolean credentials, ThrowingConsumer<MockMvc> assertion) {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=jwt",
|
||||
"ca-skeleton.security.issuer-uri=https://issuer.example.test",
|
||||
"ca-skeleton.security.audience=ca-skeleton-api",
|
||||
"ca-skeleton.security.public-paths=/public",
|
||||
"ca-skeleton.cors.enabled=" + enabled,
|
||||
"ca-skeleton.cors.allowed-origins[0]=" + origin,
|
||||
"ca-skeleton.cors.allowed-methods[0]=GET",
|
||||
"ca-skeleton.cors.allowed-methods[1]=POST",
|
||||
"ca-skeleton.cors.allowed-headers[0]=X-Request-ID",
|
||||
"ca-skeleton.cors.allowed-headers[1]=Content-Type",
|
||||
"ca-skeleton.cors.allow-credentials=" + credentials,
|
||||
"ca-skeleton.cors.max-age-seconds=600")
|
||||
"app.security.auth-mode=jwt",
|
||||
"app.security.issuer-uri=https://issuer.example.test",
|
||||
"app.security.audience=ca-skeleton-api",
|
||||
"app.security.public-paths=/public",
|
||||
"app.cors.enabled=" + enabled,
|
||||
"app.cors.allowed-origins[0]=" + origin,
|
||||
"app.cors.allowed-methods[0]=GET",
|
||||
"app.cors.allowed-methods[1]=POST",
|
||||
"app.cors.allowed-headers[0]=X-Request-ID",
|
||||
"app.cors.allowed-headers[1]=Content-Type",
|
||||
"app.cors.allow-credentials=" + credentials,
|
||||
"app.cors.max-age-seconds=600")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
+5
-5
@@ -259,11 +259,11 @@ class JwtJwksSecurityFilterIntegrationTest {
|
||||
private void withContext(OidcServer issuer, ThrowingConsumer<MockMvc> assertion) {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=jwt",
|
||||
"ca-skeleton.security.issuer-uri=" + issuer.issuer(),
|
||||
"ca-skeleton.security.audience=" + AUDIENCE,
|
||||
"ca-skeleton.security.public-paths=/public",
|
||||
"ca-skeleton.cors.enabled=false")
|
||||
"app.security.auth-mode=jwt",
|
||||
"app.security.issuer-uri=" + issuer.issuer(),
|
||||
"app.security.audience=" + AUDIENCE,
|
||||
"app.security.public-paths=/public",
|
||||
"app.cors.enabled=false")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
+7
-8
@@ -23,8 +23,7 @@ class RedisSessionWebConfigTest {
|
||||
void jwtModeCreatesNoSessionFilterOrCookieSerializer() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=jwt",
|
||||
"ca-skeleton.security.issuer-uri=https://issuer.example")
|
||||
"app.security.auth-mode=jwt", "app.security.issuer-uri=https://issuer.example")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -39,12 +38,12 @@ class RedisSessionWebConfigTest {
|
||||
.withBean(
|
||||
MapSessionRepository.class, () -> new MapSessionRepository(new ConcurrentHashMap<>()))
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=redis-session",
|
||||
"ca-skeleton.security.session.cookie-name=APP_SESSION",
|
||||
"ca-skeleton.security.session.secure=true",
|
||||
"ca-skeleton.security.session.http-only=true",
|
||||
"ca-skeleton.security.session.same-site=Strict",
|
||||
"ca-skeleton.security.session.path=/")
|
||||
"app.security.auth-mode=redis-session",
|
||||
"app.security.session.cookie-name=APP_SESSION",
|
||||
"app.security.session.secure=true",
|
||||
"app.security.session.http-only=true",
|
||||
"app.security.session.same-site=Strict",
|
||||
"app.security.session.path=/")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
+16
-16
@@ -53,9 +53,9 @@ class SecurityModeWebContractTest {
|
||||
void redisSessionModeEnablesCsrfAndRotatesAnAuthenticatedSessionIdentifier() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=redis-session",
|
||||
"ca-skeleton.security.public-paths=/probe,/csrf",
|
||||
"ca-skeleton.cors.enabled=false")
|
||||
"app.security.auth-mode=redis-session",
|
||||
"app.security.public-paths=/probe,/csrf",
|
||||
"app.cors.enabled=false")
|
||||
.run(
|
||||
context -> {
|
||||
MockMvc mvc = mvc(context.getBean("springSecurityFilterChain", Filter.class));
|
||||
@@ -96,9 +96,9 @@ class SecurityModeWebContractTest {
|
||||
void redisSessionModeDoesNotCacheUnauthorizedApiRequestsInAFrameworkSessionObject() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=redis-session",
|
||||
"ca-skeleton.security.public-paths=/csrf",
|
||||
"ca-skeleton.cors.enabled=false")
|
||||
"app.security.auth-mode=redis-session",
|
||||
"app.security.public-paths=/csrf",
|
||||
"app.cors.enabled=false")
|
||||
.run(
|
||||
context -> {
|
||||
MockMvc mvc = mvc(context.getBean("springSecurityFilterChain", Filter.class));
|
||||
@@ -117,9 +117,9 @@ class SecurityModeWebContractTest {
|
||||
void redisSessionSecurityFilterPersistsAndRestoresOnlyThePrimitiveAuthenticationSnapshot() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=redis-session",
|
||||
"ca-skeleton.security.public-paths=/login-test,/csrf",
|
||||
"ca-skeleton.cors.enabled=false")
|
||||
"app.security.auth-mode=redis-session",
|
||||
"app.security.public-paths=/login-test,/csrf",
|
||||
"app.cors.enabled=false")
|
||||
.run(
|
||||
context -> {
|
||||
MockMvc mvc = mvc(context.getBean("springSecurityFilterChain", Filter.class));
|
||||
@@ -155,10 +155,10 @@ class SecurityModeWebContractTest {
|
||||
void jwtModeRemainsCsrfDisabledAndStateless() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=jwt",
|
||||
"ca-skeleton.security.issuer-uri=https://issuer.example",
|
||||
"ca-skeleton.security.public-paths=/probe",
|
||||
"ca-skeleton.cors.enabled=false")
|
||||
"app.security.auth-mode=jwt",
|
||||
"app.security.issuer-uri=https://issuer.example",
|
||||
"app.security.public-paths=/probe",
|
||||
"app.cors.enabled=false")
|
||||
.run(
|
||||
context -> {
|
||||
MockMvc mvc = mvc(context.getBean("springSecurityFilterChain", Filter.class));
|
||||
@@ -175,9 +175,9 @@ class SecurityModeWebContractTest {
|
||||
void anUnauthenticatedRejectionCarriesTheAssignedRequestIdInItsMeta() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=jwt",
|
||||
"ca-skeleton.security.issuer-uri=https://issuer.example",
|
||||
"ca-skeleton.cors.enabled=false")
|
||||
"app.security.auth-mode=jwt",
|
||||
"app.security.issuer-uri=https://issuer.example",
|
||||
"app.cors.enabled=false")
|
||||
.run(
|
||||
context -> {
|
||||
// given: the request-id filter sits in front of Spring Security, as registered
|
||||
|
||||
+4
-4
@@ -14,8 +14,8 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* Binding test for {@link RolePermissionPolicy} (AGENTS.md §설정과 런타임: every new
|
||||
* {@code @ConfigurationProperties} class gets a binding test). Verifies the {@code
|
||||
* ca-skeleton.authz.role-permissions.<role>=<comma list>} YAML/env shape binds to the {@code
|
||||
* Map<String, List<String>>} the registry consumes, and that an absent block is null-safe.
|
||||
* app.authz.role-permissions.<role>=<comma list>} YAML/env shape binds to the {@code Map<String,
|
||||
* List<String>>} the registry consumes, and that an absent block is null-safe.
|
||||
*/
|
||||
class RolePermissionPolicyTest {
|
||||
|
||||
@@ -26,8 +26,8 @@ class RolePermissionPolicyTest {
|
||||
void bindsRoleToPermissionLists() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.authz.role-permissions.user=worklog:read,worklog:write",
|
||||
"ca-skeleton.authz.role-permissions.admin=worklog:read,worklog:write,worklog:close")
|
||||
"app.authz.role-permissions.user=worklog:read,worklog:write",
|
||||
"app.authz.role-permissions.admin=worklog:read,worklog:write,worklog:close")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
excludeAutoConfiguration = SecurityAutoConfiguration.class)
|
||||
@ImportAutoConfiguration(WebMvcPlatformAutoConfiguration.class)
|
||||
@Import(RequestBodyBoundaryTest.Probe.class)
|
||||
@TestPropertySource(properties = "backend.web.mvc.max-json-body-size=64B")
|
||||
@TestPropertySource(properties = "app.web.mvc.max-json-body-size=64B")
|
||||
class RequestBodyBoundaryTest {
|
||||
|
||||
@Autowired MockMvc mvc;
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class WebMvcPlatformAutoConfigurationTest {
|
||||
@DisplayName("enabled=false turns everything off")
|
||||
void enabledFalseTurnsEverythingOff() {
|
||||
servlet
|
||||
.withPropertyValues("backend.web.mvc.enabled=false")
|
||||
.withPropertyValues("app.web.mvc.enabled=false")
|
||||
.run(
|
||||
context ->
|
||||
assertThat(context)
|
||||
|
||||
+20
-20
@@ -31,10 +31,10 @@ class CorsSettingsTest {
|
||||
void allowedMethodsAndHeadersMissingDefaultToApiFriendlyValues() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.cors.enabled=true",
|
||||
"ca-skeleton.cors.allowed-origins=http://localhost:3000",
|
||||
"ca-skeleton.cors.allow-credentials=true",
|
||||
"ca-skeleton.cors.max-age-seconds=3600")
|
||||
"app.cors.enabled=true",
|
||||
"app.cors.allowed-origins=http://localhost:3000",
|
||||
"app.cors.allow-credentials=true",
|
||||
"app.cors.max-age-seconds=3600")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -49,9 +49,9 @@ class CorsSettingsTest {
|
||||
void enabledWithoutOriginsFailsStartup() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.cors.enabled=true",
|
||||
"ca-skeleton.cors.allow-credentials=true",
|
||||
"ca-skeleton.cors.max-age-seconds=3600")
|
||||
"app.cors.enabled=true",
|
||||
"app.cors.allow-credentials=true",
|
||||
"app.cors.max-age-seconds=3600")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasFailed();
|
||||
@@ -64,10 +64,10 @@ class CorsSettingsTest {
|
||||
void negativeMaxAgeFailsStartup() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.cors.enabled=true",
|
||||
"ca-skeleton.cors.allowed-origins=http://localhost:3000",
|
||||
"ca-skeleton.cors.allow-credentials=true",
|
||||
"ca-skeleton.cors.max-age-seconds=-1")
|
||||
"app.cors.enabled=true",
|
||||
"app.cors.allowed-origins=http://localhost:3000",
|
||||
"app.cors.allow-credentials=true",
|
||||
"app.cors.max-age-seconds=-1")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasFailed();
|
||||
@@ -81,10 +81,10 @@ class CorsSettingsTest {
|
||||
// D9 / FETCH-CORS-C3: "*" origin + credentials=true is forbidden and must fail fast.
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.cors.enabled=true",
|
||||
"ca-skeleton.cors.allowed-origins=*",
|
||||
"ca-skeleton.cors.allow-credentials=true",
|
||||
"ca-skeleton.cors.max-age-seconds=600")
|
||||
"app.cors.enabled=true",
|
||||
"app.cors.allowed-origins=*",
|
||||
"app.cors.allow-credentials=true",
|
||||
"app.cors.max-age-seconds=600")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasFailed();
|
||||
@@ -98,10 +98,10 @@ class CorsSettingsTest {
|
||||
// A wildcard origin is fine as long as credentials are not also enabled.
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.cors.enabled=true",
|
||||
"ca-skeleton.cors.allowed-origins=*",
|
||||
"ca-skeleton.cors.allow-credentials=false",
|
||||
"ca-skeleton.cors.max-age-seconds=600")
|
||||
"app.cors.enabled=true",
|
||||
"app.cors.allowed-origins=*",
|
||||
"app.cors.allow-credentials=false",
|
||||
"app.cors.max-age-seconds=600")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -112,7 +112,7 @@ class CorsSettingsTest {
|
||||
@Test
|
||||
void disabledWithoutOriginsIsAllowed() {
|
||||
runner
|
||||
.withPropertyValues("ca-skeleton.cors.enabled=false", "ca-skeleton.cors.max-age-seconds=0")
|
||||
.withPropertyValues("app.cors.enabled=false", "app.cors.max-age-seconds=0")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class PresentationSettingsTest {
|
||||
@Test
|
||||
void validApiBasePathBindsAsIs() {
|
||||
runner
|
||||
.withPropertyValues("ca-skeleton.presentation.api-base-path=/api")
|
||||
.withPropertyValues("app.presentation.api-base-path=/api")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -41,7 +41,7 @@ class PresentationSettingsTest {
|
||||
@Test
|
||||
void noLeadingSlashWarnsAndPrepends(CapturedOutput output) {
|
||||
runner
|
||||
.withPropertyValues("ca-skeleton.presentation.api-base-path=api")
|
||||
.withPropertyValues("app.presentation.api-base-path=api")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
+9
-10
@@ -31,8 +31,7 @@ class SecuritySettingsTest {
|
||||
@Test
|
||||
void audienceMissingWarnsAndDefaultsToEmpty(CapturedOutput output) {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.issuer-uri=http://localhost:8081/realms/ca-skeleton")
|
||||
.withPropertyValues("app.security.issuer-uri=http://localhost:8081/realms/ca-skeleton")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -45,9 +44,9 @@ class SecuritySettingsTest {
|
||||
void publicPathsBindAsList() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.issuer-uri=http://localhost:8081/realms/ca-skeleton",
|
||||
"ca-skeleton.security.audience=ca-skeleton-api",
|
||||
"ca-skeleton.security.public-paths=/api/healthcheck,/api/docs/**")
|
||||
"app.security.issuer-uri=http://localhost:8081/realms/ca-skeleton",
|
||||
"app.security.audience=ca-skeleton-api",
|
||||
"app.security.public-paths=/api/healthcheck,/api/docs/**")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -72,11 +71,11 @@ class SecuritySettingsTest {
|
||||
void redisSessionModeDoesNotRequireJwtAndBindsSecureHostOnlyCookiePolicy() {
|
||||
runner
|
||||
.withPropertyValues(
|
||||
"ca-skeleton.security.auth-mode=redis-session",
|
||||
"ca-skeleton.security.session.cookie-name=APP_SESSION",
|
||||
"ca-skeleton.security.session.secure=true",
|
||||
"ca-skeleton.security.session.http-only=true",
|
||||
"ca-skeleton.security.session.same-site=Strict")
|
||||
"app.security.auth-mode=redis-session",
|
||||
"app.security.session.cookie-name=APP_SESSION",
|
||||
"app.security.session.secure=true",
|
||||
"app.security.session.http-only=true",
|
||||
"app.security.session.same-site=Strict")
|
||||
.run(
|
||||
context -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
|
||||
@@ -14,7 +14,7 @@ server:
|
||||
error:
|
||||
include-stacktrace: never
|
||||
include-message: never
|
||||
backend:
|
||||
app:
|
||||
web:
|
||||
mvc:
|
||||
enabled: true
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/** WebSocket (STOMP) settings bound from {@code app.websocket.*}. */
|
||||
@ConfigurationProperties(prefix = "app.websocket")
|
||||
@ConfigurationProperties(prefix = "app.websocket", ignoreUnknownFields = false)
|
||||
@Validated
|
||||
public class WebSocketSettings {
|
||||
|
||||
|
||||
+15
@@ -2,6 +2,7 @@ package dev.caskeleton.adapter.inbound.websocket.stomp;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
@@ -28,6 +29,20 @@ class WebSocketSettingsTest {
|
||||
assertThat(WebSocketSettings.class).hasAnnotation(Validated.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("app.websocket 아래 오타 키는 기동을 실패시킨다")
|
||||
void aMisspelledWebSocketKeyFailsStartup() {
|
||||
// when
|
||||
runner
|
||||
.withPropertyValues("app.websocket.endpont=/live/ws")
|
||||
.run(
|
||||
context -> {
|
||||
// then
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context.getStartupFailure()).hasStackTraceContaining("endpont");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void enabledSafeSettingsBind() {
|
||||
runner
|
||||
|
||||
@@ -40,7 +40,7 @@ runtimeOnly project(':adapter:outbound:cache-redis') // brings :adapter:outbou
|
||||
those are is this module's `RedisCorrectnessRoleSelectors`, registered in the same file as the
|
||||
runtime's `RedisCorrectnessRequirement` — the runtime asks, it does not list selectors;
|
||||
- the shipped settings `config/module-defaults/cache-redis.yml` — `app.redis.enabled`,
|
||||
`app.rate-limit.*`, and the Redis parts of `ca-skeleton.capabilities.*` (cache, lease, rate-limit,
|
||||
`app.rate-limit.*`, and the Redis parts of `app.capabilities.*` (cache, lease, rate-limit,
|
||||
the Redis idempotency store's tuning). The support leaf's `ModuleDefaultsEnvironmentPostProcessor`
|
||||
loads it below every application setting.
|
||||
|
||||
@@ -65,14 +65,14 @@ Redis is on when this module is present. It has one off switch:
|
||||
|
||||
A semantic role does **not** activate Redis by itself: with the switch off this module
|
||||
contributes no bean at all, whatever a role selector says. Redis idempotency refuses
|
||||
`ca-skeleton.capabilities.idempotency.key-version` other than 1 at startup (no dual-read yet).
|
||||
`app.capabilities.idempotency.key-version` other than 1 at startup (no dual-read yet).
|
||||
|
||||
Current role selectors are:
|
||||
|
||||
- cache: `ca-skeleton.capabilities.cache.bindings.default=redis`
|
||||
- rate limit: `ca-skeleton.capabilities.rate-limit.provider=redis`
|
||||
- lease: `ca-skeleton.capabilities.lease.provider=redis`
|
||||
- idempotency: `ca-skeleton.capabilities.idempotency.provider=redis`
|
||||
- cache: `app.capabilities.cache.bindings.default=redis`
|
||||
- rate limit: `app.capabilities.rate-limit.provider=redis`
|
||||
- lease: `app.capabilities.lease.provider=redis`
|
||||
- idempotency: `app.capabilities.idempotency.provider=redis`
|
||||
|
||||
Only selected capabilities contribute their application port bean.
|
||||
|
||||
@@ -182,7 +182,7 @@ The Redis idempotency adapter stores owner-safe claim state and executes claim/t
|
||||
programs atomically. `RedisIdempotencyConfig` contributes only the `IdempotencyStorePort`; the
|
||||
`IdempotencyExecutor` and its lifecycle policy (lease, replay TTL, retention, codec id, policy
|
||||
revision) come from app-bootstrap `IdempotencySettings`. This leaf reads only `key-version` and
|
||||
`command-timeout` under `ca-skeleton.capabilities.idempotency`.
|
||||
`command-timeout` under `app.capabilities.idempotency`.
|
||||
|
||||
Redis `TIME` determines lease deadlines. A failure after a command may have executed is returned
|
||||
as an indeterminate outcome; the adapter does not convert an ambiguous write into a clean
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user