diff --git a/README.md b/README.md index b0d71a4df..efa4cacb3 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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. diff --git a/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DataAccessCredentialScopeExtractor.java b/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DataAccessCredentialScopeExtractor.java index 46b192f37..5ed1fa390 100644 --- a/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DataAccessCredentialScopeExtractor.java +++ b/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DataAccessCredentialScopeExtractor.java @@ -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 extractScopes(Object leftValue, Operator operator, Object rightValue, RequestPolicyContext context) { diff --git a/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DcpPatchExtension.java b/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DcpPatchExtension.java index 2f4d8f46a..0d84e4518 100644 --- a/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DcpPatchExtension.java +++ b/extensions/dcp-impl/src/main/java/org/eclipse/edc/demo/dcp/core/DcpPatchExtension.java @@ -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);