Changelog - 2026-08-19
Service-to-service authentication, phase 1
New Feature Security Enhancement Breaking ChangeIn one line. A route can name any authentication strategy you register, and a JWT can now say who issued it and who it is for.
// The strategy name is yours. No cast.
@get({ path: '/orders', authenticate: { strategies: ['service'] } })
// The issuer stamps who it is, and who the token is for.
jwtOptions: {
standard: 'JWKS',
options: { mode: 'issuer', sign: { issuer: 'identity', audience: 'inventory' }, /* ... */ },
}
// The verifier refuses anything not addressed to it.
jwtOptions: {
standard: 'JWKS',
options: { mode: 'verifier', verify: { audience: 'inventory', maxTokenAge: '60 seconds' }, /* ... */ },
}What changed
TAuthStrategyaccepts any registered name.'jwt'and'basic'still autocomplete; anything you register withAuthenticationStrategyRegistrytypechecks without a cast.- A misspelled strategy is reported at boot, at error level, naming both the typo and what was registered.
verifychecks claims:audience,issuer,subject,algorithms,clockTolerance,maxTokenAge,typandrequiredClaims, passed straight to jose.signstamps claims, andgenerate({ payload, claims })sets per-tokenaud,subandjti.securitySchemeson the API reference, so a route naming your strategy publishes a valid OpenAPI document.AuthenticationStrategyRegistry.has(),.getNames(),.findUnregistered()and.assertRegistered()for your own startup checks.
Who is affected
- Anyone registering a custom strategy. The cast at every route goes away. Declare a
securitySchemesentry for your strategy name, or your OpenAPI document names a scheme it never declares. - Anyone running more than one service off one issuer. Set
verify.audience. Without it, a token minted for one service is accepted by every other. - Anyone importing a deprecated alias or any
Swagger*symbol. They are removed. See Breaking changes. - Everyone else. No action needed. Every new option is optional, and unset means today's behaviour.
Breaking changes
The deprecated Swagger* aliases are removed
| Removed | Use instead |
|---|---|
SwaggerComponent | ApiReferenceComponent |
ISwaggerOptions | IApiReferenceOptions |
SwaggerBindingKeys.SWAGGER_OPTIONS | ApiReferenceBindingKeys.API_REFERENCE_OPTIONS |
// Before
import { ISwaggerOptions, SwaggerBindingKeys, SwaggerComponent } from '@venizia/ignis';
this.bind<ISwaggerOptions>({ key: SwaggerBindingKeys.SWAGGER_OPTIONS }).toValue({ /* ... */ });
this.component(SwaggerComponent);
// After
import { ApiReferenceBindingKeys, ApiReferenceComponent, IApiReferenceOptions } from '@venizia/ignis';
this.bind<IApiReferenceOptions>({ key: ApiReferenceBindingKeys.API_REFERENCE_OPTIONS }).toValue({ /* ... */ });
this.component(ApiReferenceComponent);It is a rename only. SwaggerBindingKeys.SWAGGER_OPTIONS always held the same '@app/api-reference/options' string, so no binding moves.
Every deprecated alias is removed
| Removed | Use instead | Package |
|---|---|---|
QueueHelper | SequentialQueueHelper | helpers |
TNodePostgresConnector | TRelationalConnector | connectors |
TNodePostgresTransactionConnector | TRelationalConnector | connectors |
A configured iss / aud now wins over the payload
WARNING
Only for applications that already smuggle iss or aud through the token payload.
A configured sign.issuer or sign.audience overrides a claim of the same name on the payload, and logs a warning when it does. With sign unset, tokens are unchanged.
Before - the payload was the only way to set these, and it won:
await tokenService.generate({ payload: { userId, aud: 'inventory' } });After - configure the default, and pass per-token claims explicitly:
// once, in the issuer options
sign: { issuer: 'identity', audience: 'inventory' }
// per token, when it genuinely varies
await tokenService.generate({ payload: { userId }, claims: { audience: 'inventory' } });Details
AuthenticateStrategy.isValidknows only the two built-ins and returnsfalsefor a strategy you registered. Ask the registry instead:
AuthenticationStrategyRegistry.getInstance().has({ name: 'service' });
AuthenticationStrategyRegistry.getInstance().getNames();- Unregistered names are reported, not thrown, while building route configs. An empty
strategiesarray is never reported, since that is howauthenticate: { skip: true }is encoded. For a hard failure, call it in your own startup:
AuthenticationStrategyRegistry.getInstance().assertRegistered({ names: ['service', 'jwt'] });- Audience matching is overlap, not equality. A token with
aud['commerce','inventory']satisfiesverify.audience: 'inventory'. To require single-audience tokens, enforce it when you issue them. maxTokenAgeis the replay window. It caps elapsed time sinceiatregardless ofexp, which the minting side chooses.- Diagnosing a rejection. Every verification failure surfaces as one
TOKEN_INVALID, and the jose error survives oncause, for exampleJWTClaimValidationFailed: unexpected "aud" claim value.