Skip to content

The Consent Building Block for GovStack

License

Notifications You must be signed in to change notification settings

GovStackWorkingGroup/bb-consent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Consent Building Block (Govstack)

CircleCI latest spec on GitBook last commits open issues license

AboutRelease StatusCore TeamContributingSpecificationRepo structure Development

About

Consent BB defines the principles, functions and architecture of an information system that enables services for individuals to approve the use of her/his personal data and for information system operators that process personal data of individuals to know the will of the individual and legitimately process such personal data.

It is a process-oriented GovStack BB facilitating auditable bilateral agreement within a multi-agent environment, that integrates with most other BBs.

This repository contains the deliverables from Consent BB team, as part of the Govstack project.

Core Team

Working Group Representative: Ramkumar ([email protected])

Release Status

All diagrams and API specifications contained here are subject to ongoing changes by a GovStack Working Group. You can find more details about our release history and roadmap in the specification itself:

https://govstack.gitbook.io/bb-consent/

Contributing

Feel free to improve the plugin and send us a pull request. If you found any problems, please create an issue in our Jira project: https://govstack-global.atlassian.net/jira/software/c/projects/CON/issues

Consent specs in Gitbook

Govstack specs are published at Gitbook - Govstack Global.

You may view the Consent BB's latest publication directly on https://govstack.gitbook.io/bb-consent/.

Note that pushes to the main branch will automatically trigger a Gitbook build and deployment from the /spec directory.

Repo Structure

README.md
/dev.sh # A utility script for the Consent BB, see README.md
/spec # the markdown files which are used to build the specification in GitBook
/api # the openapi specification
/test # the test plan and tests
  plan.md
/examples # examples for deploying, configuring, and testing applications which implement the behaviors specified by this building block
  /mock
    README.md # instructions for deployment/testing
    docker-compose.yaml # example deployment file
      db
      web
      adaptor
      security-server
    Caddyfile # example config for "adaptor"
    Dockerfile # dockerfile to build "adaptor"
  /application-a
  /application-b
  /application-c

dev.sh

This file is written to closely reproduce the same environment that otherwise runs on Circle CI. The intention is to help with shortcuts for local demos and development of the mock application and test suites.

# Auto-generate all OpenAPI assets from CSV exports
./dev.sh build-openapi-assets

# Build docker images
./dev.sh build

# Launch docker-compose mock application
./dev.sh

# Output API spec markdown for GitBook
./dev.sh gitbook-api-spec

Once you have the mock application up and running, you can now access several interesting endpoints:

To get a terminal prompt for the Django app container, run docker-compose exec -it consent /bin/bash.

The docker compose environment has an HTTP proxy on localhost:8080 and localhost:8888 (HTTPS). The proxy serves static mocks, but for all dynamic mocks there is a mock application where all other requests are forwarded to.

The mock application sits on http://localhost:8000 (8000 is the default Django development port) and may be accessed directly in cases where you for instance need to see the raw traceback of an error that has occurred. You can access the Django Admin site with credentials admin:admin on http://localhost:8000/admin.

Running tests

# Run mock application for testing + test suite
# NB! Close the other development environment
./dev.sh test

Prerequisites

  • Docker
  • Docker Compose v2