{"id":28433041,"url":"https://github.com/decidim/decidim-bulletin-board","last_synced_at":"2025-07-01T11:31:04.821Z","repository":{"id":37471855,"uuid":"276080744","full_name":"decidim/decidim-bulletin-board","owner":"decidim","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-01T12:11:18.000Z","size":83693,"stargazers_count":5,"open_issues_count":11,"forks_count":6,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2025-06-05T09:56:00.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decidim.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-AGPLv3.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-30T11:33:16.000Z","updated_at":"2022-05-10T06:10:20.000Z","dependencies_parsed_at":"2023-12-20T13:24:23.962Z","dependency_job_id":"cda8152a-e1af-4b12-9d19-4a1b34a67713","html_url":"https://github.com/decidim/decidim-bulletin-board","commit_stats":{"total_commits":244,"total_committers":17,"mean_commits":"14.352941176470589","dds":0.6721311475409837,"last_synced_commit":"b80e7e320b46d63164c251eaee82f70e51dd4fcc"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/decidim/decidim-bulletin-board","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decidim%2Fdecidim-bulletin-board","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decidim%2Fdecidim-bulletin-board/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decidim%2Fdecidim-bulletin-board/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decidim%2Fdecidim-bulletin-board/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decidim","download_url":"https://codeload.github.com/decidim/decidim-bulletin-board/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decidim%2Fdecidim-bulletin-board/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260089948,"owners_count":22957156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T17:36:45.546Z","updated_at":"2025-07-01T11:31:04.805Z","avatar_url":"https://github.com/decidim.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Decidim Bulletin Board\n\nDecidim 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].\n\n== Overview\n\nThis repository follows the monorepo pattern and includes the following projects:\n\n- **bulletin_board/server**: A Ruby on Rails application that contains the Bulletin Board service. You can check the project details https://github.com/decidim/decidim-bulletin-board/blob/develop/bulletin_board/server/README.md[here].\n- **bulletin_board/ruby-client**: A Ruby gem that can be included in other applications to interact with the Bulletin Board application. You can check the project details https://github.com/decidim/decidim-bulletin-board/blob/develop/bulletin_board/ruby-client/README.md[here].\n- **verifier**: A command line application to audit ballots and verify the election results.\n- **voting_schemes**: Implementation of different cryptographic voting schemes to be used to run the elections. Currently, it includes the Dummy scheme, used only for testing purposes, and the ElectionGuard scheme, based on the Python implementation of the protocol.\n\n== Getting started with this repository\n\n- Clone this repository with submodules `git clone --recurse-submodules -j8 https://github.com/decidim/decidim-bulletin-board.git`\n- Or clone the submodules separately after the initial clone by running `git submodule update --init --recursive` in the repository folder\n- Use one of the development methods below\n\n=== Running on Docker\n\nYou can run this application conveniently packaged with docker compose.\n\nYou can use the existing xref:./docker-compose.yml[docker-compose.yml] as starting point.\nAmong 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.\n\nAlso, 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:\n\n```console\nIDENTIFICATION_PRIVATE_KEY=-private-key-for-this-bulletin-board\nRUN_SIDEKIQ=true\n```\n\n==== Configuring a new bulletin board instance\n\nThe 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:\n\n```console\nbin/rails client:generate_identification_private_key\n```\n\nYou 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.\n\nThe result will look something like this\n\n```console\nroot@8e29f0e27bcd:/code/bulletin_board/server# bin/rails client:generate_identification_private_key\n\n{\"kty\":\"RSA\",\"n\":\"xAXGOyY4GbdRqsVDYBvyVDP00eFkEuBN_WAU8IEMndQ-F-Z7K38hzGVrgED02YloFf984bKaLTjyBzpTx5MDA-4Hj1rjxoCRTPUHm-3_ixH511HT0fLI4060MerbFhD1QiQ8V6s-LBt8XicCmNHT-rpxd8zLsFAWnsTP-1FfEzDdzPXFZiL5VFZTUfy-JjXvE1DyCzKIiSFSgM0H2Z6wKgBKEmLt3tzdHZrs2QgaHOmZciPvRy6pXCkcRZs4Sjj0Fr-oaisA--wIcb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Mp5Qab9Z0R3xfZKeo-GVUstyILO8olJb8Ovkx0dvQmkfsiXLzrsUfS6F1PE0Q\",\"dq\":\"DkJhVSJJErQE3sPZpUoWMb1b07Nk6Dc4YhkoHHGxMv78_WOZpKBvFFrfl2GwQQyAnfi2k5U4LiCGGkMnImF42KcrM8uC3HXENGDBJacmjigJmeH_91iR5aZobEwffxzCW1J52S_qHdb50r-lSzjCrYnaCfn9IpTt70h5CnQD02eNxoKY-PCMpJOlEU-NOGx2jJH1eTcwcpWp5xlisXY-yEMF0jFl7jDgfTlii2-AKawG0hZ7N5jMlKAL3H2AOIqNCTZX6Y-MmetbBgHLLhI7O7aIU6NYGs9GAl6S5eb89N0Og7yBRx0fWaUqrZp55b3WK37xWmJM6aaxAY1d4S6Enw\",\"qi\":\"udzzCRwy8Qp-ptLyxpaVy0BCSB8vBAyvYAikYoODil4DkLebcTmGTgXdghTFU5m3T20kEat1mWI4K-wkNSMLRtVRJrM83Jl0bbS_0gMwj0A7fdPM-bm8NWU-CY3lAc4V6iS43RXyJhoakSK2NJOrlvSaRMVYFQDwKP1oL5-ZuEnAPaR0YwDHOkxY40eCk9Ve2x4L9OBUqLTN_l827QrMXldVPnnVwTRDaFGFZ8BniKE4UjFO0I3coe4EH9CaQpFP8TDeLQVDncXuXHHCNi7sH-qzjDOsTLayi4uuxLL4nEZldCHz5geBp7n09GfNQsTKvMEtOC50oPJlkR898mc0vg\"}\n\nAbove is the generated identification private key.\n\n- You should copy it and store that value on the environment variable IDENTIFICATION_PRIVATE_KEY.\n\n- Ensure that it is not lost between deployments and servers reboots, and that only can be accessed by the application.\n```\n\nJust 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.\n\nIf not done yet, you must initialize the PostgreSQL database first with the command `bin/rails db:create db:migrate`.\n\nFinally, run the bulletin board with `docker-compose up -d`.\n\nYou 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.\n\nFor instance, with Ngnix you could use this configuration (although you need to add SSL, for instance using LetsEncrypt)\n\n```nginx\nserver {\n  listen 80;\n  server_name my-bulletin-board.example.com;\n\n  location / {\n    proxy_pass http://localhost:3000;\n  }\n}\n```\n\nOnce the bulletin board is up and running, now you need to configure a new Decidim Authority to use it.\n\nAt 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).\n\n==== Configuring a new Decidim Authority\n\nEach 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.\n\nTo 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**:\n\n```console\nbin/rails decidim_elections:generate_identification_keys\n```\n\nThe result will look something like this:\n\n```console\n$ bin/rails decidim_elections:generate_identification_keys\n\nPRIVATE KEY:\n\n{\"kty\":\"RSA\",\"n\":\"wbt6n7uvR7O6KgOP_Idq-YzWf4DrjcpQSdQDCn0NB_nVmgDRq5kxe3z63Dpk2nWY8ZfZz5THCkxkz-BllnxuYMjfBHD4zpkn5V3OIMcTpJTHH9kiAOYFFvCKDHlx9GQ86d_U9bkmLq-ucKNhk-tdLZ0qv4FVJyPn6Q-hBnhkGC_lnGhe0vePVHE2nSGHPRhwqE4yFnSGj6L2o11oG2sQvFlM_a0xyTE-PX4P4quJUZo1I3-hQjPZqmniaL9L7bqBdAYkQLC8IEjLfBJC7GeXmRGkm45TmuKDy57JydhOvzLCFG4U6linqdv-8xkkejlzkYwFJc_R3WiuuFT65JmyiIQVVHFWPPl403bnxi5LB3DP9CT7zngd7tdJwSXzndBOpOoLTWbvrQTHhshw-XxPeP548rN2UDyzUtg1Rh__TmGExj3ZlXOqA1H6TPxmy4kjnqcOfgeH-8omWIq2Woa46EfHQ2BsLzqE6uYeiau22cv3Sd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ZLQ3fnvKNwRmToJ44Q6aglkkOFoyFnEJdg3FlymddMNBMGEWTHC2kLJhlAHTpR0UPtPNsG2fVjDRoIWgBSpQ4-1LaZc3rxPFDKYermpmA6nImuUBaQ4VJ6KXExzBpcubOm8FWYYLWpiOJsReFDZwzI4uIzY1wC172MNhf4tF6ZJ-qJKeBMcIyVDa8\u0026e=AQAB\u0026kid=f18965a6a859e284f0ea076d2140e212f1bbd484e029b69c3d9cc06b34e61b0a\n\nAbove are the generated private and public keys.\n\nSee Decidim docs at docs/services/bulletin_board.md in order to set them up.\n```\n\nYou 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.\n\nThen 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:\n\n```console\nbin/rails 'client:add_authority[AuthorityName, public-key]\n```\n\n- **AuthorityName**; is the name of the authority, for instance, the name of the Decidim tenant. It can be anything as long is the same in Decidim and in the bulletin board.\n- **public-key**: is the public key generated in the Decidim server by the previously explained command.\n\nThis command will produce an output like this:\n\n```console\n$ bin/rails 'client:add_authority[AuthorityName,kty=RSA\u0026n=wbt6n7uvR7O6KgOP_Idq-YzWf4DrjcpQSdQDCn0NB_nVmgDRq5kxe3z63Dpk2nWY8ZfZz5THCkxkz-BllnxuYMjfBHD4zpkn5V3OIMcTpJTHH9kiAOYFFvCKDHlx9GQ86d_U9bkmLq-ucKNhk-tdLZ0qv4FVJyPn6Q-hBnhkGC_lnGhe0vePVHE2nSGHPRhwqE4yFnSGj6L2o11oG2sQvFlM_a0xyTE-PX4P4quJUZo1I3-hQjPZqmniaL9L7bqBdAYkQLC8IEjLfBJC7GeXmRGkm45TmuKDy57JydhOvzLCFG4U6linqdv-8xkkejlzkYwFJc_R3WiuuFT65JmyiIQVVHFWPPl403bnxi5LB3DP9CT7zngd7tdJwSXzndBOpOoLTWbvrQTHhshw-XxPeP548rN2UDyzUtg1Rh__TmGExj3ZlXOqA1H6TPxmy4kjnqcOfgeH-8omWIq2Woa46EfHQ2BsLzqE6uYeiau22cv3SdPKLuZLQ3fnvKNwRmToJ44Q6aglkkOFoyFnEJdg3FlymddMNBMGEWTHC2kLJhlAHTpR0UPtPNsG2fVjDRoIWgBSpQ4-1LaZc3rxPFDKYermpmA6nImuUBaQ4VJ6KXExzBpcubOm8FWYYLWpiOJsReFDZwzI4uIzY1wC172MNhf4tF6ZJ-qJKeBMcIyVDa8\u0026e=AQAB\u0026kid=f18965a6a859e284f0ea076d2140e212f1bbd484e029b69c3d9cc06b34e61b0a]'\n\nAuthority 'AuthorityName' successfuly added!\nThe API key for this authority is: WbyrkuMrn7Pgk-ebKQpQzpSkKSv-T-r0TaclfMFMspV7g6qoFRqFwYmAnb0PZqATDZx3WdIf6SIF-f40s16wBTbdlST-3ZZ3wWzctyvdb4Wha_hranhHPG6sR2Qmq5uk\n```\n\nNote 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.\n\nTo summarize, these are the ENV vars you need to add to your Decidim server once all this process has finished:\n\n===== ENV vars for the Decidim Server\n\n- `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\".\n- `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).\n- `AUTHORITY_NAME`: the name of the authority, for instance, the name of the Decidim tenant. In our examples, \"AuthorityName\".\n- `BULLETIN_BOARD_PUBLIC_KEY`: the public key of the bulletin board (see this value in the homepage of the Bulletin Board).\n- There are other variables relative to the elections configuration. Check it at https://docs.decidim.org/en/develop/services/elections_bulletin_board.html.\n\n=== Devcontainer\n\nThis 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.\n\nRead more about https://code.visualstudio.com/docs/remote/containers[devcontainers on Visual Studio Code documentation].\n\n=== Manual development environment\n\nThese 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.\n\n==== Install Ruby and Node\n\nAssuming you already know how to if you are already working with Decidim.\n\n==== Install Python\n\nThis 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`\n\nYou 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].\n\n- Run `curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash`\n- Add the following to your `~/.bashrc`:\n```\nexport PYENV_ROOT=\"$HOME/.pyenv\"\nexport PATH=\"$PYENV_ROOT/bin:$PATH\"\neval \"$(pyenv init --path)\"\neval \"$(pyenv init -)\"\neval \"$(pyenv virtualenv-init -)\"\n```\n- Restart the console\n- `PYTHON_CONFIGURE_OPTS=\"--enable-shared\" pyenv install`\n\n==== Install Poetry\n\n- Run `curl -sSL https://install.python-poetry.org | python3 -`\n- Add the following to your `~/.bashrc`: `export PATH=\"$HOME/.poetry/bin:$PATH\"`\n\n==== Install Pipenv\n\nRun: `pip install pipenv`\n\n==== Install the build dependencies\n\nInstall the needed packages for building the extensions `apt-get install libgmp3-dev`\n\n==== Install the Ruby adapter dependencies\n\nInstall the dependency gems in the Ruby adapter `cd voting_schemes/electionguard/ruby-adapter \u0026\u0026 bundle`\n\n==== Install the necessary software\n\nInstall the necessary software to run the bulletin board server `apt-get install postgresql libpq-dev redis-server`\n\nYou 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:\nhttps://docs.docker.com/engine/install/\n\nFinally, install all the necessary local dependencies by running `make install`.\n\n==== Build and configure\n\nNow 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.\n\nFor 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.\n\n== Building and publishing the docker images\n\nRun `make help_electionguard` to get help about building and publishing the docker images.\n\n== License\n\nSee https://github.com/decidim/decidim[Decidim].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecidim%2Fdecidim-bulletin-board","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecidim%2Fdecidim-bulletin-board","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecidim%2Fdecidim-bulletin-board/lists"}