GovStack Consent Building Block API server by iGrant.io.
3.1K
This repository hosts source code for the reference implementation of GovStack Consent Building Block service APIs. For details, please visit the project page.
Pre-requisite: Keycloak and MongoDB are running locally. Alternatively, we recommend building from the source and running as described in the subsequence section.
docker run -p 3000:80 igrantio/bb-consent-api:<tag>
Example: To run 2023.11.12, execute the following command in the terminal
docker run -p 3000:80 igrantio/bb-consent-api:2023.11.12
In case you wish to override the base URL for consent-bb API server to connect to from the admin dashboard, use the following command:
docker run -v config-development.json:/opt/bb-consent/api/config/config-production.json -p 3000:80 igrantio/bb-consent-api:2023.11.12
A sample config JSON file is as given below:
{
"DataBase": {
"hosts": [
""
],
"name": "",
"username": "",
"password": ""
},
"ApplicationMode": "",
"Organization": {
"name": "",
"location": "",
"description": "",
"eulaUrl": ""
},
"User": {
"username": "",
"password": ""
},
"ApiSecretKey": "",
"Type": {
"name": ""
},
"Iam": {
"url": "",
"realm": "",
"ClientId": "",
"Jwks": {
"RsaRawN": "",
"RsaRawE": ""
},
"AdminUser": "",
"AdminPassword": "",
"timeout": 5
},
"Smtp": {
"username": "",
"password": "",
"host": "",
"port": 587,
"adminEmail": ""
},
"Twilio": {
"accountSid": "",
"authToken": ""
},
"Webhooks": {
"events": [
"consent.allowed",
"consent.disallowed"
]
},
"PrivacyDashboardDeployment": {
"Hostname": "",
"Version": ""
},
"Policy": {
"Name": "",
"Url": "",
"IndustrySector": "",
"GeographicRestriction": "",
"StorageLocation": ""
}
}
The prerequisites for getting the server up and running are as follows:
You can request a pre-defined configuration file and skip the following steps by contacting [email protected]. Please specify the desired admin username in your request. Alternatively, you can go ahead with steps 3 and 4 for manual installation and configuration.
Note: It is recommended to remove all container instances and volumes running using docker container rm -f $(docker container ls -aq) and docker volume rm $(docker volume ls -q). If any of the steps below need to be repeated, we recommend this step to ensure a clean environment.
Now, follow the steps below to get the ConsentBB API server up and running:
git clone.git checkout tags/2023.10.4.make setup. This sets up the necessary dependencies and configurations for running the Consent BB API server instance.make build. The compiles and assembles source code into executable files or libraries, following the instructions specified in the Makefile of Consent BB API server instance.make run. This executes a predefined set of instructions in the Makefile to launch or run the compiled Consent BB API server instance.The server is up and running now locally at https://api.bb-consent.dev/v2. You can use openAPIs with postman or the admin dashboard to interact with the Consent BB server instance.
Feel free to improve the plugin and send us a pull request. If you find any problems, please create an issue in this repo.
Copyright (c) 2023-25 LCubed AB (iGrant.io), Sweden
Licensed under the Apache 2.0 License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE for the specific language governing permissions and limitations under the License.
Content type
Image
Digest
sha256:dc246755f…
Size
18.1 MB
Last updated
over 2 years ago
docker pull igrantio/bb-consent-api:2024.2.1