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: store claims on additionalProperties #4000

Conversation

paullatzelsperger
Copy link
Member

What this PR changes/adds

some additional claims, that were previously stored as claims on the EDR's access_token were moved to the additionalProperties map on the AccessTokenData.
Specifically: participantId, processId, assetId, agreementId, transferType

Why it does that

Having those on the access token is not necessary. The access token should be as slim as possible.

Further notes

List other areas of code that have changed but are not necessarily linked to the main feature. This could be method
signature changes, package declarations, bugs that were encountered and were fixed inline, etc.

Linked Issue(s)

Closes # <-- insert Issue number if one exists

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

@paullatzelsperger paullatzelsperger added this to the Milestone 14 milestone Mar 13, 2024
@paullatzelsperger paullatzelsperger added the enhancement New feature or request label Mar 13, 2024
@paullatzelsperger paullatzelsperger force-pushed the feat/move_claims_to_additional_props branch from 8cb8d9f to 2884205 Compare March 13, 2024 10:24
* @return success if access to the resource is granted, a failure otherwise.
*/
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData);
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData, Map<String, Object> additionalData);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'claimToken' is never used.
* @return success if access to the resource is granted, a failure otherwise.
*/
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData);
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData, Map<String, Object> additionalData);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'address' is never used.
* @return success if access to the resource is granted, a failure otherwise.
*/
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData);
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData, Map<String, Object> additionalData);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'requestData' is never used.
* @return success if access to the resource is granted, a failure otherwise.
*/
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData);
Result<Void> checkAccess(ClaimToken claimToken, DataAddress address, Map<String, Object> requestData, Map<String, Object> additionalData);

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'additionalData' is never used.
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 73.40%. Comparing base (7f20ba5) to head (2884205).
Report is 139 commits behind head on main.

Files Patch % Lines
...ramework/DataPlaneDefaultIamServicesExtension.java 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4000      +/-   ##
==========================================
+ Coverage   71.74%   73.40%   +1.65%     
==========================================
  Files         919      975      +56     
  Lines       18457    19662    +1205     
  Branches     1037     1105      +68     
==========================================
+ Hits        13242    14432    +1190     
- Misses       4756     4759       +3     
- Partials      459      471      +12     

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

@paullatzelsperger paullatzelsperger merged commit 0717897 into eclipse-edc:main Mar 13, 2024
17 checks passed
@paullatzelsperger paullatzelsperger deleted the feat/move_claims_to_additional_props branch March 13, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants