fix(auth): explicit nimbus-jose-jwt в ordinis-auth — production crashloop
Найден production-bug на staging: ordinis-app в CrashLoopBackOff с NoClassDefFoundError: com/nimbusds/jose/RemoteKeySourceException. Причина: в Phase 2c e2e тестах я добавил nimbus-jose-jwt 9.37.3 как test-scope direct dependency в ordinis-app/pom.xml. Maven scope resolution: direct test-scope побеждает transitive compile-scope, nimbus исключился из Spring Boot fat jar. На runtime JwtDecoders.fromIssuerLocation() (использует Nimbus internally) падал. Fix: - ordinis-auth/pom.xml: explicit compile-scope dep на nimbus-jose-jwt (раньше тянулся транзитивно через oauth2-resource-server starter) - ordinis-app/pom.xml: убрал test-scope direct decl, JwtTestSupport использует nimbus с compile classpath. Verified: BOOT-INF/lib/nimbus-jose-jwt-9.37.3.jar в fat jar после rebuild. e2e AuthE2ETest всё ещё зелёный (12/12).
This commit is contained in:
+4
-6
@@ -96,12 +96,10 @@
|
||||
<artifactId>awaitility</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<version>9.37.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- nimbus-jose-jwt — на compile classpath через ordinis-auth.
|
||||
Здесь не дублируем (тест-scope direct override compile-transitive
|
||||
и nimbus не попадает в Spring Boot fat jar). -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.liquibase</groupId>
|
||||
<artifactId>liquibase-core</artifactId>
|
||||
|
||||
@@ -31,5 +31,19 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!--
|
||||
Explicit compile-scope: spring-boot-starter-oauth2-resource-server тянет
|
||||
nimbus как transitive compile, но если другой модуль (ordinis-app для
|
||||
e2e тестов) объявил nimbus как test-scope direct dep, Maven исключает
|
||||
его из compile classpath fat jar'а Spring Boot. Объявление здесь
|
||||
гарантирует что nimbus всегда в production jar.
|
||||
Caused: java.lang.NoClassDefFoundError: com/nimbusds/jose/RemoteKeySourceException
|
||||
at JwtDecoders.fromIssuerLocation
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<version>9.37.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user