Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiaMarzano-Eng committed Jun 4, 2021
1 parent 9d8a105 commit 1125e51
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 111 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,17 @@ The TRUE Connector is composed of three components:

![FIWARE TRUE Connector Architecture](docs/img/TRUE_Connector_Architecture.png?raw=true "FIWARE TRUE Connector Architecture")

| :books: [Documentation](https://fiware-true-connector.readthedocs.io/en/latest/) | :whale: [Docker Hub](https://hub.docker.com/) | :dart: [Roadmap](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/roadmap.md) |
| -------------------------------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| :books: [Documentation](https://fiware-true-connector.readthedocs.io/en/latest/) | :whale: [Docker Hub](https://hub.docker.com/u/rdlabengpa) | :dart: [Roadmap](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/roadmap.md) |
| -------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |

## Documentation Contents

- [Home - Getting Started](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/index.md)
- [Tutorial](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/true_connector_tutorial.md)
- [Create new docker image](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/docker_readme.md)
- [User & Programmers Manual](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/user_and_programmers_manual.md
- [Usage Control Rules](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/usage_control_rules.md)
- [Broker](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/broker.md)
## License

The FIWARE TRUE Connector is licensed under [Affero General Public License (GPL) version 3](./LICENSE).
Expand Down
14 changes: 6 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ The FTC Execution Core Container is the core component of an IDS Connector enabl

# Getting Started

The configuration should be performed customizing the following variables in the **docker-compose** file:

* **DATA_APP_ENDPOINT=192.168.56.1:8083/incoming-data-app/dataAppIncomingMessageReceiver** DataAPP endpoint for receiveing data (F endpoint in the above picture)
* **MULTIPART=mixed** DataAPP endpoint Content Type (choose mixed for Multipart/mixed or form for Multipart/form-data)
* Edit external port if need (default values: **8086** for **web sockets over HTTPS**, **8090** for **http**, **8887** for **A endpoint** and **8889** for **B endpoint**)
* Forward-To protocol validation can be changed by editing **application.validateProtocol**. Default value is *true* and Forward-To URL must be set like http(https,wss)://example.com, if you choose *false* Forward-To URL can be set like http(https,wss)://example.com or just example.com and the protocol chosen (from application.properties)will be automatically set (it will be overwritten! example: http://example.com will be wss://example if you chose wss in the properties).
As first step we suggest you to follow the introduction available in the [Tutorial](true_connector_tutorial.md) section, then the guidelines to perfome a test in the [manual](user_and_programmers_manual.md).

If you want to use your own certificate for the AISEC Fraunhofer DAPS server:

* Put **DAPS certificates** into the cert folder and edit related settings (i.e., *application.keyStoreName*, *application.keyStorePassword*) into the *resources/application.properties* file

Finally, run the application:
You can find a complete docker-compose example in the the docker folder. If you want to run the application:

* Execute `docker-compose up &`
```
cd fiware-true-connector/docker/
docker-compose up &
```
65 changes: 0 additions & 65 deletions docs/quick_start_guide.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/true_connector_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ It thereby provides a basis for creating smart-service scenarios and facilitatin
The TRUE Connector is composed by:

- **Execution core container (ECC)**, representing the connector exchanging data.
- **Fiware data app**, it is in charge of processing incoming request and provided the relative responses.
- **FIWARE data app**, it is in charge of processing incoming request and provided the relative responses.
- **Usage Control data app (UC)**, it will check if who are requesting the data has the grants to use that in a well defined policy.
(The Fiware TRUE Connector integrates the [Fraunhofer MyData Framework](https://www.mydata-control.de/) for implementing the Usage Control. Details about the PMP and PEP components can be found [here](usage_control_rules.md))
(The FIWARE TRUE Connector integrates the [Fraunhofer MyData Framework](https://www.mydata-control.de/) for implementing the Usage Control. Details about the PMP and PEP components can be found [here](usage_control_rules.md))

![TRUE Connector Architecture](img/TRUE_Connector_Architecture.png?raw=true "TRUE Connector Architecture")

Expand Down Expand Up @@ -47,15 +47,15 @@ The *application.dapsUrl* (in the *resources/application-docker.properties*) pro

### Clearing House
The Clearing House is an intermediary that provides clearing and settlement services for all financial and data exchange transactions (logs all activities performed in the course of a data exchange).
The Fiware TRUE Connector supports the communication with the ENG Clearing House for registering transactions, available as a service at:
The FIWARE TRUE Connector supports the communication with the ENG Clearing House for registering transactions, available as a service at:

```
CLEARING_HOUSE=http://109.232.32.193:8280/data
```

### Broker
The Broker is an intermediary that stores and manages information about the data sources available.
The Fiware TRUE Connector integrates some endpoints for interacting with an IDS Broker described in [Broker](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/broker.md) section
The FIWARE TRUE Connector integrates some endpoints for interacting with an IDS Broker described in [Broker](https://github.com/Engineering-Research-and-Development/fiware-true-connector/blob/master/docs/broker.md) section

## Flow

Expand Down
73 changes: 45 additions & 28 deletions docs/user_and_programmers_manual.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,56 @@
## How to Configure and Run
## How to Configurate and Run

The configuration should be performed customizing the following variables in the **.env** file.
The configuration should be performed customizing the following variables in the **.env** file:

There are general properties for connector and specific properties for PROVIDER Configuration and CONSUMER Configuration, separated with corresponding labels. We tried to name properties as clear as possible, so that names are self descriptive, and that user can know, what this property does just by its name.
* **DATA_APP_ENDPOINT=192.168.56.1:8084/data** DataAPP endpoint for receiveing data (F endpoint in the above picture)
* **MULTIPART_EDGE=mixed** DataAPP A-endpoint Content Type (choose *mixed* for Multipart/mixed or *form* for Multipart/form-data or *http-header* for Multipart/http-header)
* **MULTIPART_ECC=mixed** Execution Core Container B-endpoint Content Type (choose *mixed* for Multipart/mixed or *form* for Multipart/form-data or *http-header* for Multipart/http-header)
* Edit external ports if need (default values: **8086** for **WS over HTTPS**, **8090** for **http**, **8889** for **B endpoint**, **29292** for **IDSCP2**)
* Forward-To protocol validation can be changed by editing **application.validateProtocol**. Default value is *true* and Forward-To URL must be set like http(https,wss)://example.com, if you choose *false* Forward-To URL can be set like http(https,wss)://example.com or just example.com and the protocol chosen (from application.properties)will be automatically set (it will be overwritten! example: http://example.com will be wss://example if you chose wss in the properties).
* For websocket configuration, in DataApp resource folders, configure *config.properties* file, set following fields

* **MULTIPART_ECC=mixed** Execution Core Container B-endpoint Content Type (choose *mixed* for Multipart/mixed or *form* for Multipart/form-data or *http-header* for Multipart/http-header), make sure to disable WS_ECC and IDSCP2.
* **WS_ECC=false** Execution Core Container B-endpoint - by default it is set to false, change this one to true for enabling wss communication between Connectors. There are two additional condition that needs to be set for WSS configuration - MULTIPART_ECC=mixed and IDSCP2=false
* **IDSCP2=false** Execution Core Container B-endpoint - by default it is set to false, change this one to true for enabling IDSCPv2 protocol communication between Connectors. Be sure to disable WS_ECC, since connectors communicate using one of protocols - REST, WSS or IDSCPv2.
```
server.ssl.key-password=changeit
server.ssl.key-store=/cert/ssl-server.jks
```
Or leave default values, if certificate and its password are correct.

* **Forward-To protocol validation** can be changed by editing **application.validateProtocol**. Default value is *true* and Forward-To URL must be set like http(https,wss)://example.com, if you choose *false* Forward-To URL can be set like http(https,wss)://example.com or just example.com and the protocol chosen (from application.properties)will be automatically set (it will be overwritten! example: http://example.com will be wss://example if you chose wss in the properties).
* Edit external ports if need (default values: **8086** for **WS over HTTPS**, **8090** for **http**, **8889** for **B endpoint**, **29292** for **IDSCP2**)
## Endpoints
The TRUE Connector will use two protocols (http and https) as described by the Docker Compose File.
It will expose the following endpoints:

For trusted data exchange define in *.env* the SSL settings (default values):
```
/proxy
```
to receive data incomming request, and based on received request, forward request to Execution Core Connector (the P endpoint in the above picture)

* KEYSTORE-NAME=ssl-server.jks
* KEY-PASSWORD=changeit
* KEYSTORE-PASSWORD=changeit
* ALIAS=execution-core-container
```
/data
```
to receive data (IDS Message) from a sender connector (the B endpoint in the above picture)
Furthermore, just for testing it will expose (http and https):

If you have your own certificate, self signed or other, be sure to change those properties to match with other certificate. Keystore should be in jks format.
```
/about/version
```
returns business logic version

Provider/Consumer configuration properties
* **DATA_APP_ENDPOINT=https://ecc-provider:8083/data** DataAPP endpoint for receiveing data (F endpoint in the above picture)
* **MULTIPART_EDGE=mixed** DataAPP A-endpoint Content Type (choose *mixed* for Multipart/mixed or *form* for Multipart/form-data or *http-header* for Multipart/http-header)
* For websocket configuration, in DataApp resource folders, configure *config.properties* file, set following fields
## Configuration
The ECC supports three different way to exchange data:

## Connector reachability - endpoints
The TRUE Connector will use two protocols (http and https) as described by the Docker Compose File.
Once Connector is started, the reachability could be verified using the following endpoints:
* **REST endpoints** enabled if *WS_EDGE=false* and *WS_ECC=false*
* **IDSCP2** enabled if *IDSCP2=true* and WS_ECC = false </br>For *WS_EDGE=true* (use websocket on the edge, false for REST on the edge)
* **Web Socket over HTTPS** enabled if *WS_EDGE=true* and *WS_ECC=true* and *IDSCP2=false* for configuration which uses web socket on the edge and between connectors.

For trusted data exchange define in *.env* the SSL settings:

* KEYSTORE-NAME=changeit(JKS format)
* KEY-PASSWORD=changeit
* KEYSTORE-PASSWORD=changeit
* ALIAS=changeit

## How to Test
The reachability could be verified using the following endpoints:

* **http://{IP_ADDRESS}:{HTTP_PUBLIC_PORT}/about/version**

Expand All @@ -39,12 +62,6 @@ For Data Consumer, with provided docker-compose file:

* **http://{IP_ADDRESS}:8091/about/version**

For sending proxy requests:
* **http://{IP_ADDRESS}:8084/proxy**

For receiving incoming requests on B-endpoint:
* **http://{IP_ADDRESS}:8889/data**


## How to Exchange Data

Expand Down Expand Up @@ -72,6 +89,6 @@ DataApp URL: https://{IPADDRESS}:8084/proxy

On the following link, information regarding WebSocket Message Streamer implementation can be found here [WebSocket Message Streamer library](https://github.com/Engineering-Research-and-Development/market4.0-websocket_message_streamer).

#### IDSCP2
### IDSCP2
Follow the REST endpoint or WS examples, put the server hostname/ip address in the Forward-To header (*wss/https://{RECEIVER_IP_ADDRESS/Hostname}:{WS_PUBLIC_PORT}*).
* **AISECv2** put the certificates (keyStore and trustStore) in the *cert* folder,edit related settings (*IDSCP2 AISEC DAPS settings* section in env file)
8 changes: 4 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
site_name: fiware TRUE Connector
site_name: FIWARE TRUE Connector
site_url: https://fiware-true-connector.readthedocs.io/en/latest/
repo_url: https://github.com/Engineering-Research-and-Development/fiware-true-connector
site_description: Fiware TRUE Connector Documentation
site_description: FIWARE TRUE Connector Documentation
docs_dir: docs
site_dir: html
markdown_extensions: [toc, fenced_code]
Expand All @@ -15,9 +15,9 @@ extra_css:
google_analytics: ["UA-198735649-1", "fiware-true-connector.readthedocs.io"]
pages:
- "Home - Getting Started": "index.md"
- "Quick Start Guide": "quick_start_guide.md"
- "Tutorial": "true_connector_tutorial.md"
- "Create new docker image": "docker_readme.md"
- "User & Programmers Manual": "user_and_programmers_manual.md"
- "Usage Control Rules": "usage_control_rules.md"
- "Broker": "broker.md"
- "Tutorial": "true_connector_tutorial.md"

0 comments on commit 1125e51

Please sign in to comment.