Skip to content

fix(oauth): support RFC 8252 loopback redirect URIs in DCR - #105

Merged
hugoalves-dev merged 4 commits into
mainfrom
fix/dcr-rfc8252-loopback-redirects
Nov 8, 2026
Merged

hugoalves-dev merged 4 commits into
mainfrom
fix/dcr-rfc8252-loopback-redirects

Conversation

@hugoalves-dev

Copy link
Copy Markdown
Owner

Summary

  • Accept HTTPS callbacks and HTTP callbacks only on the exact hosts localhost, 127.0.0.1, and [::1] during anonymous RFC 7591 registration.
  • Allow RFC 8252 ephemeral HTTP loopback port changes during authorization, while requiring the same registered scheme, host, path, and query.
  • Apply the port exception only to DCR-registered public PKCE clients; keep Spring Authorization Server's built-in redirect URI validator for all other clients and continue using its default scope validator.
  • Preserve requireProofKey(true), public client authentication, registration rate limiting, grant and scope handling, and all other OAuth configuration.

Automated coverage

  • Accepted HTTPS, localhost, IPv4, and IPv6 loopback registration callbacks.
  • Rejected external HTTP, lookalike hosts, non-loopback IPv4/IPv6, userinfo, fragments, invalid ports, and non-HTTP schemes.
  • Authorization with an ephemeral localhost/IPv4/IPv6 port.
  • Rejection when host, path, query, or scheme differs; HTTPS callbacks require exact port matches.
  • Confirm DCR clients stay public and have PKCE enabled.

References

Tests are added; CI status must be verified before merging.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@hugoalves-dev
hugoalves-dev merged commit 1fecf64 into main Nov 8, 2026
6 checks passed
@hugoalves-dev
hugoalves-dev deleted the fix/dcr-rfc8252-loopback-redirects branch November 8, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant