Add integration tests for CIMD embedded auth server support#5379
Draft
amirejaz wants to merge 1 commit into
Draft
Add integration tests for CIMD embedded auth server support#5379amirejaz wants to merge 1 commit into
amirejaz wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## cimd-phase2-pr3-wiring #5379 +/- ##
==========================================================
+ Coverage 68.77% 68.80% +0.03%
==========================================================
Files 627 627
Lines 63625 63629 +4
==========================================================
+ Hits 43759 43783 +24
+ Misses 16612 16593 -19
+ Partials 3254 3253 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Four integration tests that exercise the CIMD flow end-to-end against a real EmbeddedAuthServer instance: - Discovery advertises client_id_metadata_document_supported when CIMD is enabled, and omits the flag when disabled - Authorize accepts a CIMD URL as client_id and redirects to the upstream IDP without any prior DCR registration call - Authorize rejects a CIMD URL when CIMD is disabled - No DCR call is required — CIMD resolves the client on the fly Also adds a WithCIMD functional option to the integration test helper. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
91b1244 to
d27bbf5
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.
Summary
test/integration/authserver/that exercise the CIMD feature end-to-end against a realEmbeddedAuthServerinstance — no mocks, no binary required:client_id_metadata_document_supported: trueappears in both/.well-known/oauth-authorization-serverand/.well-known/openid-configurationwhen CIMD is enabled; absent when disabled/oauth/authorizewith a CIMD URL asclient_idredirects to the upstream IDP without prior DCR registration/oauth/register, proving on-the-fly client resolution worksAlso adds
WithCIMDfunctional option to the integration test helper intest/integration/authserver/helpers/authserver.go.Type of change
Test plan
go test ./test/integration/authserver/...passestask lint-fixcleanGenerated with Claude Code