Skip to content

Commit

Permalink
Merge pull request #29 from Engineering-Research-and-Development/cert…
Browse files Browse the repository at this point in the history
…_doc_update_part_2

Merge changes according to certification criteria
  • Loading branch information
marest94 authored Aug 22, 2023
2 parents 60a24e9 + e5eaf5e commit 89e5489
Show file tree
Hide file tree
Showing 46 changed files with 705 additions and 206 deletions.
12 changes: 4 additions & 8 deletions .env
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
COMPOSE_PROJECT_NAME=TRUE_Connector

BROKER_URL=https://broker.ids.isst.fraunhofer.de/infrastructure

DISABLE_SSL_VALIDATION=true
#Enable HTTPS
SERVER_SSL_ENABLED=true
#SSL settings
KEYSTORE_NAME=ssl-server.jks
KEY_PASSWORD=changeit
KEYSTORE_PASSWORD=changeit
ALIAS=execution-core-container

#TRUSTORE (used also by IDSCP2)
TRUSTORE_NAME=
TRUSTORE_PASSWORD=
TRUSTORE_NAME=truststoreEcc.jks
TRUSTORE_PASSWORD=allpassword

CACHE_TOKEN=false
FETCH_TOKEN_ON_STARTUP=false

#Camel
REST_ENABLE_HTTPS=true

# REST Communication type between ECC - mixed | form | http-header
MULTIPART_ECC=form

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Please [click here](https://engineering-ing-inf-rd.gitbook.io/true-connector/),

* [TRUE Connector](<README.md#true-connector>)
* [Table of Contents](<README.md#table-of-contents>)
* [Prerequisite](doc/TRUEConnector/prerequisite.md)
* [Introduction](doc/TRUEConnector/introduction.md)
* [System requirements](doc/TRUEConnector/system-requirements.md)
* [Volumes](doc/TRUEConnector/volumes.md)
Expand Down Expand Up @@ -54,6 +55,9 @@ Please [click here](https://engineering-ing-inf-rd.gitbook.io/true-connector/),
* [Self Description API](doc/selfDescriptionAPI/self-description-API.md)
* [Changing API password](doc/selfDescriptionAPI/changepassword.md)
* [Postman collection](doc/selfDescriptionAPI/postman.md)
* [User management](doc/user_management.md)
* [Backup & restore](doc/backupAndUpdate/backup.md)
* [Updating](doc/backupAndUpdate/update.md)
* [Docker image signing and verification](doc/cosign.md)
* [Life cycle](doc/life_cycle.md)
* [Security](doc/security.md)
Expand Down
175 changes: 159 additions & 16 deletions TRUE Connector v1.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"info": {
"_postman_id": "d69b4d98-a2fb-44a4-826d-99da07c6cb54",
"_postman_id": "de10144c-f87c-4bd2-84e1-5b8247e5266a",
"name": "TRUE Connector v1",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "2326106"
"_exporter_id": "21815221"
},
"item": [
{
Expand All @@ -12,6 +12,54 @@
{
"name": "ContractOffer",
"item": [
{
"name": "SelfDescription",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"pm.response.to.be.ok;\r",
"//store applicants self-description for further tests\r",
"pm.collectionVariables.set(\"APPLICANT_SELF_DESCRIPTION\", jsonData)\r",
"\r",
"pm.test(\"ContractOffer\", function () {\r",
" // catalog\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"resourceCatalog\", jsonData[\"ids:resourceCatalog\"][0][\"@id\"]) \r",
" // resource\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"offeredResource\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"@id\"])\r",
" // contractOffer\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:contractOffer\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"contractOffer\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:contractOffer\"][0][\"@id\"])\r",
" // representation\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:representation\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"representation\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:representation\"][0][\"@id\"])\r",
" });"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{Self_Description_URL}}/api/selfDescription/",
"host": [
"{{Self_Description_URL}}"
],
"path": [
"api",
"selfDescription",
""
]
}
},
"response": []
},
{
"name": "ContractOffer",
"event": [
Expand All @@ -26,7 +74,6 @@
"//http://w3id.org/engrd/connector/artifact/test\r",
" pm.expect(pm.response.text()).to.include(\"ids:Permission\");\r",
" pm.expect(pm.response.text()).to.include(\"ids:ContractOffer\");\r",
" pm.expect(pm.response.text()).to.include(\"ids:Constraint\");\r",
" pm.expect(pm.response.text()).to.include(\"http://w3id.org/engrd/connector/artifact\");\r",
" });"
],
Expand Down Expand Up @@ -233,6 +280,54 @@
{
"name": "OfferedResource",
"item": [
{
"name": "SelfDescription",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"pm.response.to.be.ok;\r",
"//store applicants self-description for further tests\r",
"pm.collectionVariables.set(\"APPLICANT_SELF_DESCRIPTION\", jsonData)\r",
"\r",
"pm.test(\"ContractOffer\", function () {\r",
" // catalog\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"resourceCatalog\", jsonData[\"ids:resourceCatalog\"][0][\"@id\"]) \r",
" // resource\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"offeredResource\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"@id\"])\r",
" // contractOffer\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:contractOffer\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"contractOffer\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:contractOffer\"][0][\"@id\"])\r",
" // representation\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:representation\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"representation\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:representation\"][0][\"@id\"])\r",
" });"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{Self_Description_URL}}/api/selfDescription/",
"host": [
"{{Self_Description_URL}}"
],
"path": [
"api",
"selfDescription",
""
]
}
},
"response": []
},
{
"name": "OfferedResource",
"event": [
Expand Down Expand Up @@ -293,7 +388,7 @@
"//http://w3id.org/engrd/connector/artifact/postman\r",
" pm.expect(pm.response.text()).to.include(\"http://w3id.org/engrd/connector/artifact/postman\");\r",
" var list = jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"].length;\r",
" tests[\"Validate total of 3 offered resources\"] = list === 3;\r",
" tests[\"Validate total of 3 offered resources\"] = list > 2;\r",
" });\r",
""
],
Expand Down Expand Up @@ -435,6 +530,54 @@
{
"name": "Representation",
"item": [
{
"name": "SelfDescription",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"pm.response.to.be.ok;\r",
"//store applicants self-description for further tests\r",
"pm.collectionVariables.set(\"APPLICANT_SELF_DESCRIPTION\", jsonData)\r",
"\r",
"pm.test(\"ContractOffer\", function () {\r",
" // catalog\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"resourceCatalog\", jsonData[\"ids:resourceCatalog\"][0][\"@id\"]) \r",
" // resource\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"offeredResource\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"@id\"])\r",
" // contractOffer\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:contractOffer\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"contractOffer\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:contractOffer\"][0][\"@id\"])\r",
" // representation\r",
" pm.expect(jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:representation\"][0][\"@id\"]).to.exist;\r",
" pm.collectionVariables.set(\"representation\", jsonData[\"ids:resourceCatalog\"][0][\"ids:offeredResource\"][0][\"ids:representation\"][0][\"@id\"])\r",
" });"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{Self_Description_URL}}/api/selfDescription/",
"host": [
"{{Self_Description_URL}}"
],
"path": [
"api",
"selfDescription",
""
]
}
},
"response": []
},
{
"name": "Representation",
"event": [
Expand Down Expand Up @@ -924,7 +1067,7 @@
"basic": [
{
"key": "username",
"value": "proxy",
"value": "idsUser",
"type": "string"
},
{
Expand Down Expand Up @@ -1120,7 +1263,7 @@
"basic": [
{
"key": "username",
"value": "admin",
"value": "apiUser",
"type": "string"
},
{
Expand Down Expand Up @@ -1291,13 +1434,13 @@
"type": "basic",
"basic": [
{
"key": "password",
"value": "password",
"key": "username",
"value": "idsUser",
"type": "string"
},
{
"key": "username",
"value": "proxy",
"key": "password",
"value": "password",
"type": "string"
}
]
Expand Down Expand Up @@ -1555,7 +1698,7 @@
"basic": [
{
"key": "username",
"value": "proxy",
"value": "idsUser",
"type": "string"
},
{
Expand Down Expand Up @@ -1663,13 +1806,13 @@
"type": "basic",
"basic": [
{
"key": "password",
"value": "password",
"key": "username",
"value": "idsUser",
"type": "string"
},
{
"key": "username",
"value": "proxy",
"key": "password",
"value": "password",
"type": "string"
}
]
Expand Down Expand Up @@ -1701,7 +1844,7 @@
"basic": [
{
"key": "username",
"value": "admin",
"value": "apiUser",
"type": "string"
},
{
Expand Down
2 changes: 1 addition & 1 deletion be-dataapp_resources/application-docker.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### App setup
spring.banner.location=classpath:dataapp_banner.txt
logging.config=classpath:logback-DATAAPP.xml

spring.devtools.restart.enabled=false

Expand Down Expand Up @@ -62,6 +63,5 @@ server.tomcat.max-http-post-size=200291456

information.model.version=4.2.7

application.security.username=proxy
# encoded 'password'
application.security.password=$2a$10$MQ5grDaIqDpBjMlG78PFduv.AMRe9cs0CNm/V4cgUubrqdGTFCH3m
25 changes: 25 additions & 0 deletions be-dataapp_resources/logback-DATAAPP.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<configuration>
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg %n</pattern>
</encoder>
</appender>
<property name="LOG_DIR" value="/home/nobody/data/log/dataapp" />
<appender name="FILE_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_DIR}/dataapp.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_DIR}/dataapp-%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
<maxFileSize>10MB</maxFileSize>
<maxHistory>30</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{dd-MM-yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg %n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE_LOG" />
</root>
</configuration>
14 changes: 9 additions & 5 deletions doc/PLATOON_USAGE_CONTROL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ In order to switch to PostgreSQL database, following steps are needed:
postgres_provider:
image: postgres
hostname: postgres_provider
ports:
- "5432:5432"
expose:
- "5432"
networks:
- provider
env_file:
- ./postgres_provider.env
volumes:
Expand All @@ -21,8 +23,10 @@ In order to switch to PostgreSQL database, following steps are needed:
postgres_consumer:
image: postgres
hostname: postgres_consumer
ports:
- "5444:5432"
expose:
- "5432"
networks:
- consumer
env_file:
- ./postgres_consumer.env
volumes:
Expand Down Expand Up @@ -101,5 +105,5 @@ POSTGRES_DB=usagecontrol_consumer

# Usage control examples

For more information and examples of policies compatible with Platoon UC app, please check [README](https://github.com/Engineering-Research-and-Development/true-connector-uc_data_app_platoon/blob/1.7.2/README.md)
For more information and examples of policies compatible with Platoon UC app, please check [README](https://github.com/Engineering-Research-and-Development/true-connector-uc_data_app_platoon/blob/1.7.4/README.md)

Loading

0 comments on commit 89e5489

Please sign in to comment.