-
Notifications
You must be signed in to change notification settings - Fork 272
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
Added ability to configure timeout on JWKS endpoints instead of always being 15 seconds #6466
base: dev
Are you sure you want to change the base?
Added ability to configure timeout on JWKS endpoints instead of always being 15 seconds #6466
Conversation
…s being 15 seconds
✅ Docs Preview ReadyNo new or changed pages found. |
CI performance tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you add a changelog and an integration test to show timeout happening?
Make sure to pull before adding an integration test as the API for the integration tester has changed a bit.
I'm struggling a bit with how to test this. I saw some other tests that would in theory be similar (in traffic shaping) and used that as a starting point: #[tokio::test(flavor = "multi_thread")]
async fn test_jwks_timeout() -> Result<(), BoxError> {
let mut router = IntegrationTest::builder()
.config(format!(
r#"
{PROMETHEUS_CONFIG}
authentication:
router:
jwt:
jwks:
- url: https://dev-zzp5enui.us.auth0.com/.well-known/jwks.json
timeout: 1ns
"#
))
.responder(ResponseTemplate::new(500).set_delay(Duration::from_millis(20)))
.build()
.await;
router.start().await;
router.assert_not_started().await;
router.graceful_shutdown().await;
Ok(())
} But it's unclear to me how to specifically simulate the jwks timing out as opposed to a subgraph call, which I think is what the above is doing, and also unclear what I should be asserting, given it will be a startup error and not an error from a subgraph call. I also can't seem to find any existing authentication integration tests either 😓 |
Added ability to configure timeout on JWKS endpoints instead of always being 15 seconds
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩