Skip to content

Commit

Permalink
Merge pull request #130 from Fraunhofer-AISEC/fix/est-fixes
Browse files Browse the repository at this point in the history
EST fixes and examples overhaul
  • Loading branch information
milux authored Jan 27, 2023
2 parents 889c65b + 737d855 commit da76ed4
Show file tree
Hide file tree
Showing 43 changed files with 226 additions and 681 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ WORKDIR "/root"
# Ports to expose
EXPOSE 8080 29292
ENTRYPOINT ["java"]
CMD ["--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector"]
CMD ["--add-exports=java.base/sun.security.x509=ALL-UNNAMED", \
"--add-exports=java.base/sun.security.pkcs=ALL-UNNAMED", \
"--add-exports=java.base/sun.security.pkcs10=ALL-UNNAMED", \
"--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector", \
"--spring.config.location=classpath:application.yml,optional:/root/etc/application.yml"]
13 changes: 2 additions & 11 deletions examples/src/main/resources/etc/application.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
logging:
level:
root: info
#logging:
# level:
# de.fhg.aisec: debug
# Use for IDSCP2 debugging
# de.fhg.aisec.ids.idscp2: trace
# de.fhg.aisec.ids.camel.idscp2: trace

spring:
web:
resources:
static-locations: classpath:/www/

ids-multipart:
daps-bean-name: rootDaps
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified examples/src/main/resources/etc/settings.mapdb
Binary file not shown.
Binary file modified examples/src/main/resources/etc/settings2.mapdb
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/src/main/resources/etc/tls.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server.keyStorePassword=password
server.keyStoreResource=etc/consumer-keystore.p12
server.keyStoreResource=etc/server-keystore.p12
client.keyStorePassword=password
client.keyStoreResource=etc/provider-keystore.p12
client.keyStoreResource=etc/client-keystore.p12
trustStorePassword=password
trustStoreResource=etc/truststore.p12
Binary file modified examples/src/main/resources/etc/truststore.p12
Binary file not shown.
14 changes: 5 additions & 9 deletions examples/src/main/resources/example-getting-started/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
version: '3'
services:

ids-core:
tc-core:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings.mapdb:/root/etc/settings.mapdb
- ../etc/consumer-keystore.p12:/root/etc/consumer-keystore.p12
- ../etc/provider-keystore.p12:/root/etc/provider-keystore.p12
- ../etc/server-keystore.p12:/root/etc/server-keystore.p12
- ../etc/client-keystore.p12:/root/etc/client-keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ../etc/tls.properties:/root/etc/tls.properties
- ./example-idscp2-localloop.xml:/root/deploy/example-idscp2-localloop.xml
ports:
- "8080:8080"
environment:
TC_DAPS_URL: "https://daps-dev.aisec.fraunhofer.de/v4"
networks:
example-internal:
aliases:
- consumer-core
- provider-core
- tc-core-server
- tc-core-client

networks:
example-internal:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<simple>Message at $simple{date:now:yyyy-MM-dd HH:mm:ss}</simple>
</setBody>
<log message="Sending message body &quot;${body}&quot;..."/>
<to uri="idscp2client://consumer-core:9292/?sslContextParameters=#clientSslContext" />
<to uri="idscp2client://tc-core-server:9292/?sslContextParameters=#clientSslContext" />
</route>

<route id="receiveTime">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
version: '3'
services:

consumer-core:
tc-core-server:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings.mapdb:/root/etc/settings.mapdb
- ../etc/consumer-keystore.p12:/root/etc/keystore.p12
- ../etc/server-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-multipart-uc-server.xml:/root/deploy/example-multipart-uc-server.xml
- ./make-contract.xml:/root/deploy/make-contract.xml
Expand All @@ -23,18 +21,16 @@ services:
profiles:
- server

provider-core:
tc-core-client:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings2.mapdb:/root/etc/settings.mapdb
- ../etc/provider-keystore.p12:/root/etc/keystore.p12
- ../etc/client-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-multipart-uc-client.xml:/root/deploy/example-multipart-uc-client.xml
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</setProperty>
<process ref="contractRequestCreationProcessor" />
<process ref="idsMultiPartOutputProcessor" />
<to uri="https://consumer-core:28282/usageControl?sslContextParameters=#rootClientSslContext" />
<to uri="https://tc-core-server:28282/usageControl?sslContextParameters=#rootClientSslContext" />
<process ref="idsMultiPartInputProcessor" />
<process ref="idsMessageTypeExtractionProcessor" />
<choice>
Expand All @@ -41,7 +41,7 @@
<log message="### Handle ContractResponseMessage ###" />
<process ref="contractResponseProcessor" />
<process ref="idsMultiPartOutputProcessor" />
<to uri="https://consumer-core:28282/usageControl?sslContextParameters=#rootClientSslContext" />
<to uri="https://tc-core-server:28282/usageControl?sslContextParameters=#rootClientSslContext" />
<process ref="idsMultiPartInputProcessor" />
<process ref="idsMessageTypeExtractionProcessor" />
<choice>
Expand Down Expand Up @@ -76,7 +76,7 @@
</setProperty>
<process ref="artifactRequestCreationProcessor" />
<process ref="idsMultiPartOutputProcessor" />
<to uri="https://consumer-core:28282/usageControl?sslContextParameters=#rootClientSslContext" />
<to uri="https://tc-core-server:28282/usageControl?sslContextParameters=#rootClientSslContext" />
<process ref="idsMultiPartInputProcessor" />
<process ref="idsMessageTypeExtractionProcessor" />
<choice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<camel:sslContextParameters id="serverSslContext" certAlias="1">
<camel:keyManagers keyPassword="password">
<camel:keyStore resource="etc/provider-keystore.p12" password="password"/>
<camel:keyStore resource="etc/client-keystore.p12" password="password"/>
</camel:keyManagers>
<camel:trustManagers>
<camel:keyStore resource="etc/truststore.p12" password="password"/>
Expand Down
12 changes: 4 additions & 8 deletions examples/src/main/resources/example-ids-multipart/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
version: '3'
services:

consumer-core:
tc-core-server:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings.mapdb:/root/etc/settings.mapdb
- ../etc/consumer-keystore.p12:/root/etc/keystore.p12
- ../etc/server-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-multipart-server.xml:/root/deploy/example-multipart-server.xml
ports:
Expand All @@ -22,18 +20,16 @@ services:
profiles:
- server

provider-core:
tc-core-client:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings2.mapdb:/root/etc/settings.mapdb
- ../etc/provider-keystore.p12:/root/etc/keystore.p12
- ../etc/client-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-multipart-client.xml:/root/deploy/example-multipart-client.xml
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<from uri="timer://tenSecondsTimer?fixedRate=true&amp;period=10000"/>
<process ref="descriptionRequestCreationProcessor"/>
<process ref="idsMultiPartOutputProcessor"/>
<to uri="https://consumer-core:28282/selfInformation?sslContextParameters=#rootClientSslContext"/>
<to uri="https://tc-core-server:28282/selfInformation?sslContextParameters=#rootClientSslContext"/>
<process ref="idsMultiPartInputProcessor"/>
<log message="Server self-description:\n${body}"/>
</route>
Expand Down
16 changes: 4 additions & 12 deletions examples/src/main/resources/example-idscp2-uc/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,40 @@
version: '3'
services:

provider-core:
tc-core-server:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings.mapdb:/root/etc/settings.mapdb
- ../etc/provider-keystore.p12:/root/etc/keystore.p12
- ../etc/server-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-idscp2-server.xml:/root/deploy/example-idscp2-server.xml
- ./make-contract.xml:/root/deploy/make-contract.xml
ports:
- "8080:8080"
environment:
TC_DAPS_URL: "https://daps-dev.aisec.fraunhofer.de/v4"
networks:
- ids-wide
profiles:
- server

consumer-core:
tc-core-client:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings2.mapdb:/root/etc/settings.mapdb
- ../etc/consumer-keystore.p12:/root/etc/keystore.p12
- ../etc/client-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-idscp2-client.xml:/root/deploy/example-idscp2-client.xml
ports:
- "8081:8080"
environment:
TC_DAPS_URL: "https://daps-dev.aisec.fraunhofer.de/v4"
networks:
- ids-wide
- provider-internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
<constant>https://example.com/some_artifact</constant>
</setProperty>
<process ref="contractRequestCreationProcessor" />
<to uri="idscp2client://provider-core:29292?awaitResponse=true&amp;connectionShareId=ucConnection&amp;sslContextParameters=#clientSslContext&amp;useIdsMessages=true"/>
<to uri="idscp2client://tc-core-server:29292?awaitResponse=true&amp;connectionShareId=ucConnection&amp;sslContextParameters=#clientSslContext&amp;useIdsMessages=true"/>
<process ref="idsMessageTypeExtractionProcessor"/>
<choice>
<when>
<simple>${exchangeProperty.ids-type} == 'ContractResponseMessage'</simple>
<log message="### Handle ContractResponseMessage ###"/>
<process ref="contractResponseProcessor"/>
<to uri="idscp2client://provider-core:29292?awaitResponse=true&amp;connectionShareId=ucConnection&amp;sslContextParameters=#clientSslContext&amp;useIdsMessages=true"/>
<to uri="idscp2client://tc-core-server:29292?awaitResponse=true&amp;connectionShareId=ucConnection&amp;sslContextParameters=#clientSslContext&amp;useIdsMessages=true"/>
<process ref="idsMessageTypeExtractionProcessor"/>
<choice>
<when>
Expand Down Expand Up @@ -63,7 +63,7 @@
<constant>https://example.com/some_artifact</constant>
</setProperty>
<process ref="artifactRequestCreationProcessor" />
<to uri="idscp2client://provider-core:29292?awaitResponse=true&amp;connectionShareId=ucConnection&amp;sslContextParameters=#clientSslContext&amp;useIdsMessages=true"/>
<to uri="idscp2client://tc-core-server:29292?awaitResponse=true&amp;connectionShareId=ucConnection&amp;sslContextParameters=#clientSslContext&amp;useIdsMessages=true"/>
<process ref="idsMessageTypeExtractionProcessor"/>
<choice>
<when>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<camel:sslContextParameters id="serverSslContext" certAlias="1">
<camel:keyManagers keyPassword="password">
<camel:keyStore resource="etc/provider-keystore.p12" password="password"/>
<camel:keyStore resource="etc/keystore.p12" password="password"/>
</camel:keyManagers>
<camel:trustManagers>
<camel:keyStore resource="etc/truststore.p12" password="password"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
version: '3'
services:

# The core platform, mounts docker control socket and route definition into the image
provider-core:
tc-core-server:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings.mapdb:/root/etc/settings.mapdb
- ../etc/provider-keystore.p12:/root/etc/provider-keystore.p12
- ../etc/consumer-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-idscp2-server-broadcast.xml:/root/deploy/example-idscp2-server.xml
- ./example-idscp2-server-broadcast.xml:/root/deploy/example-idscp2-server-broadcast.xml
ports:
- "8080:8080"
networks:
- ids-wide
profiles:
- server

# The core platform, mounts docker control socket and route definition into the image
consumer-core:
tc-core-client:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings2.mapdb:/root/etc/settings.mapdb
- ../etc/consumer-keystore.p12:/root/etc/consumer-keystore.p12
- ../etc/provider-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-idscp2-client-broadcast.xml:/root/deploy/example-idscp2-client.xml
- ./example-idscp2-client-broadcast.xml:/root/deploy/example-idscp2-client-broadcast.xml
ports:
- "8081:8080"
networks:
Expand Down
12 changes: 4 additions & 8 deletions examples/src/main/resources/example-idscp2/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
version: '3'
services:

consumer-core:
tc-core-server:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings.mapdb:/root/etc/settings.mapdb
- ../etc/consumer-keystore.p12:/root/etc/keystore.p12
- ../etc/server-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-idscp2-server.xml:/root/deploy/example-idscp2-server.xml
ports:
Expand All @@ -22,18 +20,16 @@ services:
profiles:
- server

provider-core:
tc-core-client:
image: fraunhoferaisec/trusted-connector-core:${EXAMPLE_TAG:-develop}
tty: true
stdin_open: true
command: [ "--class-path", "./jars/*", "de.fhg.aisec.ids.TrustedConnector",
"--spring.config.location=/root/etc/application.yml" ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ../etc/application.yml:/root/etc/application.yml
- ../deploy/allow-all-flows.pl:/root/deploy/allow-all-flows.pl
- ../etc/settings2.mapdb:/root/etc/settings.mapdb
- ../etc/provider-keystore.p12:/root/etc/keystore.p12
- ../etc/client-keystore.p12:/root/etc/keystore.p12
- ../etc/truststore.p12:/root/etc/truststore.p12
- ./example-idscp2-client.xml:/root/deploy/example-idscp2-client.xml
ports:
Expand Down
Loading

0 comments on commit da76ed4

Please sign in to comment.