Skip to content

Commit

Permalink
Update to Product-EDC 0.1.0 (#146)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Gomez <[email protected]>
  • Loading branch information
florianrusch-zf and diegogomez-zf authored Aug 19, 2022
1 parent 6290bf5 commit 7956191
Show file tree
Hide file tree
Showing 401 changed files with 333 additions and 64,111 deletions.
7 changes: 3 additions & 4 deletions api-wrapper/0-init-provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ set -o nounset
curl -X POST -H 'Content-Type: text/plain' --data "test" http://localhost:8194/data/asset-1

# Create a asset
curl -X POST -H 'Content-Type: application/json' --data "@resources/asset.json" http://localhost:8187/api/v1/data/assets
curl -X POST -H 'Content-Type: application/json' -H 'X-API-Key: 123456' --data "@resources/asset.json" http://localhost:8187/api/v1/data/assets

# Create a general policy
curl -X POST -H 'Content-Type: application/json' --data "@resources/policy.json" http://localhost:8187/api/v1/data/policies
curl -X POST -H 'Content-Type: application/json' -H 'X-API-Key: 123456' --data "@resources/policy.json" http://localhost:8187/api/v1/data/policydefinitions

# Create a contract definition
curl -X POST -H 'Content-Type: application/json' --data "@resources/contractdefinition.json" http://localhost:8187/api/v1/data/contractdefinitions

curl -X POST -H 'Content-Type: application/json' -H 'X-API-Key: 123456' --data "@resources/contractdefinition.json" http://localhost:8187/api/v1/data/contractdefinitions
48 changes: 47 additions & 1 deletion api-wrapper/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
# Local build guide

! TO BE DEFINED !
## 1. Setup vault

```shell
docker-compose -f ./docker-compose.vault.yml up --build -d
```

## 2. Setup EDCs

Wait a view seconds until the vault was initialized.

```shell
docker-compose up -d
```

## 2.1 See logs and check if the services are already up

```shell
docker-compose -f ./docker-compose.vault.yml -f ./docker-compose.api-wrapper.yml -f ./docker-compose.yml logs -f
```


## 3. Run Script 0-init-provider.sh

```shell
./0-init-provider.sh
```

## 4. Build your local API wrapper

```shell
cd services/api-wrapper
./gradlew clean build
cd ../..
docker-compose -f ./docker-compose.api-wrapper.yml up --build -d
```

## 4. Run Script 1-aas-client-get.sh

```shell
./1-aas-client-get.sh
```

## Destroy everything

```shell
docker-compose -f ./docker-compose.vault.yml -f ./docker-compose.api-wrapper.yml -f ./docker-compose.yml down
```
21 changes: 0 additions & 21 deletions api-wrapper/certs/cert.pem

This file was deleted.

Binary file removed api-wrapper/certs/cert.pfx
Binary file not shown.
28 changes: 0 additions & 28 deletions api-wrapper/certs/key.pem

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,22 @@ web.http.data.path=/api/v1/data
web.http.ids.port=8282
web.http.ids.path=/api/v1/ids

edc.api.control.auth.apikey.value=123456
edc.api.auth.key=123456

edc.transfer.proxy.endpoint=http://consumer-data-plane:9192/public

edc.receiver.http.endpoint=http://consumer-api-wrapper:9192/callback/endpoint-data-reference

edc.security.private-key.alias=1
edc.public.key.alias=public-key
# Vault
edc.vault.hashicorp.url=http://hashicorp-vault:8200
edc.vault.hashicorp.token=password

# Dataplane Selector
edc.dataplane.selector.http.url=http://consumer-data-plane:9999/api/dataplane/control
edc.dataplane.selector.http.sourcetypes=HttpData
edc.dataplane.selector.http.destinationtypes=HttpProxy
edc.dataplane.selector.http.properties={ "publicApiUrl": "http://consumer-data-plane:9192/public" }

edc.transfer.dataplane.token.signer.privatekey.alias=1
edc.transfer.dataplane.sync.endpoint=http://consumer-data-plane:9192/public
# Dataplane Token
edc.transfer.proxy.token.signer.privatekey.alias=dp-signer-private-key
edc.transfer.proxy.token.verifier.publickey.alias=dp-verifier-public-key
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.level=INFO
org.eclipse.dataspaceconnector.level=ALL
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
otel.javaagent.enabled=false
otel.javaagent.debug=false

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ web.http.public.path=/public
web.http.control.port=9193
web.http.control.path=/control

edc.controlplane.validation-endpoint=http://consumer-control-plane:9192/validation/validation
edc.dataplane.token.validation.endpoint=http://consumer-control-plane:9192/validation/token

# Vault
edc.vault.hashicorp.url=http://hashicorp-vault:8200
edc.vault.hashicorp.token=password
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.level=INFO
org.eclipse.dataspaceconnector.level=ALL
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
otel.javaagent.enabled=false
otel.javaagent.debug=false
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@ web.http.data.path=/api/v1/data
web.http.ids.port=8282
web.http.ids.path=/api/v1/ids

edc.api.auth.key=123456

edc.transfer.proxy.endpoint=http://provider-data-plane:9192/public

edc.receiver.http.endpoint=http://provider-control-plane:9191/api/service/pull

edc.security.private-key.alias=1
edc.public.key.alias=public-key
# Vault
edc.vault.hashicorp.url=http://hashicorp-vault:8200
edc.vault.hashicorp.token=password

# Dataplane Selector
edc.dataplane.selector.http.url=http://provider-data-plane:9999/api/dataplane/control
edc.dataplane.selector.http.sourcetypes=HttpData
edc.dataplane.selector.http.destinationtypes=HttpProxy
edc.dataplane.selector.http.properties={ "publicApiUrl": "http://provider-data-plane:9192/public" }

edc.transfer.dataplane.token.signer.privatekey.alias=1
edc.transfer.dataplane.sync.endpoint=http://provider-data-plane:9192/public
# Dataplane Token
edc.transfer.proxy.token.signer.privatekey.alias=dp-signer-private-key
edc.transfer.proxy.token.verifier.publickey.alias=dp-verifier-public-key
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.level=INFO
org.eclipse.dataspaceconnector.level=ALL
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
otel.javaagent.enabled=false
otel.javaagent.debug=false

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ web.http.public.path=/public
web.http.control.port=9193
web.http.control.path=/control

edc.controlplane.validation-endpoint=http://provider-control-plane:9192/validation/validation
edc.dataplane.token.validation.endpoint=http://provider-control-plane:9192/validation/token

# Vault
edc.vault.hashicorp.url=http://hashicorp-vault:8200
edc.vault.hashicorp.token=password
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.level=INFO
org.eclipse.dataspaceconnector.level=ALL
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
otel.javaagent.enabled=false
otel.javaagent.debug=false
24 changes: 24 additions & 0 deletions api-wrapper/docker-compose.api-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3.9"

services:

consumer-api-wrapper:
build:
context: services/api-wrapper
args:
JAR: build/libs/edc.jar
ports:
- "8193:9191" # default
# - "9192" # callback
- "5007:8090" # debugging
environment:
EDC_FS_CONFIG: /config/configuration.properties
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8090
networks:
- api-wrapper
volumes:
- ./config/consumer-api-wrapper.config:/config

networks:
api-wrapper:
driver: bridge
26 changes: 26 additions & 0 deletions api-wrapper/docker-compose.vault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.9"

services:
hashicorp-vault:
image: vault:1.11.2
ports:
- "8200:8200"
networks:
- api-wrapper
environment:
VAULT_DEV_ROOT_TOKEN_ID: password

init-vault:
build:
context: vault
working_dir: /
privileged: true
environment:
VAULT_URL: http://hashicorp-vault:8200
VAULT_TOKEN: password
networks:
- api-wrapper

networks:
api-wrapper:
driver: bridge
Loading

0 comments on commit 7956191

Please sign in to comment.