Files
Mauricio Harley f9a4a551f5 Make JWT token signing algorithm configurable
The JWS token provider hardcodes ES256 (ECDSA P-256) for signing and
verifying tokens. This prevents operators from selecting stronger or
more appropriate algorithms without modifying the source code, and
blocks a future migration path to post-quantum algorithms like ML-DSA.

Add two new configuration options under [jwt_tokens]:

- jws_algorithm: selects the signing algorithm (ES256, ES384, ES512,
  or EdDSA). Default is ES256 for backward compatibility.
- jws_accepted_algorithms: list of algorithms accepted during token
  validation, enabling a migration window where tokens signed with a
  previous algorithm remain valid until they expire.

The keystone-manage create_jws_keypair command now generates the key
type that matches the configured algorithm.

Also fix _decode_token_from_id to pass algorithms as a list instead
of a string, and to catch InvalidKeyError and InvalidAlgorithmError
when iterating public keys of mixed types during algorithm migration.

Change-Id: Id97bb3152d4363c607aaac35b6c8f6628fa125d2
Signed-off-by: Mauricio Harley <mharley@redhat.com>
2026-04-17 10:37:21 +00:00
..
2024-10-30 19:11:22 +00:00
2015-03-27 02:16:02 +00:00
2025-05-28 11:55:35 +02:00
2024-10-30 19:11:22 +00:00
2024-08-22 18:58:44 +02:00
2024-10-30 19:11:22 +00:00