Repository navigation
Conversation
This was referenced Dec 4, 2026
There was a problem hiding this comment.
Code Review
This pull request introduces a single-value in-memory TTL cache (TtlCache) and a new handler (JwksHandler) to serve active Ed25519 JWKS public keys from Cloud KMS at GET /api/v1/jwks. It also updates the local development server and adds comprehensive unit tests. The review feedback highlights two valuable improvements: first, caching the null state when no keys are configured to prevent potential rate-limiting and high latency on Cloud KMS; second, handling individual key-loading errors gracefully in _fetchJwksJson so that a single bad key version does not cause the entire JWKS endpoint to fail.
This was referenced Dec 4, 2026
ievdokdm
force-pushed
the
197798-3-dummy-ci-kms-config
branch
from
December 4, 2026 00:37
76b9f4a to
6f96dd5
Compare
ievdokdm
force-pushed
the
197798-4-dummy-ci-jwks-endpoint
branch
from
December 4, 2026 00:37
c1dbd8a to
d8fdd6f
Compare
ievdokdm
force-pushed
the
197798-4-dummy-ci-jwks-endpoint
branch
from
December 4, 2026 01:07
d8fdd6f to
4cc5cc9
Compare
ievdokdm
force-pushed
the
197798-3-dummy-ci-kms-config
branch
from
December 4, 2026 01:07
6f96dd5 to
037a6f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
GET /api/v1/jwks, single-flight TTL caching, server wiring, and a standalone local dev server todummy_ci, mirroring Cocoon PR #5198.Summary
dummy_ci/lib/src/cache/ttl_cache.dart(TtlCache<V>with injectable clock, single-flight coalescing, and non-caching of errors/empty states).dummy_ci/lib/src/handlers/jwks_handler.dartserving activeENABLEDEC_SIGN_ED25519public keys from Cloud KMS withCache-Control: public, max-age=300,kiddeduplication,503when unconfigured/empty, and500on KMS failures.DummyCiConfig,CloudKmsService, andGET /api/v1/jwksindummy_ci/lib/src/server.dartanddummy_ci/bin/server.dart.dummy_ci/tool/local_server.dartpreloaded withFakeCloudKmsServiceand the RFC 8037 Appendix A.1 test key.test/cache/ttl_cache_test.dart,test/handlers/jwks_handler_test.dart, and expandstest/server_test.dart.Stack
dummy_ciCloud Run app, Dockerfile, and CIEd25519PublicJwkmodel and SPKI PEM/JWK parserCloudKmsService,FakeCloudKmsService, andDummyCiConfigGET /api/v1/jwksendpoint, server wiring, and local dev serverPOST /webhookGET /statusAPI and mockGET /logsendpointPOST /complete-runworker, OIDC auth, Ed25519 KMS signer, and Cocoon callbackTesting
dart pub get,dart format --set-exit-if-changed .,dart analyze --fatal-infos,dart test --test-randomize-ordering-seed=random --reporter expandeddart compile exe bin/server.dartdart --enable-asserts analyze.dartanddart run dev/cocoon_code_health/bin/check.dartTowards flutter/flutter#197798