- Table of contents
- What is this backend app responsible for?
- Services Available
- Run the application
- TL;DR
- License
This backend includes the services and logics to manage the passports of the frontend app
.
All Authenticated APIs required a AccessToken
JWT Token generated by the login in the frontend or in the Catena-X Keycloak instance.
{
headers: {
Authorization: "Bearer <<AccessToken>>"
}
}
For login and log out!
------
/auth/check #With this api you can check you authentication status.
------
/auth/token #Request token from the keycloak instance
------
NOTE: You must be authenticated with the keycloak instance to access this APIs
Get data from Catena-X Services
/api/data/catalog?providerUrl=<...> #Get all the catalog from the provider
------
/api/data/submodel/<assetId>?idType=<...>&index=<...>
__________
default idType = "Battery_ID_DMC_Code"
default index = 0
------
/api/data/passport?transferId=<...> #Get passport if the transferId is available -> No contract exchange is required if transferId exists
Get a passport from a Catena-X Provider by using its processId, contractId and a token, this retrieves product passport after a successful negotiation.
/api/passport #Get the health status of the server
{
"processId": "string",
"contractId": "string",
"token": "string"
}
The passport available versions are:
[ "v3.0.1" ] -> Battery Passport
To change the available versions add in the configurations for each environment ``
passport:
versions:
- 'v3.0.1'
/api/contract/create #Creates a process and checks for the viability of the data retrieval
{
"id": "string",
"type": "string"
}
/api/contract/search #Searches for a passport with the following id
{
"processId": "string",
"id": "string",
"version": "string",
"idType": "string",
"dtIndex": 0,
"idShort": "string"
}
/api/contract/sign #Sign contract retrieved from provider and start negotiation
{
"processId": "string",
"contractId": "string",
"token": "string"
}
/api/contract/decline #Decline passport negotiation
{
"processId": "string",
"contractId": "string",
"token": "string"
}
/api/contract/cancel #Cancel the negotiation
{
"processId": "string",
"contractId": "string",
"token": "string"
}
/api/contract/status/<processId> #Get status from process
Public APIs don't require authentication
/health #Get the health status of the server
{
"message": "RUNNING",
"status": 200,
"data": "24/11/2022 17:48:18.487"
}
/endpoint/<processId>
/endpoint/<processId>/<endpointId>
The third party library dependecies, utilized in this app have to be approved from The Eclipse Foundation.
The Dash Licence Tool is used to scan the dependencies
OSS License Checks with Dash & Compliance with Apache 2.0
At the time of writing this manual, the dependencies have status approved and therefore no need to generate IP Team Review request further.
Maven plugin used to check OSS license
How to run:
mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES
Swagger documentation is now automatically available at the following path:
https://<host>/swagger-ui/index.html
For authorization, you will need to add a JWT Access token from the Catena-X IAM:
Use maven to run the spring boot application:
mvn spring-boot:run
If you want to run the application in a different way checkout the frequently asked questions section below.
You can use the default configuration to start the application:
charts/digital-product-pass/values.yaml
However if you need to change it just create a new environment with this naming convention: values-env`.yaml
where env
is the name of your environment. You can use as an example the following configuration file: charts/digital-product-pass/values-int.yaml
.
The configuration for the consumer backend application is a yaml file that is configured in the following tag: backend.application
. Before the application starts all the configuration parameters must be specified, since they are required for initialization and will be checked at the test fase.
Once you configured the application use the follow the TL;DR below to build the image and start the application
using helm charts.