Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enable/disable deploying in-memory JWKS Api and Fix block subscription for production only bug #12718

Merged
merged 6 commits into from
Dec 6, 2024

Conversation

nisan-abeywickrama
Copy link
Contributor

@nisan-abeywickrama nisan-abeywickrama commented Dec 6, 2024

Purpose

Implementation

  • Add EnableJWKSApi configuration constant to enable/disable JWKS Api
  • Using the set configuration value check the condition if to deploy the JWKS Api
  • Add default value to EnableJWKSApi configuration in amConfig.xml
  • Mock the method call chain in DefaultAPIHandlerTest to retrieve the above configuration value using the method isJWKSApiEnabled
  • Pass keyType to AbstractKeyValidationHandler from GatewayUtils through the value extracted from the API key payload to fix the 'block subscription for production only' applying to sandbox API key.

Additional Notes

  • This PR includes a fix for an intermittent failure in testGetAPIRevisionDeploymentsByWorkflowStatusAndApiUUID unit test
  • The failure occurs due to the expected order with testUpdateAPIRevisionDeploymentStatus test where the above test case should run before this (JUnit does not run test cases in the order of the code written [1]).
  • To fix this issue, these two test cases were combined to a single test case

[1] - https://junit.org/junit5/docs/current/user-guide/#writing-tests-test-execution-order

@AnuGayan AnuGayan merged commit 93629d3 into wso2:master Dec 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants