Elections Bulletin Board
This is a work in progress and is not fully working yet.
In order to celebrate End-to-end auditable votings using the Elections module, you will need to connect your Decidim instance with an instance of the Decidim Bulletin Board application.
Note: The connected Bulletin Board instance is used by all organizations, therefore it’s recommended to set it up by an independent organization.
Identification pair of keys generation
The first step needed to setup the connection is to generate a pair of keys to identify the application against the Bulletin Board. This can be done running the following rake task in your application environment:
bundle exec rake decidim_elections:generate_identification_keys
This task will output the generated private and public keys. You should copy the public key and send it, together with your Authority name to the Bulletin Board administrator through a secure channel. Together with the key, send your Authority name to the Bulletin Board administrator.
After that, copy the private key and store that value on the environment variable
AUTHORITY_PRIVATE_KEY and your Authority name on the variable
Ensure that the private key is not lost between deployments and servers reboots and that it can only be accessed by the application.
As an administrator of the Bulletin Board, you find the steps to be taken here.
Configuration of the Bulletin Board application
The Bulletin Board administrator will store the received public key in their server and will send you back an API key.
To complete the setup process you should store this API key and the Bulletin Board URL address on the environment variables
The following YAML snippet with all the defined environment variables should be used in the
default block of your application
Maybe this is already done, as it was included in the Decidim applications generator during the development of the Elections module.
elections: bulletin_board_server: <%= ENV["BULLETIN_BOARD_SERVER"] %> bulletin_board_public_key: <%= ENV["BULLETIN_BOARD_PUBLIC_KEY"] %> authority_api_key: <%= ENV["AUTHORITY_API_KEY"] %> authority_name: <%= ENV["AUTHORITY_NAME"] %> authority_private_key: <%= ENV["AUTHORITY_PRIVATE_KEY"] %> scheme_name: <%= ENV["ELECTIONS_SCHEME_NAME"] %> number_of_trustees: <%= ENV["ELECTIONS_NUMBER_OF_TRUSTEES"] %> quorum: <%= ENV["ELECTIONS_QUORUM"] %>
After restarting the Decidim instance, administrator users will be able to create elections on the configured Bulletin Board.
A crontab line must be added to your server to be able to open and close the Ballot Box for the elections automatically. You could use Whenever to manage it directly from the APP. You probably want to schedule a
bundle exec rake decidim_elections:scheduled_tasks every hour.