Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ a token in the Authorization header, which authorizes the verifier to obtain the
consumer's IdentityHub.

We achieve this by intercepting the DSP request and adding the correct scope - here:
`"org.eclipse.edc.vc.type:MembershipCredential:read"` - to the request builder. Technically, this is achieved by
`"org.eclipse.dspace.dcp.vc.type:MembershipCredential:read"` - to the request builder. Technically, this is achieved by
registering a `postValidator` function for the relevant policy scopes, check out the
[DcpPatchExtension.java](extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DcpPatchExtension.java) class.

Expand Down Expand Up @@ -769,7 +769,7 @@ relevant scope string to the access token upon DSP egress. A policy, that requir

The
[DataAccessCredentialScopeExtractor.java](extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DataAccessCredentialScopeExtractor.java)
class would convert this into a scope string `org.eclipse.edc.vc.type:DataProcessorCredential:read` and add it to the
class would convert this into a scope string `org.eclipse.dspace.dcp.vc.type:DataProcessorCredential:read` and add it to the
consumer's access token.

### 8.4 Policy evaluation functions
Expand Down Expand Up @@ -934,7 +934,7 @@ deliver a credential of type `DemoCredential` to the consumer's IdentityHub.
### 10.4 Default scope-to-criterion transformer

When IdentityHub receives a Presentation query, that carries an access token, it must be able to convert a scope string
into a filter expression, for example `org.eclipse.edc.vc.type:DataProcessorCredential:read` is converted into
into a filter expression, for example `org.eclipse.dspace.dcp.vc.type:DataProcessorCredential:read` is converted into
`verifiableCredential.credential.type = DataProcessorCredential`. This filter expression is then used by IdentityHub to
query for `DataProcessorCredentials` in the database.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class DataAccessCredentialScopeExtractor implements ScopeExtractor {
public static final String DATA_PROCESSOR_CREDENTIAL_TYPE = "DataProcessorCredential";
private static final String DATA_ACCESS_CONSTRAINT_PREFIX = "DataAccess.";
private static final String CREDENTIAL_TYPE_NAMESPACE = "org.eclipse.edc.vc.type";
private static final String CREDENTIAL_TYPE_NAMESPACE = "org.eclipse.dspace.dcp.vc.type";

@Override
public Set<String> extractScopes(Object leftValue, Operator operator, Object rightValue, RequestPolicyContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void initialize(ServiceExtensionContext context) {
trustedIssuerRegistry.register(new Issuer("did:web:localhost%3A10100", Map.of()), WILDCARD); // for the credential used to demo the issuance flow

// register a default scope provider
var contextMappingFunction = new DefaultScopeMappingFunction(Set.of("org.eclipse.edc.vc.type:MembershipCredential:read"));
var contextMappingFunction = new DefaultScopeMappingFunction(Set.of("org.eclipse.dspace.dcp.vc.type:MembershipCredential:read"));

policyEngine.registerPostValidator(RequestCatalogPolicyContext.class, contextMappingFunction::apply);
policyEngine.registerPostValidator(RequestContractNegotiationPolicyContext.class, contextMappingFunction::apply);
Expand Down
Loading