Integration Tests for Embedded Auth Server#3556
Conversation
There was a problem hiding this comment.
Large PR Detected
This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.
How to unblock this PR:
Add a section to your PR description with the following format:
## Large PR Justification
[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformationAlternative:
Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.
See our Contributing Guidelines for more details.
This review will be automatically dismissed once you add the justification section.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3556 +/- ##
========================================
Coverage 65.53% 65.54%
========================================
Files 405 408 +3
Lines 39678 40248 +570
========================================
+ Hits 26004 26379 +375
- Misses 11672 11808 +136
- Partials 2002 2061 +59 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6f55550 to
9db2809
Compare
9db2809 to
9c94f75
Compare
|
✅ Large PR justification has been provided. The size review has been dismissed and this PR can now proceed with normal review. |
Large PR justification has been provided. Thank you!
- Avoid `require` in helper functions for go-routine safety (thus did not add `c.tb.Helper()` to helpers) - use `bytes.NewReader` - remove README - remove unused helper function
Depends on #3541
Summary
Adds integration tests for the embedded authorization server to ensure OAuth/OIDC endpoints work correctly when integrated with the proxy runner and operate alongside MCP endpoints without conflict.
Related Issue: stacklok/stacklok-epics#234
Why This Change
The embedded auth server is a critical component that enables MCP clients to authenticate using standard OAuth 2.0 flows. Without integration tests, we risk:
What's Tested
OAuth/OIDC Compliance
Runner Integration
Configuration Validation
Test Approach
Tests use a mock upstream IDP rather than real OAuth providers to:
Files Changed
+1,406 lines across 6 new files
Large PR Justification