Skip to content

Validate redirect URIs according to OpenID Connect Dynamic Client Registration 1.0 specification#3318

Open
reta wants to merge 3 commits into
apache:mainfrom
reta:validate/redirect.uris
Open

Validate redirect URIs according to OpenID Connect Dynamic Client Registration 1.0 specification#3318
reta wants to merge 3 commits into
apache:mainfrom
reta:validate/redirect.uris

Conversation

@reta

@reta reta commented Jul 19, 2026

Copy link
Copy Markdown
Member

Validate redirect URIs according to OpenID Connect Dynamic Client Registration 1.0 specification

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds redirect URI validation in DynamicRegistrationService intended to align dynamic client registration with the OpenID Connect Dynamic Client Registration 1.0 redirect URI rules, and extends the unit tests to cover newly enforced behaviors.

Changes:

  • Implement redirect URI parsing and validation in DynamicRegistrationService#validateRequestUri.
  • Introduce application-type constants (web/native) and loopback host allowlist handling.
  • Add unit tests covering acceptance/rejection of various redirect URI patterns.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationService.java Adds redirect URI validation logic and new constants to enforce OIDC-aligned constraints.
rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/services/DynamicRegistrationServiceTest.java Adds tests for allowed/rejected redirect URIs across web/native client types and grant types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@reta
reta force-pushed the validate/redirect.uris branch from b105423 to 71060f2 Compare July 19, 2026 16:18
@reta

reta commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

@coheigea please let me know if it looks good to you, thanks!

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