refactor(oapi): 提供方强制验签迁 starter——enforce-patterns+trust-registry(审计 P1-6 / L2-8)
build / build-push (push) Successful in 1m25s

- 删自写 svcitem/config/OpenApiAuthEnforceConfiguration(yh-app-auth starter 版
  RequireAppSignFilter 承接,order+11 行为等价;/oapi/site/list 面无签名即 401)
- yh.app-auth.server.enforce-patterns=[/oapi/*] + trust-registry=true(中央密钥链组合:
  trusted-apps 100018 先、Redis sign:app:* 链后,Notice/flow-center 同款)
- data-redis 自 test scope 提升编译期(yh-app-auth 侧 optional 不传递,生产 classpath
  此前并无该依赖);management.health.redis.enabled=false 防 Redis 抖动拉 DOWN 健康
- 测试 yml 同步 enforce-patterns:删自写副本后 SiteOapiIT 的 /oapi/** 401 断言由
  starter 过滤器承接;trust-registry 不进测试配置(IT 密封性,签名用例 100018 走
  trusted-apps 命中)

门禁:mvn test -Dskip.tests=false 413/413 绿(含 SiteOapiIT 6/6,本机 MySQL8+Redis)
This commit is contained in:
chenxing
2026-10-05 22:26:44 +08:00
parent 55d80e21a4
commit ed0c752f4a
4 changed files with 31 additions and 53 deletions
+5 -2
View File
@@ -103,11 +103,14 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 单测专用:验证方案 §12「缓存切 Redis 仅改配置」的演进承诺(生产仍为 Caffeine,零影响) -->
<!-- 入站验签走中央密钥链(注册表模式 yh.app-auth.trust-registry)必须编译期引入 data-redis:
yh-app-auth 的该依赖是 optional、不传递(Notice/flow-center/svc-hall 同款,2026-10-05 自
test scope 提升)。副作用是 RedisHealthIndicator 会被装配,故 yml 里关掉
management.health.redis.enabled,防 Redis 抖动把 /actuator/health 拉成 DOWN(503)。
RedisCacheEvolutionIT(缓存演进验证)继续复用本依赖。 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<scope>test</scope>
</dependency>
</dependencies>