Skip to content
This repository was archived by the owner on Jul 31, 2024. It is now read-only.

Commit 42d2cbe

Browse files
author
Stefan Wiedemann
authored
Update Verifier (#70)
* add issuer * add charts * initial local and test setup * doc * fix key * enable did-helper * add test workflow * tests and docs * more doc * more documentation * more doc * verify the results * deploy the chart * fix verification * stable version * update verifier chart * improve verifier
1 parent a387d51 commit 42d2cbe

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

charts/data-space-connector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
# authentication
1212
- name: vcverifier
1313
condition: vcverifier.enabled
14-
version: 2.7.0
14+
version: 2.9.0
1515
repository: https://fiware.github.io/helm-charts
1616
- name: credentials-config-service
1717
condition: credentials-config-service.enabled

doc/LOCAL.MD

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ The policy can be created at the PAP via:
250250

251251
Data can be created through the NGSI-LD API itself. In order to make interaction easier, its directly available through
252252
an ingress at ```http://scorpio-provider.127.0.0.1.nip.io/ngsi-ld/v1```. In
253-
real environments, no endpoint should be publicly available without being protected by the authorization framework.
253+
real environments, no endpoint should be publicly available without beeing protected by the authorization framework.
254254
Create an entity via:
255255

256256
```shell
@@ -297,7 +297,7 @@ If you try to request the provider api without authentication, you will receive
297297
The normal flow is now to request the oidc-information at the well-known endpoint:
298298

299299
```shell
300-
curl -s -X GET 'http://mp-data-service.127.0.0.1.nip.io:8080/.well-known/openid-configuration'
300+
export TOKEN_ENDPOINT=$(curl -s -X GET 'http://mp-data-service.127.0.0.1.nip.io:8080/.well-known/openid-configuration' | jq -r '.token_endpoint'); echo $TOKEN_ENDPOINT
301301
```
302302

303303
In the response, the grant type `vp_token` will be present, indicating the support for the OID4VP authentication flow:
@@ -306,7 +306,7 @@ In the response, the grant type `vp_token` will be present, indicating the suppo
306306
{
307307
"issuer": "http://provider-verifier.127.0.0.1.nip.io:8080",
308308
"authorization_endpoint": "http://provider-verifier.127.0.0.1.nip.io:8080",
309-
"token_endpoint": "http://provider-verifier.127.0.0.1.nip.io:8080/token",
309+
"token_endpoint": "http://provider-verifier.127.0.0.1.nip.io:8080/services/data-service/token",
310310
"jwks_uri": "http://provider-verifier.127.0.0.1.nip.io:8080/.well-known/jwks",
311311
"scopes_supported": [
312312
"default"
@@ -397,10 +397,9 @@ The JWT representation of the JWT has to be Base64-encoded(no padding!):
397397
The vp_token can then be exchanged for the access-token
398398

399399
```shell
400-
export DATA_SERVICE_ACCESS_TOKEN=$(curl -s -X POST http://provider-verifier.127.0.0.1.nip.io:8080/token \
400+
export DATA_SERVICE_ACCESS_TOKEN=$(curl -s -X POST $TOKEN_ENDPOINT \
401401
--header 'Accept: */*' \
402402
--header 'Content-Type: application/x-www-form-urlencoded' \
403-
--header 'client_id: data-service' \
404403
--data grant_type=vp_token \
405404
--data vp_token=${VP_TOKEN} \
406405
--data scope=default | jq '.access_token' -r ); echo ${DATA_SERVICE_ACCESS_TOKEN}
@@ -451,7 +450,7 @@ the local installation uses [did:key](https://w3c-ccg.github.io/did-method-key/)
451450
they are well-supported, can be resolved without any external interaction and can easily be generated within the deployment. That makes
452451
them a perfect fit for the local use-case.
453452
All participants(e.g. the consumer and the participant) get a did generated on installation, by using the [did-helper](https://github.com/wistefan/did-helper).
454-
The identities and connected key-material is automatically distributed in the cluster and set in the components that require it.
453+
The identities and connected key-material is automatically distributed in the cluster and set in the componets that require it.
455454

456455
In real world data spaces, the participants should rather use stabled identities, which can be [did:key](https://w3c-ccg.github.io/did-method-key/), but also
457456
more organization-focused once like [did:web](https://w3c-ccg.github.io/did-method-web/) or [did:elsi](https://alastria.github.io/did-method-elsi/).

it/src/test/java/org/fiware/dataspace/it/components/MPOperationsEnvironment.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public abstract class MPOperationsEnvironment {
2121
public static final String SCORPIO_ADDRESS = "http://scorpio-provider.127.0.0.1.nip.io:8080";
2222

2323
public static final String OIDC_WELL_KNOWN_PATH = "/.well-known/openid-configuration";
24-
public static final String CLIENT_ID = "data-service";
2524
private static final OkHttpClient HTTP_CLIENT = new OkHttpClient();
2625
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
2726

it/src/test/java/org/fiware/dataspace/it/components/Wallet.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ public class Wallet {
5858
private static final String OID_WELL_KNOWN_PATH = "/.well-known/openid-configuration";
5959
private static final String PRE_AUTHORIZED_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:pre-authorized_code";
6060

61-
private static final String SAME_DEVICE_ENDPOINT = "/api/v1/samedevice";
62-
6361
private final Map<String, String> credentialStorage = new HashMap<>();
6462

6563
private static final OkHttpClient HTTP_CLIENT = new OkHttpClient();
@@ -84,7 +82,6 @@ public String exchangeCredentialForToken(OpenIdConfiguration openIdConfiguration
8482
.build();
8583
Request tokenRequest = new Request.Builder()
8684
.post(requestBody)
87-
.addHeader("client_id", MPOperationsEnvironment.CLIENT_ID)
8885
.url(openIdConfiguration.getTokenEndpoint())
8986
.build();
9087
Response tokenResponse = HTTP_CLIENT.newCall(tokenRequest).execute();

0 commit comments

Comments
 (0)