Skip to content

Add support for ID-JAG authorization grant profile in OIDC metadata - #4677

Merged
sahandilshan merged 1 commit into
thunder-id:mainfrom
sajitha-tj:fix/id-jag-metadata-in-discovery-endpoint
Aug 7, 2026
Merged

Add support for ID-JAG authorization grant profile in OIDC metadata#4677
sahandilshan merged 1 commit into
thunder-id:mainfrom
sajitha-tj:fix/id-jag-metadata-in-discovery-endpoint

Conversation

@sajitha-tj

@sajitha-tj sajitha-tj commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Purpose

Advertise support for the Identity Assertion JWT Authorization Grant (ID-JAG) profile in the OIDC discovery metadata when the JWT Bearer grant type is enabled.

Approach

Adds a new authorization_grant_profiles_supported field to the OIDC provider metadata. The discovery service populates it with urn:ietf:params:oauth:grant-profile:id-jag whenever the JWT Bearer grant type is among the supported grant types; the field is omitted entirely when it isn't.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Summary by CodeRabbit

New Features

  • OIDC and OAuth 2.0 discovery metadata now advertises supported authorization grant profiles.
  • The Identity Assertion JWT Authorization Grant profile is advertised when JWT Bearer grants are enabled.
  • Added the optional authorization_grant_profiles_supported discovery field, which is omitted when unsupported.

Documentation

  • Updated discovery API documentation and examples to include the supported authorization grant profiles field.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b2097a9-016d-47ff-b0fb-940de1b597b2

📥 Commits

Reviewing files that changed from the base of the PR and between 3a8f60b and 1a70151.

📒 Files selected for processing (1)
  • backend/internal/oauth/oauth2/discovery/discovery_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • backend/internal/oauth/oauth2/discovery/discovery_test.go

📝 Walkthrough

Walkthrough

OIDC and OAuth 2.0 discovery metadata now include the ID-JAG authorization grant profile when JWT Bearer is supported. The metadata model, API schema, service logic, constant, and endpoint tests cover supported and unsupported configurations.

Changes

ID-JAG discovery support

Layer / File(s) Summary
Metadata contract and profile advertising
backend/internal/oauth/oauth2/constants/constants.go, backend/internal/oauth/oauth2/discovery/model.go, backend/internal/oauth/oauth2/discovery/service.go, api/discovery.yaml
Adds the ID-JAG profile constant and the optional authorization_grant_profiles_supported field. The discovery service advertises the profile only when JWT Bearer is supported. The API schema and examples define the field.
Discovery behavior validation
backend/internal/oauth/oauth2/discovery/discovery_test.go
Tests profile inclusion, omission when JWT Bearer is disabled, JSON serialization, and OIDC and OAuth 2.0 endpoint exposure.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: thamindudilshan, thiva-k

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: adding ID-JAG authorization grant profile support in OIDC metadata.
Description check ✅ Passed The description covers the purpose, approach, issue, tests, and security checks, but it leaves manual testing, documentation, and integration testing unchecked.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sahandilshan sahandilshan added skip-changelog Skip generating changelog for a particular PR trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes labels Aug 7, 2026
@sahandilshan
sahandilshan enabled auto-merge August 7, 2026 10:17
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

auto-merge was automatically disabled August 7, 2026 10:51

Head branch was pushed to by a user without write access

@sahandilshan
sahandilshan added this pull request to the merge queue Aug 7, 2026
@ThaminduDilshan
ThaminduDilshan removed this pull request from the merge queue due to a manual request Aug 7, 2026
@ThaminduDilshan ThaminduDilshan added Type/Bug and removed skip-changelog Skip generating changelog for a particular PR labels Aug 7, 2026
@sajitha-tj
sajitha-tj force-pushed the fix/id-jag-metadata-in-discovery-endpoint branch from ebc6274 to 1a70151 Compare August 7, 2026 12:04
@sahandilshan
sahandilshan enabled auto-merge August 7, 2026 12:05
@sahandilshan
sahandilshan added this pull request to the merge queue Aug 7, 2026
Merged via the queue into thunder-id:main with commit be0a19f Aug 7, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes Type/Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants