Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): add additional scopes to the CatalogRequest #4348

Conversation

paullatzelsperger
Copy link
Member

What this PR changes/adds

adds an optional list additionalScopes to the CatalogRequest (CatalogApi DTO) and the CatalogRequestMessage (DSP message).
These additional scopes can be used by certain implementations of the IdentityService to enrich the generated token.

For example, in DCP we can use this to attach additional scope strings to the access_token, effectively giving permissions to request more credentials from the CredentialService.

Why it does that

being able to request additional VerifiableCredentials from the wallet

Further notes

  • Since this is an alpha feature, it will be made available under the /v3.1alpha context url path
  • the instanceof check in the DspHttpRemoteMessageDispatcherImpl might not be the most elegant solution, but it is the least impactful, and considering that we don't really foresee additionalScopes for any other DSP message, it seemed good enough.

Linked Issue(s)

Closes #4322

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@paullatzelsperger paullatzelsperger added enhancement New feature or request api Feature related to the (REST) api dataspace-protocol related to the dataspace protocol labels Jul 10, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 75.30%. Comparing base (7f20ba5) to head (b28db53).
Report is 349 commits behind head on main.

Files Patch % Lines
...anagement/catalog/v31alpha/CatalogApiV31alpha.java 0.00% 4 Missing ⚠️
...ain/java/org/eclipse/edc/spi/iam/RequestScope.java 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4348      +/-   ##
==========================================
+ Coverage   71.74%   75.30%   +3.56%     
==========================================
  Files         919     1055     +136     
  Lines       18457    21185    +2728     
  Branches     1037     1183     +146     
==========================================
+ Hits        13242    15954    +2712     
+ Misses       4756     4713      -43     
- Partials      459      518      +59     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@paullatzelsperger paullatzelsperger marked this pull request as ready for review July 10, 2024 08:15
@paullatzelsperger paullatzelsperger merged commit 38728e0 into eclipse-edc:main Jul 11, 2024
22 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/4322_add_optional_scopes_param branch July 11, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Feature related to the (REST) api dataspace-protocol related to the dataspace protocol enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Management API: add optional "scopes" parameter
4 participants