-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Proper Docker installed and configured
First of all, create a local clone of PrivateSky CSB-Wizard project locally
git clone https://github.com/PrivateSky/csb-wizardEnter into checkout project and find the dockerfile
cd csb-wizard/dockerBuild the dockerfile into a Docker container image
./build.shStart a new container based on local Docker container image already built
./start.shAfter the start process successful,access demo web application found at http://localhost:90/web/index.html
Install or update Node to version 12.14.0 or newer.
First of all, create a local clone of the PrivateSky Github project:
git clone https://github.com/PrivateSky/privateskyEnter into checkout folder and run the following command:
cd privatesky npm run installThe Node version is checked and if is all good the installation process begins by downloading the required dependencies. Once the installation process has finished successfully, run the script:
For Linux:
./bin/virtualMq.sh [--port=8080] [--folder="../tmp"]For Windows:
bin\virtualMq.bat [--port=8080] [--folder="../tmp"]
The default port that will be used is 8080 and the folder is ../tmp
.
Once the command is executed and the virtualMq server is running, run the following command:
For Linux:
./bin/csbwizard.sh [--port=8080] [--folder="../tmp"]For Windows:
bin\csbwizard.bat [--port=8080] [--folder="../tmp"]
The default port that will be used is 8081 and the folder is ../tmp
.
CSBWizard exposes the following API:
Creates a new transaction and returns it's ID to be used in subsequent requests.
- URL
/beginCSB
- Method
POST
- URL Params
None
- Data Params
None
-
Success Response
- Code:200
- Content-Type:
text/plain
- Content:
#transactionId
Accepts an URL to a VirtualMQ server where it will send a backup of the CSB when calling build CSB endpoint.
- URL
/addBackup/:transactionId
- Method
POST
- URL Params
- Required:
transactionId=[alphanumeric]
- Data Params
-
Required:
- Content-Type:
text/plain
- Content: Base URL to VirtualMQ (ex: http://localhost:8080 if default settings were used)
- Content-Type:
-
Required:
-
Success Response
- Code: 200 OK
- Content:
None
Attaches a reference with specified name to the resulting CSB from current transaction.
- URL
/attachFile/:transactionId/:fileAlias
- Method
POST
- URL Params
- Required:
transactionId=[alphanumeric]
fileAlias=[alphanumeric]
- Data Params
-
Required:
- Content-Type:
application/octet-stream
- Content:
data stream
- Content-Type:
-
Required:
-
Success Response
- Code: 200 OK
- Content:
None
-
Error Response
- Code: 409 CONFLICT
- Reason: A file with the same
#fileAlias
already exists
Sends the created CSB to the provided backups and returns the SEED used to encrypt it. Also, the SEED of the created CSB is sent to a remote channel for future retrieval.
- URL
/buildCSB/:transactionId/
- Method
POST
- URL Params
- Required:
transactionId=[alphanumeric]
- Data Params
- Required:
URL=[alphanumeric]
Channel=[alphanumeric]
-
Success Response
- Code: 200 OK
- Content-Type:
text/plain
- Content:
#SEED
In order to show how the CSBWizard API is used, a web application can be accessed at http://localhost:8081/web/index.html