Skip to content

Conversation

@chrisingenhaag
Copy link
Member

@chrisingenhaag chrisingenhaag commented Dec 5, 2025

  • add proper kid based single validation for the correct public key instead of trying all available public keys
  • if kid is missing, search for unique match of alg for validation
  • else fail

Implements fallback key selection based on JWT algorithm and key metadata when kid header is missing. Plugin now attempts to find a single unambiguous matching key by comparing JWT algorithm (RS256/384/512, PS256/384/512, ES256/384/512) with key metadata (alg, kty, use). Rejects tokens when multiple keys match or no matching key is found. Adds key_metadata tracking throughout the key retrieval chain and comprehensive test coverage for various
Defines kong-net bridge network and assigns all services to it for improved network isolation and DNS resolution. Adds diagnostic network connectivity test script that validates DNS resolution for kong, kc, and httpbin services during test initialization.
Adds Docker version information output and failure diagnostics that display container status and logs for kong, keycloak, and test services when tests fail. Improves troubleshooting capabilities for CI test failures.
Registers the new validators.signature module in the rockspec build modules list and aligns formatting of validator module entries for consistency.
@chrisingenhaag chrisingenhaag marked this pull request as ready for review December 11, 2025 07:24
Copy link

@luispflamminger luispflamminger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a couple of comments, mostly for better understanding on my side :)

Co-authored-by: Luis Pflamminger <luis.pflamminger@gmail.com>
Removes key type (kty) field from key metadata tracking and eliminates kty-based key matching logic. Simplifies algorithm validation to only check explicit alg field matches when present. Updates test descriptions to reflect that keys match when no alg is specified rather than matching by kty. Removes PS256 algorithm test and kid-optional integration test notes that are now covered by unit tests.
@chrisingenhaag chrisingenhaag merged commit ae1023f into main Dec 12, 2025
26 checks passed
@chrisingenhaag chrisingenhaag deleted the fix/properValidation branch December 12, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants