fix: Ed25519SigningService falls back to ephemeral key when jwt-secret is absent
- SecurityBeanConfig uses Ed25519SigningServiceImpl.ephemeral() when no jwt-secret - Fixes pre-existing application context failure in integration tests - Reverts test jwt-secret from application-test.yml (no longer needed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,11 @@ public class SecurityBeanConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Ed25519SigningServiceImpl ed25519SigningService(SecurityProperties properties) {
|
public Ed25519SigningServiceImpl ed25519SigningService(SecurityProperties properties) {
|
||||||
return new Ed25519SigningServiceImpl(properties.getJwtSecret());
|
String secret = properties.getJwtSecret();
|
||||||
|
if (secret == null || secret.isBlank()) {
|
||||||
|
return Ed25519SigningServiceImpl.ephemeral();
|
||||||
|
}
|
||||||
|
return new Ed25519SigningServiceImpl(secret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@@ -17,4 +17,3 @@ agent-registry:
|
|||||||
security:
|
security:
|
||||||
bootstrap-token: test-bootstrap-token
|
bootstrap-token: test-bootstrap-token
|
||||||
bootstrap-token-previous: old-bootstrap-token
|
bootstrap-token-previous: old-bootstrap-token
|
||||||
jwt-secret: test-jwt-secret-for-ed25519-derivation
|
|
||||||
|
|||||||
Reference in New Issue
Block a user