-
Notifications
You must be signed in to change notification settings - Fork 21
/
config.yml
1503 lines (1306 loc) · 56.5 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This file is part of deployment-tool.
# Copyright (C) 2014-2016 Sequent Tech Inc <[email protected]>
# deployment-tool is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License.
# deployment-tool is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with deployment-tool. If not, see <http://www.gnu.org/licenses/>.
---
# global non-sequent related configuration variables
params:
# Sometimes services like supervisor take quite a while to restart and some
# others don't. Configure here exactly how many seconds it should wait for
# processes that restart slowly or and those that are fast.
sleep:
fast: 2
slow: 15
# global configuration
config:
backup_password: '<PASSWORD>'
version: 'master'
# global config. Note: currently some other keys are used as global conf
global_secret_key: '<PASSWORD>'
# Activate if cloudflare is used, so that the client ip address is taken from
# cloudflare HTTP headers and only cloudflare ips can access the http server
cloudflare: false
# create daily and live backups
postgres_backups:
# enables or disables backups
# set to false to stop making backups (it won't delete already archived backups)
# allowed values: true | false
enabled: true
# folder where the postgres backups will be stored
folder: /var/postgres_backups
# create a base backup every time postgres_backups.yml is deployed
# allowed values: true | false
backup_on_deploy: true
# enforces that a new WAL file is created after archive_timeout seconds max
archive_timeout: 600
# cron tab configuration for base backups
base_backups:
# number of days base backups are kept/stored (0 means forever)
keep_days: 15
# day of the week that the job should run ( 0-6 for Sunday-Saturday, *, etc )
weekday: '*'
# Day of the month the job should run ( 1-31, *, */2, etc )
day: '*'
# minute when the job should run ( 0-59, *, */2, etc )
minute: 0
# hour when the job should run ( 0-23, *, */2, etc )
hour: 4
# hostname of the machine
hostname: sequentech.io
# private ip address of this machine. Will ensure there is an alias
# in /etc/hosts to the hostname in this machine (and in others when they load
# this machine's eo package)
private_ipaddress: 192.168.50.4
# public ip address of this machine. Will ensure there is an alias
# in /etc/hosts to the hostname in this machine (and in others when they load
# this machine's eo package)
public_ipaddress: 192.168.0.11
# you can use this section to schedule crontab tasks. For example, it can be
# used to schedule election start for example, as shown below.
crontab_tasks: []
# - name: progressive-tally
# # job is the command to be run. The command should not contain line
# # breaks.
# job: 'bash -c "source /home/ballotbox/tenv/bin/activate; /home/ballotbox/ballot-box/admin/admin.py --children-election-ids 34562755,34562756 --force-tally force-all --mode active trigger_tally 34562754 >> /home/ballotbox/crontab.log 2>&1"'
# # The specific user whose crontab should be modified.
# user: 'ballotbox'
# # minute when the job should run ( 0-59, *, */2, etc )
# minute: '*/5'
# # hour when the job should run ( 0-23, *, */2, etc )
# hour: '*'
# # Day of the month the job should run ( 1-31, *, */2, etc )
# day: '*'
# # day of the week that the job should run ( 0-6 for Sunday-Saturday, *, etc )
# weekday: '*'
# # Month of the year the job should run ( 1-12, *, */2, etc )
# month: '*'
# - name: start-election
# # job is the command to be run. The command should not contain line
# # breaks.
# job: 'bash -c "source /home/ballotbox/tenv/bin/activate; /home/ballotbox/ballot-box/admin/admin.py auth_start 4 >> /home/ballotbox/crontab.log 2>&1"'
# # The specific user whose crontab should be modified.
# user: 'ballotbox'
# # minute when the job should run ( 0-59, *, */2, etc )
# minute: 0
# # hour when the job should run ( 0-23, *, */2, etc )
# hour: 15
# # Day of the month the job should run ( 1-31, *, */2, etc )
# day: '17'
# # day of the week that the job should run ( 0-6 for Sunday-Saturday, *, etc )
# weekday: '*'
# # Month of the year the job should run ( 1-12, *, */2, etc )
# month: '9'
# - name: stop-election
# # job is the command to be run. The command should not contain line
# # breaks.
# job: 'bash -c "source /home/ballotbox/tenv/bin/activate; /home/ballotbox/ballot-box/admin/admin.py auth_stop 4 >> /home/ballotbox/crontab.log 2>&1"'
# # The specific user whose crontab should be modified.
# user: 'ballotbox'
# # minute when the job should run ( 0-59, *, */2, etc )
# minute: 0
# # hour when the job should run ( 0-23, *, */2, etc )
# hour: 15
# # Day of the month the job should run ( 1-31, *, */2, etc )
# day: '18'
# # day of the week that the job should run ( 0-6 for Sunday-Saturday, *, etc )
# weekday: '*'
# # Month of the year the job should run ( 1-12, *, */2, etc )
# month: '9'
# enable multiple tallies. This enables multiple tallies even when the election is still open
enable_multiple_tallies: False
# configuration related to the election orchestration service, only active in
# election authorities
election_orchestra:
# port in which the nginx web server will serve the https eorchestra service
port: 5000
# allow and deny nginx ips specific for this service
ips:
allow: []
deny: []
# range of ports in which mixnet servers will run
mixnet_server_ports: [4081, 4083]
# range of ports in which mixnet hint servers will run
mixnet_hint_server_ports: [8081, 8083]
# database password for election-orchestra
eorchestra_password: '<PASSWORD>'
# enables or disables automatic creation or tallying of election
auto_mode: true
# this section is all about giving to some existing users permissions to
# sudo into ansible-created users. If you already have these kind of
# permissions, its not needed. Disabled by default.
sudoers:
# enables or disables the adding of the sudo permissions
is_enabled: false
# list of users, separated by commas and spaces, that can sudo into
# ansible-created users
sequent_users: sequent
http:
# Log level for error log in nginx.
#
# This log level stablishes the error_log directive level of error for
# nginx web server in /etc/nginx/nginx.conf at the http directive. The
# error log will appear in /var/log/nginx/error.log
#
# For more details, see
# http://nginx.org/en/docs/ngx_core_module.html#error_log
#
# Allowed values: debug, info, notice, warn, error, crit, alert, or emerg
# Default: error
nginx_error_log_level: info
# In big elections memory or disk buffer might need to be increased,
# specifically to upload the list of valid voterids if any filtering is going
# to be made, or when uploading the list of electors. This setting is
# applied at once to:
# play.http.parser.maxDiskBuffer (in ballot-box config)
# play.http.parser.maxMemoryBuffer (in ballot-box config)
# parsers.text.maxLength (in ballot-box config)
# DATA_UPLOAD_MAX_MEMORY_SIZE (in iam config)
# client_max_body_size (in nginx)
max_body_size: 2m
# When creating an election from the admin-console, the election config
# is passed through the url query parameters. If the configuration is
# large, it will hit the maximum client header size for NGINX. In that
# case you may want to increase its value here. Note that the default
# value is low to avoid denial of service attacks.
client_max_header_size: 8k
# This changes proxy_connect_timeout/proxy_send_timeout/proxy_read_timeout
# in the nginx web server.
# Any request to the server will timeout with a 504 code if the server
# doesn't answer after this time.
# Note that this value is not higher to avoid denial of service attacks.
nginx_timeout_secs: 120
# Path of the TLS PEM public certificate.
#
# Requirements:
# - It must be a file with -rw-r--r-- (644) file permissions owned by
# ballotbox:users.
# - Must be a PEM certificate encrypted with the key in the path specified
# in config.http.tls_cert_key_path.
#
# By default it is '/srv/certs/selfsigned/cert.pem', but you can change it
# to any other file you want
#
# NOTE: This file will not be signed between master and slaves in a load
# balancer configuration so you will have to replicate it if needed at your
# own, and it's ignored by create_backup.sh and restore_backup.sh scripts.
tls_cert_path: /srv/certs/selfsigned/cert.pem
# Just like tls_cert_path, but used only for the communication with the
# election authorities. This way, you can use one certificate publicly
# and another internaly.
internal_tls_cert_path: /srv/certs/selfsigned/cert.pem
# Path of the TLS PEM certificate private key.
#
# Requirements:
# - It must be a file with -rw-r--r-- (644) file permissions owned by
# ballotbox:users.
# - Must be the private key of the public certificate of
# config.http.tls_cert_path.
#
# By default it is '/srv/certs/selfsigned/key-nopass.pem', but you can
# change it to any other file you want
#
# NOTE: This file will not be signed between master and slaves in a load
# balancer configuration so you will have to replicate it if needed at your
# own, and it's ignored by create_backup.sh and restore_backup.sh scripts.
tls_cert_key_path: /srv/certs/selfsigned/key-nopass.pem
# Just like tls_cert_key_path, but used only for the communication with the
# election authorities. This way, you can use one certificate publicly
# and another internaly.
internal_tls_cert_key_path: /srv/certs/selfsigned/key-nopass.pem
# Path of the chained list of the public certificates of the Certificate
# Authorities that validate the config.http.tls_cert_path certificate
# signature.
#
# Requirements:
# - It must be a file with -rw-r--r-- (644) file permissions owned by
# ballotbox:users.
# - Must be a list of PEM certificate public keys.
#
# By default it is '/srv/certs/selfsigned/calist', but you can
# change it to any other file you want
#
# NOTE: This file will not be signed between master and slaves in a load
# balancer configuration so you will have to replicate it if needed at your
# own, and it's ignored by create_backup.sh and restore_backup.sh scripts.
tls_calist_path: /srv/certs/selfsigned/calist
# Just like tls_calist_path, but used only for the communication with the
# election authorities. This way, you can use one certificate publicly
# and another internaly.
internal_tls_calist_path: /srv/certs/selfsigned/calist
# Simple http authentication protection for all services under nginx.
# http_auth:
# - user: admin
# password: foobar
# - user: admin2
# password: whatever
http_auth: false
# Allows to restrict access to any administrative APIs and web app with a
# custom set of nginx rules
admin_zone:
enabled: false
rules: []
# Personalize the maintenance page
#
# By creating the file /etc/nginx/conf.d/maintenance.on automatically the
# server enters into maintenance mode and will only serve a file of the
# file below or the default one.
maintenance_file: ''
# CORS (HTTP Cross-origin resource sharing) is a measure implemented by
# web browsers that prevents an user agent to load an external resource if
# it is in another domain and that domain doesn't actively allows it with
# some CORS-specific headers
cors:
# Nginx regular expression to match $http_origin variable. The headers
# list will be set only if this regular expression matches
allow_origins_rx: "^$"
headers:
Access-Control-Allow-Origin: "$http_origin always"
Access-Control-Allow-Credentials: "'true' always"
Access-Control-Allow-Methods: "'GET, POST, OPTIONS' always"
Access-Control-Allow-Headers: "'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' always"
Content-Security-Policy: "'frame-ancestors \\'none\\'' always"
X-Frame-Options: "'DENY' always"
Strict-Transport-Security: "'max-age=63072000; includeSubDomains; preload' always"
# some java related configuration options
java:
# maximum size of heap memory in Megabytes (int). Default: 4000. Your total
# RAM + SWAP needs to be bigger than this. If you are going to do very
# big tallies (hundred of thousands of votes or millions), you will need to
# change this to something bigger.
max_heap_memory_usage: 4000
# multiple server hardening settings
hardening:
# if setup, the X-XSS-Protection header will be set to configure the
# web browser to block XSS attacks
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
# allowed value: '0', '1, mode=block', ..any valid X-XSS-Protection setting
x_xss_protection_header: '1; mode=block'
# Fail2ban is a service used for temporarely banning ips when multiple
# failed actions are detected in server logs
fail2ban:
# generally enable or disable the service running in the server
# allows values: true, false
enabled: true
# enable or disable fail2ban applied to the following jails
# allows values: true, false
sshd: true
nginx_limit_req: true
nginx_http_auth: true
# configure multiple rate limits zones in nginx for different parts of the
# web service
nginx_rate_limit:
# allows values: true, false
enabled: true
# rate of requestes per second for the request on admin api requests
admin_api_rate: 3
# This is the nginx limit_req configuration. Default means that there's
# burst with no delay for the first 15 requests, then burst with delay
# for request 15 to 30, then requests are rejected starting with request
# 30. More information: https://www.nginx.com/blog/rate-limiting-nginx/
admin_api_config: 'burst=30 delay=15'
# rate of requestes per second for the request on user api requests
user_api_rate: 2
# This is the nginx limit_req configuration. Default means that there's
# burst with no delay for the first 15 requests, then burst with delay
# for request 15 to 30, then requests are rejected starting with request
# 30. More information: https://www.nginx.com/blog/rate-limiting-nginx/
user_api_config: 'burst=30 delay=15'
# rate of requestes per second for the request on static file requests
static_files_rate: 5
# This is the nginx limit_req configuration. Default means that there's
# burst with no delay for the first 15 requests, then burst with delay
# for request 15 to 30, then requests are rejected starting with request
# 30. More information: https://www.nginx.com/blog/rate-limiting-nginx/
static_files_config: 'burst=30 delay=15'
# generic election related constraints that apply to multiple parts of the
# deployment, for example the same limit might apply to iam, sequent-ui
# and ballot-box
election_limits:
# maximum number of questions allowed in an election
max_num_questions: 20
# maximum number of allowed possible answers in a question
max_num_answers: 10000
# maximum size in characters of long strings like url titles
max_short_string_length: 300
# maximum size in characters of long strings like question description
max_long_string_length: 3000
# configuration related to election results calculations
tally_pipes:
# this is the list of allowed pipes that can be used when calculating an
# election result. The idea of limiting them is for safety. This is used
# by ballot-box and also election-verifier
pipes_whitelist:
#- tally_pipes.pipes.duplicate_questions.duplicate_questions
#- tally_pipes.pipes.modifications.apply_modifications
#- tally_pipes.pipes.multipart.make_multipart
#- tally_pipes.pipes.multipart.election_max_size_corrections
#- tally_pipes.pipes.multipart.question_totals_with_corrections
#- tally_pipes.pipes.multipart.reduce_answers_with_corrections
#- tally_pipes.pipes.multipart.multipart_tally_plaintexts_append_joiner
#- tally_pipes.pipes.multipart.data_list_reverse
#- tally_pipes.pipes.multipart.multipart_tally_plaintexts_joiner
#- tally_pipes.pipes.multipart.append_ballots
#- tally_pipes.pipes.parity.proportion_rounded
#- tally_pipes.pipes.parity.parity_zip_non_iterative
#- tally_pipes.pipes.parity.reorder_winners
#- tally_pipes.pipes.parity.podemos_parity_loreg_zip_non_iterative
#- tally_pipes.pipes.parity.podemos_parity2_loreg_zip_non_iterative
#- tally_pipes.pipes.podemos.podemos_proportion_rounded_and_duplicates
#- tally_pipes.pipes.desborda4.podemos_desborda4
#- tally_pipes.pipes.desborda3.podemos_desborda3
#- tally_pipes.pipes.desborda2.podemos_desborda2
#- tally_pipes.pipes.desborda.podemos_desborda
#- tally_pipes.pipes.pretty_print.pretty_print_stv_winners
- tally_pipes.pipes.pretty_print.pretty_print_not_iterative
- tally_pipes.pipes.results.do_tallies
#- tally_pipes.pipes.results.to_files
#- tally_pipes.pipes.results.apply_removals
- tally_pipes.pipes.sort.sort_non_iterative
#- tally_pipes.pipes.stv_tiebreak.stv_first_round_tiebreak
- tally_pipes.pipes.pdf.configure_pdf
- tally_pipes.pipes.withdraw_candidates.withdraw_candidates
# - tally_pipes.pipes.ballot_boxes.count_tally_sheets
# ballot-box
ballot_box:
db_password: '<PASSWORD>'
shared_secret: '<PASSWORD>'
domain: sequentech.io
port: 14443
# Port used by ballot_box for path /private. This path is used
# by election-orchestra to for example retrieve the ciphertexts.
# Only the election authorities can access this path, usin SSL/HTTPS and
# using their certificates as client certificates.
ssl_port: 14453
# Numbers of seconds memcached mantains a cached item (an election)
# in the cache. By default it's 5 seconds.
cache_expiration_seconds: 5
# allow and deny nginx ips specific for this service
ips:
allow: []
deny: []
# Password used to encrypt the authorities' public keys for usage in
# ballot-box.
keystore_pass: '<PASSWORD>'
# The callbacks from election authorities go to the private directory, for
# example to download encrypted ballots and to push tally results. In
# release 3.3.0+, this is done with SSL client certificate verification but
# in previous versions this didn't happen. To let an sequent server
# installation work with election authorities version 3.2.0 or less, you
# should set this to false; else, set it to true (default).
private_path_verify_ssl_client_certificate: true
# Defines if there's a tight control of the allowed state transitions
# within an election. For example, an stopped election wouldn't be allowed
# to be re-started if this is enable. Defaults to true.
enforce_state_controls: true
# In an election, a voter can change his vote as a way to mitigate coercion.
# Here you can set the maximum number of vote changes. Set to 1 to disable
# vote changing.
max_revotes: 5
# election-orchestra makes a callback to ballot_box using url path
# /api/election/:id/tallydone
# On this callback, ballot_box needs to download the tally from
# election-orchestra. As this download can fail, and in order to minimize
# the brittleness of the service, we can configure the timeout period and
# number of retries of this download
# Download tally timeout in milliseconds, default is one hour
download_tally_timeout: 3600000
# Download tally retries
download_tally_retries: 5
# if true, the calculated results are always automatically published
# valid values: true, false
always_publish: false
# list of callbacks from ballot-box to iam
# these callbacks are sometimes required for complex behaviour because
# ballot-box knows about election states that iam doesn't know about
# and these callbacks allow the ballot-box to call the iam to
# execute actions at certain states
# each callback is defined by a name, mode and url
# supported callback names: vote, started, published
# mode can be one of three values:
#
# - default: vote callback is enabled but the url is the default one, for
# the iam deployed in this same server.
#
# - custom: vote callback is enabled to the url specified in the
# custom_url field.
#
# - disabled: vote callback is disabled.
callbacks:
# vote callback allows ballot-box to notify the authentication module
# (which can be external) that a vote has been cast.
# Custom url is only used with 'custom' mode. Note that the url can be
# dynamic. To substitute the election id in the url, use ${eid}, and to
# substitute the userid, use ${uid}
- name: vote
mode: default
url: ''
# started callback is triggered by ballot-box when an election
# changes to stage 'started'
- name: started
mode: disabled
url: ''
# published callback is triggered by ballot-box when an election
# changes to stage 'published'
- name: published
mode: disabled
url: ''
# When this setting is true, an election can be virtual and have
# subelections. A virtual election can have no votes itself and can move
# directly from created to calculated results state and the results
# calculation include the tallies of the subelections, so it can be used
# to consolide election results.
#
# Virtual elections have currently one limitation: ownership of the
# subelections is not checked, and that is why support for virtual elections
# is disabled by default and should only be enabled in dedicated
# installations.
virtualElectionsAllowed: false
# Users and passwords used by trustees to directly manage the authorities.
# This can be used for the Electoral board ceremonies.
#
# trustee_users:
# # The authority id corresponds to the one defined in config.authorities
# - authority_id: auth1
# username: <USERNAME>
# password: <PASSWORD>
# - authority_id: auth2
# username: <USERNAME>
# password: <PASSWORD>
trustee_users: []
# sequent-ui
sequent_ui:
domain: sequentech.io
admin_port: 10090
booth_port: 10091
elections_port: 10092
# Boolean (default: true) that, if set to true, allows admins to launch
# a suite of automated end-to-end tests that follow the whole process of
# an election, including registering, creating the election keys, starting
# the election, voting, stopping, tallying, calculating and publishing the
# election results.
enable_self_testing: true
# Main version shown in the user interface. set to 'false' if you don't
# want it to be shown.
mainVersion: 'master'
# Shows a dialog if the browser is too old to notify the user. Set this to
# false to disable. See how to customize in
# http://browser-update.org/customize.html
browser_update_config: >
{
required: {e:15,f:36,o:65,s:7,c:50},
insecure:true,
api: "2021.04"
}
# allow and deny nginx ips specific for this service
ips:
allow: []
deny: []
# webpage title
web_title: 'Sequent'
# html to be inserted in the gui-admin profile view
profile_html: >-
<div
av-admin-field
ng-repeat=\"field in fields_def\"
editable=\"{% raw %}{{ field.user_editable }}{% endraw %}\">
</div>
# Show 'Success Action' tab in admin sequent_ui
show_success_action: false
# Default language of the application
language: en
# Forces the default language
forceLanguage: false
# Specifies the set language query string, so that the
detectLanguageQueryString: lang
# Specifies what translations will be available
languagesWhitelist:
- en
- es
- fr
- it
- gl
- ca
# Prevents site translation using the translation=off html attribute
prevent_site_translation: false
defaultRoute: /admin/login
# Minimum loading time (milliseconds)
min_loading_time: 12000
# For admins:
# Allow editing the json description of the election before creating it
# Allowed values: true|false
allow_edit_election_json: true
# For admins:
# Allow editing the election.presentation.theme_css so that any election
# admin can highly customize the election directly with CSS.
# Allowed values: true|false
allow_custom_election_theme_css: false
# interface theme
# allowed values (string): default|podemos|ccoo|bcnencomu
theme: 'default'
# help links list
# html code for flexibility
help_list:
- >-
<a
{% raw %}href=\"{{ helpurl }}\"{% endraw %}
target=\"_blank\">
<i class=\"fa fa-book\" aria-hidden=\"true\"></i>
Documentation
</a>
# when debug mode is false, javascript and in general source code is
# uglified and minified, otherwise it is not to allow better debugging.
#
# allowed values (string): true|false
debug: 'false'
# gui-admin allows to import users from a csv, importing users in batches
# this parameter sets the batch size
# 0 means doing the import in only one batch always
# allowed values: integer number >= 0
# Note that if the value is very large, the http request could timeout.
# You might also want to scale up increase
# config.http.nginx_timeout_secs in that case.
census_import_batch: 200
# If you want tallies to be linked and downloaded from a different URL,
# change this variable from false to a string. This could be an example:
#
# 'https://s3-eu-west-2.amazonaws.com/sequent/test-tallies/'
#
# and with this example, the download for the tally 1331 would be:
#
# 'https://s3-eu-west-2.amazonaws.com/sequent/test-tallies/1331/1331.tar'
custom_public_download_url: false
# base url used for help on gui-admin
settings_help_base_url: https://sequent/admin/
# default url used for help on gui-admin
settings_help_default_url: https://sequent/admin/help_error.html
# show the documentation links after successfully casting a vote
# allowed values: true| false
show_doc_on_vote_cast: false
# This is the list of admin question layouts shown in the administrative
# user interface. If the list is empty, question layouts will not be shown
# as a configurable option
shown_admin_question_layouts:
- accordion
- simultaneous-questions
#- circles
#- conditional-accordion
#- pcandidates-election
# List of auth methods shown in the administrative user interface
shown_auth_methods:
- email
- email-otp
- email-and-password
- sms
- sms-otp
- smart-link
- user-and-password
#- dnie # disabled because it's not supported in this version
# This is the list of admin question voting systems shown in the
# administrative user interface. If the list is empty, question layouts
# will not be shown as a configurable option
shown_admin_question_voting_systems:
- plurality-at-large
- borda-nauru
- borda
# default configuration for calculate results on admin-console
calculate_results_default: >-
{
"version": "master",
"pipes": [
{
"type": "tally_pipes.pipes.pdf.configure_pdf",
"params": {
"languages": ["en"]
}
},
{
"type": "tally_pipes.pipes.results.do_tallies",
"params": {}
},
{
"type": "tally_pipes.pipes.sort.sort_non_iterative",
"params": {}
}
]
}
# default template election for gui-admin
election_template: >-
{
title: $i18next.t('avAdmin.sidebar.newel'),
description: 'This is the description of the election. You can add simple html like <strong>bold</strong> or <a href=\"https://sequentech.io\">links to websites</a>.\\n\\n<br><br>You need to use two br element for new paragraphs.',
authorities: ConfigService.authorities,
director: ConfigService.director,
presentation: {
theme: 'default',
share_text: getShareTextDefault(),
urls: [],
allow_tally: true,
theme_css: ''
},
layout: 'simple',
num_successful_logins_allowed: 0,
tallyPipesConfig: {
version: 'master',
pipes: [
{
type: 'tally_pipes.pipes.results.do_tallies',
params: {}
},
{
type: 'tally_pipes.pipes.sort.sort_non_iterative',
params: {}
}
]
},
census: {
has_ballot_boxes: false,
voters: [],
auth_method: 'email',
census:'close',
extra_fields: [
{
name: 'email',
type: 'email',
required: true,
unique: true,
min: 4,
max: 255,
required_on_authentication: true
}
],
admin_fields: ConfigService.adminFields,
config: {
allow_user_resend: false,
msg: $i18next.t(ConfigService.auth_msg.msg),
subject: $i18next.t(
ConfigService.auth_msg.subject,
{
name: ConfigService.organization.orgName
}
),
'authentication-action': {
mode: 'vote',
'mode-config': {
url: ''
}
},
'registration-action': {
mode: 'vote',
'mode-config': null
}
}
},
questions: [
{
answer_total_votes_percentage: 'over-total-valid-votes',
answers: [
{
category: '',
details: 'This is an option with an simple example description.',
id: 0,
sort_order: 0,
text: 'Example option 1',
urls: [
{
title: 'URL',
url: ''
},
{
title: 'Image URL',
url: ''
}
]
},
{
category: '',
details: 'An option can contain a description. You can add simple html like <strong>bold</strong> or <a href=\"https://sequentech.io\">links to websites</a>. You can also set an image url below, but be sure it\\\'s HTTPS or else it won\\\'t load.\\n\\n<br><br>You need to use two br element for new paragraphs.',
id: 1,
sort_order: 1,
text: 'Example option 2',
urls: [
{
title: 'URL',
url: 'https://sequentech.io'
},
{
title: 'Image URL',
url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/The_Fabs.JPG/220px-The_Fabs.JPG'
}
]
},
{
category: '',
details: '',
id: 2,
sort_order: 2,
text: 'Example option 3',
urls: [
{
title: 'URL',
url: ''
},
{
title: 'Image URL',
url: ''
}
]
}
],
description: 'This is the description of this question. You can have multiple questions. You can add simple html like <strong>bold</strong> or <a href=\"https://sequentech.io\">links to websites</a>.\\n\\n<br><br>You need to use two br element for new paragraphs.',
layout: 'accordion',
max: 1,
min: 1,
num_winners: 1,
tally_type: 'plurality-at-large',
title: 'Test question title',
extra_options: {
shuffle_categories: true,
shuffle_all_options: true,
shuffle_category_list: [],
show_points: false
},
active: true
}
],
extra_data: {}
}
# admin fields
admin_fields: []
## free plugin
#- name: "expected_census"
#label: "Expected Census"
#description: "Expected Census"
#type: "int"
#min: 0
#step: 1
#value: 1000 # default expected census
#required: true
#private: true
## legal plugin
#- name: "legal_name"
#label: "Name"
#placeholder: "Sequent SL"
#min: 1
#type: "text"
#value: ""
#required: true
#private: false
#- name: "legal_org"
#label: "Organization"
#placeholder: "Sequent SL"
#type: "text"
#min: 1
#value: ""
#required: true
#private: false
#- name: "legal_id"
#label: "VAT"
#placeholder: "X1234567"
#type: "text"
#min: 1
#value: ""
#required: true
#private": false
#- name: "legal_contact"
#label: "Contact"
#placeholder: "[email protected]"
#type: "email"
#value: ""
#required: true
#private: false
# Details pertaining to the organization that runs the software
organization:
# changes the organization logo. The path should be a path accessible to
# ansible. Use an empty string ('') if you don't want to change the logo.
# Note: we recommend to use a png image with 18px height and less than
# 200px width.
logo_path: ''
# Subtitle of the organization, used in the ballot ticket PDF
subtitle: ''
# Big logo of the organization, used in the ballot ticket PDF
big_logo_url: ''
# Name of the organization, appears in the logo mouse hover, in the login
# page ("Login into __NAME__ admin account"), in the poweredBy, etc
name: 'Sequent'
# URL that the logo links to
url: 'https://sequentech.io'
# Configurable signup link. This link is shown only in /admin/login
# and can be set to any valid URL
admin_signup_link: '/admin/signup'
contact:
# Support contact email displayed in the footer links
email: [email protected]
# Sales contact email displayed in the footer links
sales: [email protected]
tlf: ''
# default authentication message to be sent to users of an election
auth_msg:
# authentication message (both for email and SMS authentication methods)
# the default is the i18next string path, which works for multiple languages
# you can use these and other variables:
# URL, URL2, CODE, HOME_URL, EVENT_ID... and slugs
# example: 'Vote in __URL__ with code __CODE__'
# default: 'avAdmin.auth.emaildef'
msg: 'avAdmin.auth.emaildef'
# authentication message subject (for emails)
# example: "Vote now with Sequent"
# default: 'avAdmin.auth.emailsubdef'
subject: 'avAdmin.auth.emailsubdef'
texts:
# html extra info to show in the voting booth success screen
booth_success_extra: ''
# terms of service text, shown in the documentation and in the booth
# start page
tos_text: ''
# terms of service title, shown in the documentation and in the booth
# start page
tos_title: ''
# you can include any html text in admin-console html to customize it
admin_html_body_include: ''
# you can include any html text in election-portal html to customize it
elections_html_body_include: ''
# you can include any html text in voting-booth html to customize it
booth_html_body_include: ''
# you can include any html text, which will be shown on the documentation
# page on election-portal and on help in voting booth (voting-booth)
documentation_html_include: >-
<ul>
<li>
<a
href=\"/election/{% raw %}{{election_id}}{% endraw %}/public/extra-legal\"
target=\"_blank\"
ng-i18next=\"avDocumentation.legal.title\">
</a>
</li>
</ul>
# you can include any html text, which will be shown on the legal page