Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade bulletin version to 0.24.4 #309

Merged
merged 40 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f97b543
Upgrade pyodide to 0.17
txus Apr 10, 2021
2c1cffc
change version numbers
microstudi Sep 28, 2023
c6fbe89
Merge remote-tracking branch 'upstream/upgrade/pyodide' into update-p…
microstudi Sep 28, 2023
b6e24ab
update base docker image for pyodide
microstudi Sep 28, 2023
a4a9209
update redis
microstudi Sep 29, 2023
593f2a3
rename pythong worker
microstudi Oct 2, 2023
9d84907
remove todos
microstudi Oct 3, 2023
d250f25
some linting
microstudi Oct 3, 2023
63d36a9
format js
microstudi Oct 3, 2023
bc28c4e
update workflows
microstudi Oct 3, 2023
b867354
update workflows
microstudi Oct 3, 2023
2567e16
update workflows
microstudi Oct 3, 2023
425b0c4
fix rubocop source
microstudi Oct 3, 2023
6ca292a
update test dependencies
microstudi Oct 3, 2023
66ccaee
fix integration test for python wrapper
microstudi Oct 3, 2023
ba0badd
prettier on server js
microstudi Oct 3, 2023
8e0fa2a
remove git check
microstudi Oct 3, 2023
4ea6dd4
add exception for git
microstudi Oct 3, 2023
decdd2f
update digest gem
microstudi Oct 3, 2023
cdd811a
add safe git dir
microstudi Oct 3, 2023
ab9d7cd
restorey types definition
microstudi Oct 3, 2023
e704474
fix build
microstudi Oct 3, 2023
d44f70a
changelog
microstudi Oct 3, 2023
83470a4
Bump to version 0.24.3
microstudi Oct 3, 2023
a5c593c
update prettier
microstudi Oct 4, 2023
7e10b2f
update prettier
microstudi Oct 4, 2023
cbc978d
incremement test timeout
microstudi Oct 5, 2023
b472d2c
incremement test timeout
microstudi Oct 5, 2023
24f703a
Merge branch 'update-pyodide-17' into upgrade-0.25
microstudi Oct 5, 2023
113acf7
Bump to version 0.24.4
microstudi Oct 5, 2023
b7e4d1a
Merge branch 'develop' into upgrade-0.25
microstudi Oct 24, 2023
95bbe07
add docs
microstudi Oct 24, 2023
71a0201
fix readm
microstudi Oct 24, 2023
0611357
update graphql libraries
microstudi Oct 24, 2023
bfb96ac
do not update gem libs
microstudi Oct 24, 2023
7ee3666
force update
microstudi Oct 24, 2023
b1d54ce
apply corrections
microstudi Nov 20, 2023
6f71d79
relative path
microstudi Nov 20, 2023
da407d0
relative path
microstudi Nov 20, 2023
22d41c8
fix name
microstudi Nov 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.24.4] - 2023-10-05

- Minor bugfixes

## [0.24.3] - 2023-10-03

- Fixes for the pyodide upgrade
- Libraries updates

Expand Down
123 changes: 123 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,129 @@ This repository follows the monorepo pattern and includes the following projects
- Or clone the submodules separately after the initial clone by running `git submodule update --init --recursive` in the repository folder
- Use one of the development methods below

=== 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:

```console
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:

```console
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

```console
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-JjXvE1DyCzKIiSFSgM0H2Z6wKgBKEmLt3tzdHZrs2QgaHOmZciPvRy6pXCkcRZs4Sjj0Fr-oaisA--wIcbsnBofkgL--Ncv0w6VfvHmm-r1GPuzX-ucu1IbjPLLaLnE6RpLuq17-W8xpdFbLz9UQ-ZUr0pmvYK5pYprtmqQdG-uagmyOSzFuZCSTEOqeSdeKWRnFubdnEoPP7s6hFqaptpk-Y7WeSamkvtFQ6Ery6CikJWc7kTIhoGpnZH6VeFwLTsKq3t7c2WW7bZio2xlmdo40FFHr_p0Tuf38v0-A-y525jNKriOWC6JZdQN1yJMWnReoReom8ydDqjsepSEgwAmBK38hcXZgHR8otzf_EvGcR2mmwSWnMRk2lu9J1nV2OYBmy1C79vZK8V6MruiRz595Lz-amHbwkikC1GHG9MQUhlUiqKsYLC-ammF01mT9mjZ-fnUcZu09VS9NRq33K9MfXTuZfGlnLEB_848MHr9zDkc","e":"AQAB","kid":"f32df481d9d9d3c73fd88fa819b1ef5a844de5110cd3d72829f5adb90a08ba19","d":"ddca0lgphZwk5kpsNIzYYzJQzRN4O7jIabenHuYVlZQQOAIAradhxCR8Ob_S8iuefQr4Ih5ifSksppez4dhJCcXAmbeEEsMblm3_Qw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40eCk9Ve2x4L9OBUqLTN_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)

```nginx
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**:

```console
bin/rails decidim_elections:generate_identification_keys
```

The result will look something like this:

```console
$ bin/rails decidim_elections:generate_identification_keys

PRIVATE KEY:

{"kty":"RSA","n":"wbt6n7uvR7O6KgOP_Idq-YzWf4DrjcpQSdQDCn0NB_nVmgDRq5kxe3z63Dpk2nWY8ZfZz5THCkxkz-BllnxuYMjfBHD4zpkn5V3OIMcTpJTHH9kiAOYFFvCKDHlx9GQ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HE2nSGHPRhwqE4yFnSGj6L2o11oG2sQvFlM_a0xyTE-PX4P4quJUZo1I3-hQjPZqmniaL9L7bqBdAYkQLC8IEjLfBJC7GeXmRGkm45TmuKDy57JydhOvzLCFG4U6linqdv-8xkkejlzkYwFJc_R3WiuuFT65JmyiIQVVHFWPPl403bnxi5LB3DP9CT7zngd7tdJwSXzndBOpOoLTWbvrQTHhshw-XxPeP548rN2UDyzUtg1Rh__TmGExj3ZlXOqA1H6TPxmy4kjnqcOfgeH-8omWIq2Woa46EfHQ2BsLzqE6uYeiau22cv3SdPKLuZLQ3fnvKNwRmToJ44Q6aglkkOFoyFnEJdg3FlymddMNBMGEWTHC2kLJhlAHTpR0UPtPNsG2fVjDRoIWgBSpQ4-1LaZc3rxPFDKYermpmA6nImuUBaQ4VJ6KXExzBpcubOm8FWYYLWpiOJsReFDZwzI4uIzY1wC172MNhf4tF6ZJ-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:

```console
bin/rails 'client:add_authority[AuthorityName, public-key]
```

- **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.
- **public-key**: is the public key generated in the Decidim server by the previously explained command.

This command will produce an output like this:

```console
$ 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
andreslucena marked this conversation as resolved.
Show resolved Hide resolved

- `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).
- There are other variables relative to the elections configuration. Check it at https://docs.decidim.org/en/develop/services/elections_bulletin_board.html.

microstudi marked this conversation as resolved.
Show resolved Hide resolved
=== 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.
Expand Down
4 changes: 2 additions & 2 deletions bulletin_board/js-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bulletin_board/js-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@decidim/decidim-bulletin_board",
"version": "0.24.1",
"version": "0.24.4",
"description": "",
"main": "src/index.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions bulletin_board/ruby-client/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ source "https://rubygems.org"
# Specify your gem's dependencies in decidim-bulletin_board.gemspec
gemspec

# Graphql version 2.1 breaks graphql-client compatibility See https://github.com/github/graphql-client/pull/310
gem "graphql", "~> 2.0.0"

gem "rubocop", "~> 1.28.0"
gem "rubocop-faker", "~> 1.1.0"
gem "rubocop-rspec", "~> 2.10"
Loading
Loading