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(IATP): pluggable constraint to scope mapping #3593

Merged

Conversation

wolf4ood
Copy link
Contributor

@wolf4ood wolf4ood commented Nov 6, 2023

What this PR changes/adds

Add pluggable constraints to scope mapping:

  • Introduces ScopeExtractorRegistry for registering custom extractors.
  • Implements IatpScopeExtractorFunction and register it as pre-validator in the policy engine for invoking estractors in the registry and map the result in the scope

ScopeExtractor for now are not tied to a specific scope or rule.

Why it does that

iatp adoption

Linked Issue(s)

Closes #3492

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

@wolf4ood wolf4ood self-assigned this Nov 6, 2023
@wolf4ood wolf4ood added dcp enhancement New feature or request labels Nov 6, 2023
@wolf4ood wolf4ood force-pushed the feat/3492_derive_scope_from_credential branch 2 times, most recently from c3f5ca1 to 1e74434 Compare November 7, 2023 08:23
@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7ca9375) 72.00% compared to head (271c5a0) 72.09%.
Report is 3 commits behind head on main.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3593      +/-   ##
==========================================
+ Coverage   72.00%   72.09%   +0.09%     
==========================================
  Files         893      897       +4     
  Lines       17855    17920      +65     
  Branches     1015     1018       +3     
==========================================
+ Hits        12856    12920      +64     
- Misses       4562     4563       +1     
  Partials      437      437              
Files Coverage Δ
...entitytrust/core/IatpDefaultServicesExtension.java 89.47% <100.00%> (+0.58%) ⬆️
...st/core/defaults/DefaultTrustedIssuerRegistry.java 100.00% <ø> (ø)
.../core/defaults/InMemorySignatureSuiteRegistry.java 0.00% <ø> (ø)
...tytrust/core/scope/IatpScopeExtractorFunction.java 100.00% <100.00%> (ø)
...tytrust/core/scope/IatpScopeExtractorRegistry.java 100.00% <100.00%> (ø)
...itytrust/core/scope/IatpScopeExtractorVisitor.java 100.00% <100.00%> (ø)
...dentitytrust/core/IatpScopeExtractorExtension.java 85.71% <85.71%> (ø)

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

@wolf4ood wolf4ood force-pushed the feat/3492_derive_scope_from_credential branch from 1e74434 to e9745cc Compare November 7, 2023 08:56
@wolf4ood wolf4ood force-pushed the feat/3492_derive_scope_from_credential branch from e9745cc to 7cbd0ea Compare November 7, 2023 09:06
@wolf4ood wolf4ood marked this pull request as ready for review November 7, 2023 09:57
@wolf4ood wolf4ood changed the title feat: pluggable constraint to scope mapping feat(IATP): pluggable constraint to scope mapping Nov 7, 2023
@wolf4ood wolf4ood requested a review from bscholtes1A November 9, 2023 08:00
@wolf4ood wolf4ood merged commit 0d6086d into eclipse-edc:main Nov 10, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dcp enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IATP: derive access scope from credential type
5 participants