Skip to content

Conversation

@nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented Oct 7, 2025

Description of change

This change corrects the logic in the get_authorization_server_metadata function to properly construct the metadata URL as specified in RFC 8414.

Previously, the well-known path was appended to the issuer's path. The logic is now fixed to place the issuer's path components after the /.well-known/oauth-authorization-server segment.

Example:

Before: https://example.com/issuer -> https://example.com/issuer/.well-known/oauth-authorization-server
After: https://example.com/issuer -> https://example.com/.well-known/oauth-authorization-server/issuer

Furthermore, in line with RFC 8414 Section 5, a fallback to the /.well-known/openid-configuration endpoint is added that will be used when the /.well-known/oauth-authorization-server does not exist.

Finally, the amount of retries is reduced from 5 to 2 in order to reduce some significant unnecessary user-facing delay (this decreases max duration from 31 secs to 3 secs).

Links to any relevant issues

https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-15.html#section-11.2.3-2.2
https://www.rfc-editor.org/rfc/rfc8414.html#section-3
https://www.rfc-editor.org/rfc/rfc8414.html#section-5

How the change has been tested

Existing test has been updated

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@nanderstabel nanderstabel self-assigned this Oct 7, 2025
@nanderstabel nanderstabel added the Bug Something isn't working label Oct 7, 2025
@nanderstabel nanderstabel requested a review from Copilot October 7, 2025 15:24
Copy link

Copilot AI left a comment

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 fixes the OAuth Authorization Server URL construction to comply with RFC8414 and updates proof signing algorithm handling to use strings instead of Algorithm enum types.

  • Corrects the OAuth Authorization Server Metadata endpoint URL construction according to RFC8414 specification
  • Changes proof signing algorithm values from enum types to strings for better API compatibility
  • Updates related test code to use string-based algorithm identifiers

Reviewed Changes

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

File Description
oid4vci/src/wallet/mod.rs Implements RFC8414-compliant URL construction and updates algorithm handling logic
oid4vci/src/proof.rs Changes KeyProofMetadata to use Vec for algorithm values
oid4vci/src/credential_issuer/credential_issuer_metadata.rs Updates test to use string algorithm identifiers
oid4vci/src/credential_issuer/credential_configurations_supported.rs Updates tests to use string algorithm identifiers and removes unused import

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nanderstabel nanderstabel changed the title Fix/rfc8414 authorization server url fix: update OAuth Authorization Server Metadata endpoint construction Oct 7, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 97.82609% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
oid4vci/src/wallet/mod.rs 97.82% 1 Missing ⚠️
Files with missing lines Coverage Δ
oid4vci/src/wallet/mod.rs 95.71% <97.82%> (+0.19%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nanderstabel nanderstabel force-pushed the fix/rfc8414-authorization-server-url branch from 0a004d3 to c592d7c Compare October 7, 2025 15:35
@nanderstabel nanderstabel requested a review from Copilot October 8, 2025 12:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nanderstabel nanderstabel marked this pull request as ready for review October 8, 2025 12:28
@nanderstabel nanderstabel merged commit a5f4c43 into dev Oct 9, 2025
3 checks passed
@nanderstabel nanderstabel deleted the fix/rfc8414-authorization-server-url branch October 9, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants