forked from eclipse-edc/MinimumViableDataspace
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
194 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
FROM openjdk:17-slim-buster | ||
|
||
# Install uuidgen, then delete apt indexes to save image space | ||
RUN apt update \ | ||
&& apt install -y uuid-runtime \ | ||
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists | ||
|
||
WORKDIR /app | ||
|
||
# Copy Registration Service client jar | ||
COPY ./registration-service-cli.jar . | ||
|
||
# Copy Identity Hub client jar | ||
COPY ./identity-hub-cli.jar . | ||
|
||
COPY ./entrypoint.sh . | ||
|
||
ENTRYPOINT "/app/entrypoint.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
#!/bin/bash | ||
|
||
PARTICIPANTS=(provider consumer-eu consumer-us) | ||
# stop on error | ||
set -euo pipefail | ||
|
||
PARTICIPANTS=(provider:eu consumer-eu:eu consumer-us:us) | ||
|
||
# Register dataspace participants | ||
for i in "${PARTICIPANTS[@]}"; do | ||
echo "Registering $i" | ||
java -jar registration-service-cli.jar -d="did:web:did-server:$i" -k=/resources/vault/$i/private-key.pem -s='http://registration-service:8184/authority' participants add --ids-url "http://$i:8282" | ||
for participant in "${PARTICIPANTS[@]}"; do | ||
participantArray=(${participant//:/ }) | ||
|
||
participantName=${participantArray[0]} | ||
region=${participantArray[1]} | ||
did="did:web:did-server:$participantName" | ||
|
||
echo "Registering $participantName" | ||
java -jar registration-service-cli.jar -d="$did" -k=/resources/vault/$participantName/private-key.pem -s='http://registration-service:8184/authority' participants add --ids-url "http://$participantName:8282" | ||
|
||
echo "Seeding VC for $participantName" | ||
vcId=$(uuidgen) | ||
java -jar identity-hub-cli.jar -s="http://$participantName:8181/api/identity-hub" vc add \ | ||
-c='{"id":"'$vcId'","credentialSubject":{"region":"'$region'"}}' \ | ||
-b="$did" \ | ||
-i="did:web:did-server:gaia-x" \ | ||
-k="/resources/vault/gaia-x/private-key.pem" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEIKYUFAhvU3jHPxNPssAVVSbSRLFmKhX6o4Je7KjOqZwOoAoGCCqGSM49 | ||
AwEHoUQDQgAELqW8A9NJSN7d+eLM7JqnxDpTzosTNaM8SZYOJLP7vgAhO/yPPSUa | ||
cJHHzIAVZVfpVsHnsNTMY0bab7QzE1WeKw== | ||
-----END EC PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELqW8A9NJSN7d+eLM7JqnxDpTzosT | ||
NaM8SZYOJLP7vgAhO/yPPSUacJHHzIAVZVfpVsHnsNTMY0bab7QzE1WeKw== | ||
-----END PUBLIC KEY----- |
5 changes: 5 additions & 0 deletions
5
system-tests/resources/vault/registration-service/private-key.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-----BEGIN EC PRIVATE KEY----- | ||
MHcCAQEEIIz7bDfNIDyw0FtHEpzUwPVUX0O8gPr2EY7XyQmOV0Z/oAoGCCqGSM49 | ||
AwEHoUQDQgAE91+yrni6ZryoL4w4xIKOGo70L0ExEnSeGtgXzGTHBcP49nTKHFGn | ||
eRJ9LRC+/pLT45E4YsuDVibvrHl9FOfS4w== | ||
-----END EC PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"id": "did:web:did-server:gaiax", | ||
"@context": [ | ||
"https://www.w3.org/ns/did/v1", | ||
{ | ||
"@base": "did:web:did-server:gaiax" | ||
} | ||
], | ||
"service": [], | ||
"verificationMethod": [{ | ||
"id": "#my-key-1", | ||
"controller": "", | ||
"type": "EcdsaSecp256k1VerificationKey2019", | ||
"publicKeyJwk": { | ||
"kty": "EC", | ||
"kid": "r2vpmYH0Kn1urn6lrzPCzE_bVP6f4X9wb7qTT-IJODI", | ||
"crv": "P-256", | ||
"x": "LqW8A9NJSN7d-eLM7JqnxDpTzosTNaM8SZYOJLP7vgA", | ||
"y": "ITv8jz0lGnCRx8yAFWVX6VbB57DUzGNG2m-0MxNVnis" | ||
} | ||
}], | ||
"authentication": [ | ||
"#my-key-1" | ||
] | ||
} |
Oops, something went wrong.