Repository navigation
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High riskML-DSA JWT verification and PAT rotation change authentication and credential validity; key/JWKS handling errors could reject valid requests or admit invalid tokens. Adds RFC 9964 ML-DSA (ML-DSA-44/65/87) JWT signing-key support alongside RSA RS256, a signing-key health check, 16KiB HTTP header and input buffer defaults, and a VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Issue: pending (per author request, opening as draft before filing a tracking issue).
Adds post-quantum RFC 9964 ML-DSA (
ML-DSA-44,ML-DSA-65,ML-DSA-87) JWT signing-key support alongside existing RSA (RS256) for all OpenMetadata deployments, adds signing-key health diagnostics, raises default HTTP request header/input buffer sizes to16KiB, and extendsopenmetadata-ops.sh regenerate-bot-tokenswith--include-user-tokensto rotate active user Personal Access Tokens alongside bot tokens.Type of change:
High-level design:
JwtSigningKey,MlDsaJwtAlgorithm):JWTTokenGeneratorauto-detects the configured PKCS#8 DER private key and X.509 SPKI DER public key using the Bouncy Castle 1.87 already on the classpath (zero new dependencies, Java 21 compatible).RS256, verifyingRS256/RS384/RS512(preservingADR:2026-11-12), and publishing standardkty: "RSA"JWKs (n,e,alg: "RS256").ML-DSA-44,ML-DSA-65, orML-DSA-87) and publish standard RFC 9964kty: "AKP"JWKs (alg,pub,kid,use) on/api/v1/system/config/jwks.LocalJwkProvider,JwtFilter,BotTokenRegenerator,InternalActionTokenSigner,OpenMetadataOperations.jwksListsKey(), and MCP OpenID discovery (OAuthHttpStatelessServerTransportProvider) all support both RSA and ML-DSA keys.jwtTokenConfiguration&openmetadata-collate):privateKeyFilePath/publicKeyFilePathfields tojwtTokenConfiguration.json(and regeneratedjwtTokenConfiguration.tsandsettings.ts) while keepingrsaprivateKeyFilePath/rsapublicKeyFilePathworking for both RSA and ML-DSA DER files.JWTTokenGenerator.getPublicKey()returningRSAPublicKey(addinggetSigningPublicKey()returningPublicKey) and kept the deprecatedinit(TokenValidationAlgorithm, JWTTokenConfiguration)overload so downstreamopenmetadata-collatebuilds without breaking changes.ADR:2026-11-19: running the shipped defaultconf/private_key.derlogs an error at startup and fails the newSigning Keystep on/api/v1/system/status(never refusing startup). Own RSA keys< 3072bits log a startup warning and report an informational pass.SERVER_MAX_REQUEST_HEADER_SIZEandSERVER_INPUT_BUFFER_SIZEfrom8KiBto16KiBacrossconf/openmetadata.yaml,conf/openmetadata-h2-test.yaml, and local distributed-test server configs so ~5–6.8 KB ML-DSA bearer headers plus browser headers read cleanly without HTTP 431.--include-user-tokens):PersonalAccessTokenRegenerator+ keyset-paginatedTokenDAO.findPageByType+TokenRepository.replacePersonalAccessToken+--include-user-tokens(defaultfalse) onopenmetadata-ops.sh regenerate-bot-tokens.tokenName, owner, and original expiry timestamp (skipping expired/deleted/bot entries and honoring--skip-current), while rotating the internal row UUID soCredentialVerifier's key-id fingerprint invalidates replaced PATs withinmaxStaleness.docs/decisions/2026-12-05-openmetadata-supports-ml-dsa-jwt-signing-keys.mdand updateddocs/jwt-signing-key-rotation.md.conf/openmetadata.yamlheader/input buffer defaults to16KiB)Tests:
Which test layer and why
openmetadata-service,openmetadata-mcp): Exercise real Bouncy Castle ML-DSA-44/65/87 and RSA-2048/3072 keypairs, RFC 9964 JWKS serialization/parsing,JwtFilterlocal verification,InternalActionTokenSigner, signing-key health checks,BotTokenRegenerator,PersonalAccessTokenRegenerator,OpenMetadataOperations.jwksListsKey, and MCP OpenID discovery.openmetadata-integration-tests): Added--include-user-tokenscases toOpsRegenerateBotTokensITto exercise real MySQL/PostgresTokenDAO.findPageByType,TokenRepository.replacePersonalAccessToken,ForkedOperations, and liveCredentialVerifiermaxStalenessconvergence.Use cases covered
RS256(RSA-2048 and RSA-3072) deployments continue signing, publishingkty: "RSA"JWKs, verifying tokens, and rotating bots/PATs without changes.ML-DSA-44,ML-DSA-65, orML-DSA-87DER key pair via eitherprivateKeyFilePath/publicKeyFilePathorrsaprivateKeyFilePath/rsapublicKeyFilePathsigns tokens with RFC 9964alg, publisheskty: "AKP"JWKs, verifies throughJwtFilterandInternalActionTokenSigner, and advertisesML-DSA-*in MCP OpenID discovery.RS256/ML-DSA-87against anML-DSA-65key) are rejected withSignatureVerificationException/AuthenticationException./api/v1/system/statusSigning Keystep; own ML-DSA and RSA-3072+ keys pass cleanly.openmetadata-ops.sh regenerate-bot-tokens --include-user-tokensrotates active user PATs across RSA→ML-DSA, RSA→RSA, and ML-DSA→RSA while preserving original expiry, skipping expired/deleted/bot entries, honoring--skip-current, and rotating row UUIDs so replaced PATs fail withinmaxStaleness.Unit tests
openmetadata-service/src/test/java/org/openmetadata/service/security/jwt/MlDsaJwtSigningTest.java(9/9 passed)openmetadata-service/src/test/java/org/openmetadata/service/security/jwt/PersonalAccessTokenRegeneratorTest.java(6/6 passed)openmetadata-service/src/test/java/org/openmetadata/service/jdbi3/SystemRepositorySigningKeyStatusTest.java(2/2 passed)openmetadata-service/src/test/java/org/openmetadata/service/security/jwt/BotTokenRegeneratorTest.java(11/11 passed)openmetadata-service/src/test/java/org/openmetadata/service/util/OpenMetadataOperationsJwksTest.java(6/6 passed)openmetadata-mcp/src/test/java/org/openmetadata/mcp/server/transport/OAuthHttpStatelessServerTransportProviderTest.java(62/62 passed)JwtFilterTest(131/131),JWTTokenGeneratorTest(25/25),MultiUrlJwkProviderTest(9/9),MintedTokensAreRecognizedTest(5/5),InternalActionTokenSignerTest(3/3) — 269/269 unit tests passed.Backend integration tests
openmetadata-integration-tests/for the new rotation CLI option and DAO/repository paths.openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/OpsRegenerateBotTokensIT.java(compiled cleanly withmvn test-compile; live Docker execution pending before marking ready for review).Focused Java unit tests passed locally (269/269 across 11 test classes in
openmetadata-serviceandopenmetadata-mcp), andopenmetadata-integration-testscompiled cleanly. Live Docker execution ofOpsRegenerateBotTokensIT(make java_affected_run) is pending before marking this PR ready.Ingestion integration tests
make generate ARGS=--python-onlycheck pending).Playwright (UI) tests
jwtTokenConfiguration.tsandsettings.ts).Not applicable — backend security and CLI change only.
Manual testing performed
openssl genpkey -algorithm ML-DSA-65key compatibility with Bouncy Castle 1.87 PKCS#8/SPKI DER loading viaMlDsaJwtSigningTest.scripts/harness/check_decision_records.pyand.github/scripts/plan_local_java_tests.py --check-branchpass cleanly.check json,Google Java Code Style,Decision records) pass on commit.UI screen recording:
Not applicable — backend JWT signing key, health check, and ops CLI change with no UI feature changes.
Checklist:
Fixes <issue-number>: <short explanation>(Draft PR — issue intentionally deferred per author request)Fixes #<issue-number>above. (Draft PR — issue intentionally deferred per author request)jwtTokenConfiguration.json).REVIEW.mdand fixed every 🔴 finding:6d5d575f9e6dd33682b4a9b19484b2082cf2d1a2, fixed all 3 🔴 findings (rotated PAT row UUID forCredentialVerifiermaxStalenessconvergence, addedOpsRegenerateBotTokensITcoverage, fixed tampered-payload test to assertSignatureVerificationException) and both 🟡 findings (sub-second expiry precision and rollback assertions) inc63585f0e35992cbcd6e45bb39755096d335c7c4.JWTTokenGenerator), REST/WS/MCP auth (JwtFilter,LocalJwkProvider),/v1/system/config/jwks, MCP OpenID discovery,/v1/system/status,InternalActionTokenSigner, andopenmetadata-ops.sh regenerate-bot-tokens.CredentialVerifier's 5smaxStalenessbound without dropping the covering index onuser_tokens.c63585f0e35992cbcd6e45bb39755096d335c7c4; runOpsRegenerateBotTokensITand link issue before marking ready.docs/decisions/2026-12-05-openmetadata-supports-ml-dsa-jwt-signing-keys.md.