= Decidim Bulletin Board
Decidim Bulletin Board is written in Ruby on Rails and JavaScript, designed to provide services to https://decidim.org[Decidim] instances to allow them to run secure, end-to-end, auditable votings. Although it can't be used as a standalone application, since it doesn't offer a user interface for administrators to define elections nor for voters to cast their votes, you can see how it works in the https://decidim-bulletin-board-staging.herokuapp.com/sandbox/elections[sandbox].
== Overview
This repository follows the monorepo pattern and includes the following projects:
== Getting started with this repository
git clone --recurse-submodules -j8 https://github.com/decidim/decidim-bulletin-board.git
git submodule update --init --recursive
in the repository folder=== Running on Docker
You can run this application conveniently packaged with docker compose.
You can use the existing xref:./docker-compose.yml[docker-compose.yml] as starting point.
Among the typical Rails ENV vars (such as SECRET_KEY_BASE
), there is also the IDENTIFICATION_PRIVATE_KEY
env. This is the private key that identifies this bulletin board instance. Keep reading to see how to generate this private key.
Also, you need to have an additional docker instance running, with the same ENVs, a sidekiq
instance. This is very important as they are many background jobs created by the bulletin board on every cryptographic transaction. If using the provided xref:./docker-entrypoint.sh[entrypoint], you can use simply the ENV RUN_SIDEKIQ
in the worker:
IDENTIFICATION_PRIVATE_KEY=-private-key-for-this-bulletin-board
RUN_SIDEKIQ=true
==== Configuring a new bulletin board instance
The parameter that defines the identity of a bulletin board is its private key. This is simply an RSA type of key generated with the OpenSSL library. For convenience you can generate it with the following command:
bin/rails client:generate_identification_private_key
You must run this command inside the bulletin_board/server
folder or, if using docker-compose (you need it up and running first), access to the bash console with docker-compose exec app bash
and run it there.
The result will look something like this
root@8e29f0e27bcd:/code/bulletin_board/server# bin/rails client:generate_identification_private_key
{"kty":"RSA","n":"xAXGOyY4GbdRqsVDYBvyVDP00eFkEuBN_WAU8IEMndQ-F-Z7K38hzGVrgED02YloFf984bKaLTjyBzpTx5MDA-4Hj1rjxoCRTPUHm-3_ixH511HT0fLI4060MerbFhD1QiQ8V6s-LBt8XicCmNHT-rpxd8zLsFAWnsTP-1FfEzDdzPXFZiL5VFZTUfy-JjXvE1DyCzKIiSFSgM0H2Z6wKgBKEmLt3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k_Kx1-tlncIdaDLMr9Mp5Qab9Z0R3xfZKeo-GVUstyILO8olJb8Ovkx0dvQmkfsiXLzrsUfS6F1PE0Q","dq":"DkJhVSJJErQE3sPZpUoWMb1b07Nk6Dc4YhkoHHGxMv78_WOZpKBvFFrfl2GwQQyAnfi2k5U4LiCGGkMnImF42KcrM8uC3HXENGDBJacmjigJmeH_91iR5aZobEwffxzCW1J52S_qHdb50r-lSzjCrYnaCfn9IpTt70h5CnQD02eNxoKY-PCMpJOlEU-NOGx2jJH1eTcwcpWp5xlisXY-yEMF0jFl7jDgfTlii2-AKawG0hZ7N5jMlKAL3H2AOIqNCTZX6Y-MmetbBgHLLhI7O7aIU6NYGs9GAl6S5eb89N0Og7yBRx0fWaUqrZp55b3WK37xWmJM6aaxAY1d4S6Enw","qi":"udzzCRwy8Qp-ptLyxpaVy0BCSB8vBAyvYAikYoODil4DkLebcTmGTgXdghTFU5m3T20kEat1mWI4K-wkNSMLRtVRJrM83Jl0bbS_0gMwj0A7fdPM-bm8NWU-CY3lAc4V6iS43RXyJhoakSK2NJOrlvSaRMVYFQDwKP1oL5-ZuEnAPaR0YwDHOkxY40eCk9Ve2x4L9OBUqLTN_l827QrMXldVPnnVwTRDaFGFZ8BniKE4UjFO0I3coe4EH9CaQpFP8TDeLQVDncXuXHHCNi7sH-qzjDOsTLayi4uuxLL4nEZldCHz5geBp7n09GfNQsTKvMEtOC50oPJlkR898mc0vg"}
Above is the generated identification private key.
- You should copy it and store that value on the environment variable IDENTIFICATION_PRIVATE_KEY.
- Ensure that it is not lost between deployments and servers reboots, and that only can be accessed by the application.
Just copy the content of the generated key, exactly as presented, with no break lines to the ENV IDENTIFICATION_PRIVATE_KEY
and you are ready to run the bulletin board server.
If not done yet, you must initialize the PostgreSQL database first with the command bin/rails db:create db:migrate
.
Finally, run the bulletin board with docker-compose up -d
.
You can connect then to the test server in http://localhost:3000. Note that you can add a proxy on top of it to use a custom domain name.
For instance, with Ngnix you could use this configuration (although you need to add SSL, for instance using LetsEncrypt)
server {
listen 80;
server_name my-bulletin-board.example.com;
location / {
proxy_pass http://localhost:3000;
}
}
Once the bulletin board is up and running, now you need to configure a new Decidim Authority to use it.
At this point you can connect your browser to http://localhost:3000 (or your configured URL if in production) and you will see the public key corresponding to the private key you used to start the bulletin board. This is the public key that you must use to configure a new Decidim Authority (see next section).
==== Configuring a new Decidim Authority
Each bulletin board can host many Decidim Authorities. Each authority represents a Decidim Organization (also known as Tenant) and it is also identified as a unique RSA public/private key pairs. A bulletin board instance can host many authorities.
To add a new authority you must first create a new RSA key pair. Note that this key represents the Decidim instance so it must be generated by the Decidim instance itself and the bulletin board must only know about the public component. You can use the following command to generate a new key pair in the Decidim server:
bin/rails decidim_elections:generate_identification_keys
The result will look something like this:
$ bin/rails decidim_elections:generate_identification_keys
PRIVATE KEY:
{"kty":"RSA","n":"wbt6n7uvR7O6KgOP_Idq-YzWf4DrjcpQSdQDCn0NB_nVmgDRq5kxe3z63Dpk2nWY8ZfZz5THCkxkz-BllnxuYMjfBHD4zpkn5V3OIMcTpJTHH9kiAOYFFvCKDHlx9GQ86d_U9bkmLq-ucKNhk-tdLZ0qv4FVJyPn6Q-hBnhkGC_lnGhe0vePVHE2nSGHPRhwqE4yFnSGj6L2o11oG2sQvFlM_a0xyTE-PX4P4quJUZo1I3-hQjPZqmniaL9L7bqBdAYkQLC8IEjLfBJC7GeXmRGkm45TmuKDy57JydhOvzLCFG4U6linqdv-8xkkejlzkYwFJc_R3WiuuFT65JmyiIQVVHFWPPl403bnxi5LB3DP9CT7zngd7tdJwSXzndBOpOoLTWbvrQTHhshw-XxPeP548rN2UDyzUtg1Rh__TmGExj3ZlXOqA1H6TPxmy4kjnqcOfgeH-8omWIq2Woa46EfHQ2BsLzqE6uYeiau22cv3SdPKLuZLQ3fnvKNwRmToJ44Q6aglkkOFoyFnEJdg3FlymddMNBMGEWTHC2kLJhlAHTpR0UPtPNsG2fVjDRoIWgBSpQ4-1LaZc3rxPFDKYermpmA6nImuU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6ZJ-qJKeBMcIyVDa8&e=AQAB&kid=f18965a6a859e284f0ea076d2140e212f1bbd484e029b69c3d9cc06b34e61b0a
Above are the generated private and public keys.
See Decidim docs at docs/services/bulletin_board.md in order to set them up.
You need then to add the private part to you Decidim Server as the ENV var AUTHORITY_PRIVATE_KEY
(AUTHORITY_PRIVATE_KEY={"kty":"RSA","n":"wbt...
). Copy verbatim, no break lines. Also, create a new name for you Decidim instance and place it in the ENV AUTHORITY_NAME
. You will need this identifier to configure the bulletin board server. Other variables are important, see the https://docs.decidim.org/en/develop/services/elections_bulletin_board.html[Decidim docs] for it.
Then you need to add the public part to the bulletin board server. This is done in the bulletin board server. You can do it with the following command:
bin/rails 'client:add_authority[AuthorityName, public-key]
This command will produce an output like this:
$ bin/rails 'client:add_authority[AuthorityName,kty=RSA&n=wbt6n7uvR7O6KgOP_Idq-YzWf4DrjcpQSdQDCn0NB_nVmgDRq5kxe3z63Dpk2nWY8ZfZz5THCkxkz-BllnxuYMjfBHD4zpkn5V3OIMcTpJTHH9kiAOYFFvCKDHlx9GQ86d_U9bkmLq-ucKNhk-tdLZ0qv4FVJyPn6Q-hBnhkGC_lnGhe0vePVHE2nSGHPRhwqE4yFnSGj6L2o11oG2sQvFlM_a0xyTE-PX4P4quJUZo1I3-hQjPZqmniaL9L7bqBdAYkQLC8IEjLfBJC7GeXmRGkm45TmuKDy57JydhOvzLCFG4U6linqdv-8xkkejlzkYwFJc_R3WiuuFT65JmyiIQVVHFWPPl403bnxi5LB3DP9CT7zngd7tdJwSXzndBOpOoLTWbvrQTHhshw-XxPeP548rN2UDyzUtg1Rh__TmGExj3ZlXOqA1H6TPxmy4kjnqcOfgeH-8omWIq2Woa46EfHQ2BsLzqE6uYeiau22cv3SdPKLuZLQ3fnvKNwRmToJ44Q6aglkkOFoyFnEJdg3FlymddMNBMGEWTHC2kLJhlAHTpR0UPtPNsG2fVjDRoIWgBSpQ4-1LaZc3rxPFDKYermpmA6nImuUBaQ4VJ6KXExzBpcubOm8FWYYLWpiOJsReFDZwzI4uIzY1wC172MNhf4tF6ZJ-qJKeBMcIyVDa8&e=AQAB&kid=f18965a6a859e284f0ea076d2140e212f1bbd484e029b69c3d9cc06b34e61b0a]'
Authority 'AuthorityName' successfuly added!
The API key for this authority is: WbyrkuMrn7Pgk-ebKQpQzpSkKSv-T-r0TaclfMFMspV7g6qoFRqFwYmAnb0PZqATDZx3WdIf6SIF-f40s16wBTbdlST-3ZZ3wWzctyvdb4Wha_hranhHPG6sR2Qmq5uk
Note that an API key is returned, you will also need to add this API key as an ENV var in your Decidim server. This is used to ensure only that Decidim instance can communicate with the bulletin board.
To summarize, these are the ENV vars you need to add to your Decidim server once all this process has finished:
===== ENV vars for the Decidim Server
BULLETIN_BOARD_API_KEY
: the API key generated by the bulletin board server when adding an authority. In our example "WbyrkuMrn7Pgk-ebKQpQzpSkKSv-T-r0TaclfMFMspV7g6qoFRqFwYmAnb0PZqATDZx3WdIf6SIF-f40s16wBTbdlST-3ZZ3wWzctyvdb4Wha_hranhHPG6sR2Qmq5uk".BULLETIN_BOARD_SERVER
: the URL of the bulletin board server, for instance, http://localhost:3000/api (note that you need to specify the path to the API).AUTHORITY_NAME
: the name of the authority, for instance, the name of the Decidim tenant. In our examples, "AuthorityName".BULLETIN_BOARD_PUBLIC_KEY
: the public key of the bulletin board (see this value in the homepage of the Bulletin Board).=== Devcontainer
This repository ships with a dev container to get you up and running quickly. This make is easy to get the development environment running without having to install all the dependencies.
Read more about https://code.visualstudio.com/docs/remote/containers[devcontainers on Visual Studio Code documentation].
=== Manual development environment
These instructions assume you're using the last stable version of Ubuntu (Ubuntu 22.04 LTS). It should work for other GNU/Linux based systems, but you'll need to translate the commands to your environment. For instance, instead of using apt, using your distribution package manager, the names of the packages will also change, etc.
==== Install Ruby and Node
Assuming you already know how to if you are already working with Decidim.
==== Install Python
This guide is assuming that you don't have any python development tooling installed on your home folder. If so, we recommend that you start with a clean state just to be sure, for instance, deleting .local/bin/pip with rm $[HOME}/.local/bin/pip
You can use e.g. https://github.com/pyenv/pyenv[pyenv] to install the correct version. You should fulfill the dependencies on you Operating System, see the https://github.com/pyenv/pyenv/wiki#suggested-build-environment[pyenv's suggested build environment].
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
~/.bashrc
:
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install
==== Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
~/.bashrc
: export PATH="$HOME/.poetry/bin:$PATH"
==== Install Pipenv
Run: pip install pipenv
==== Install the build dependencies
Install the needed packages for building the extensions apt-get install libgmp3-dev
==== Install the Ruby adapter dependencies
Install the dependency gems in the Ruby adapter cd voting_schemes/electionguard/ruby-adapter && bundle
==== Install the necessary software
Install the necessary software to run the bulletin board server apt-get install postgresql libpq-dev redis-server
You will also need to have Docker installed on your machine in order to build the images and push them to the Docker Hub. To install, please follow the official guides at: https://docs.docker.com/engine/install/
Finally, install all the necessary local dependencies by running make install
.
==== Build and configure
Now you should have everything you need to build the different modules, which you can do by running the make build
command at the root of the repository. If this fails, please update this guide how you fixed the problem.
For running the bulletin board server, you need to configure the DATABASE_USERNAME
and DATABASE_PASSWORD
environment variables with a user that has access to create new databases on the local PostgreSQL server.
== Building and publishing the docker images
Run make help_electionguard
to get help about building and publishing the docker images.
== License