eclipse-edc/IdentityHub

Missing mandatory `aud` claim in `JwtPresentationGenerator`

Closed this issue · 0 comments

Bug Report

When requesting a VerifiablePresentation in JWT format, a aud claim is required by the JwtPresentationGenerator. This claim is extracted from the auth token received in input of the VP request (under the client_id claim). However the SecureTokenService implementation does not encode the client_id, causing the VP generation to fail.

Expected Behavior

A JWT VP should be properly generated and return.

Observed Behavior

An exception is thrown when requesting the VP in JWT format:

│ WARNING 2024-02-15T10:29:04.821751896 The VP was requested in JSON_LD format, but the request yielded 1 JWT-VCs, which cannot be transported in a LDP-VP. A second VP will be returned, containing JWT-VCs                                                                            │
│ SEVERE 2024-02-15T10:29:04.821938262 JerseyExtension: Unexpected exception caught                                                                                                                                                                                                     │
│ java.lang.IllegalArgumentException: Must provide additional data: 'aud'

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Context Information

Add any other context about the problem here.

  • Used version [e.g. EDC v1.0.0]
  • OS: [e.g. iOS, Windows]
  • ...

Detailed Description

If applicable, add screenshots and logs to help explain your problem.

Possible Implementation

You already know the root cause of the erroneous state and how to fix it? Feel free to share your thoughts.