Skip to content

Commit 3459750

Browse files
committed
doc: update tracker_config.txt
Every generation of tracker_config.txt also changes the secret_key value. To prevent this from showing up in diffs, modify format_config.awk to use a static value for the secret_key and substitute it into the config file. Also update Makefile so tracker_config.txt depends on format_config.awk.
1 parent 593606a commit 3459750

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ all: man_html tracker_config.txt admin_help.html ## make all docs under share
33
cd ..; ./setup.py build_doc
44

55
##@ build doc parts
6-
tracker_config.txt: ../roundup/configuration.py ## generate a current config file
6+
tracker_config.txt: ../roundup/configuration.py format_config.awk ## generate a current config file
77

88
python3 ../roundup/scripts/roundup_admin.py \
99
genconfig _temp_config.txt

doc/format_config.awk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#! /bin/awk
2+
BEGIN {SECRET_KEY = "DWmbKgVUy6fF5D2Y5TD5Az+dnHhMYKCCpJzIY3H8nsU="}
23

34
# delete first 8 lines
45
NR < 9 {next}
56

7+
# To prevent new file generation from causing the secret_key to
8+
# change, we replace the secret key with a fixed value.
9+
/^# Default: [0-9A-z+=]{44}/ {sub(/[0-9A-z+=]{44}/, SECRET_KEY)}
10+
/^secret_key = [0-9A-z+=]{44}/ {sub(/[0-9A-z+=]{44}/, SECRET_KEY)}
11+
612
# When we see a section [label]:
713
# emit section index marker,
814
# emit section anchor
@@ -43,3 +49,4 @@ NR < 9 {next}
4349
/^$/ { if (! prev_line_is_blank) {accumulate = accumulate $0};
4450
prev_line_is_blank = 1;
4551
}
52+

doc/tracker_config.txt

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@
166166
csv_field_size = 131072
167167

168168
# Sets the default number of rounds used when encoding passwords
169-
# using the PBKDF2 scheme. Set this to a higher value on faster
170-
# systems which want more security.
169+
# using any PBKDF2 scheme. Set this to a higher value on faster
170+
# systems which want more security. Use a minimum of 250000
171+
# for PBKDF2-SHA512 which is the default hash in Roundup 2.5.
171172
# PBKDF2 (Password-Based Key Derivation Function) is a
172173
# password hashing mechanism that derives hash from the
173174
# password and a random salt. For authentication this process
@@ -180,8 +181,8 @@
180181
# become faster. The currently enforced minimum number of
181182
# rounds is 1000.
182183
# See: http://en.wikipedia.org/wiki/PBKDF2 and RFC2898
183-
# Default: 2000000
184-
password_pbkdf2_default_rounds = 2000000
184+
# Default: 250000
185+
password_pbkdf2_default_rounds = 250000
185186

186187
.. index:: config.ini; sections tracker
187188
.. _`config-ini-section-tracker`:
@@ -460,7 +461,7 @@
460461
# the user if the header is missing or invalid.
461462
# Set this to 'yes' to block the post and notify the user
462463
# if the header is invalid, but accept the form if
463-
# the field is missing.
464+
# the header is missing.
464465
# Set this to 'logfailure' to log a notice to the roundup
465466
# log if the header is invalid or missing, but accept
466467
# the post.
@@ -475,7 +476,7 @@
475476
# the user if the header is missing or invalid.
476477
# Set this to 'yes' to block the post and notify the user
477478
# if the header is invalid, but accept the form if
478-
# the field is missing.
479+
# the header is missing.
479480
# Set this to 'logfailure' to log a notice to the roundup
480481
# log if the header is invalid or missing, but accept
481482
# the post.
@@ -513,7 +514,7 @@
513514
# the user if the header is missing or invalid.
514515
# Set this to 'yes' to block the post and notify the user
515516
# if the header is invalid, but accept the form if
516-
# the field is missing.
517+
# the header is missing.
517518
# Set this to 'logfailure' to log a notice to the roundup
518519
# log if the header is invalid or missing, but accept
519520
# the post.
@@ -529,7 +530,7 @@
529530
# the user if the header is missing or invalid.
530531
# Set this to 'yes' to block the post and notify the user
531532
# if the header is invalid, but accept the form if
532-
# the field is missing.
533+
# the header is missing.
533534
# Set this to 'logfailure' to log a notice to the roundup
534535
# log if the header is invalid or missing, but accept
535536
# the post.
@@ -628,8 +629,8 @@
628629
.. code:: ini
629630

630631

631-
# Settings in this section (except for backend) are used
632-
# by RDBMS backends only.
632+
# Most settings in this section (except for backend and debug_filter)
633+
# are used by RDBMS backends only.
633634

634635
[rdbms]
635636

@@ -638,6 +639,20 @@
638639
# Default: NO DEFAULT
639640
#backend = NO DEFAULT
640641

642+
# Filter debugging: Permissions can define additional filter
643+
# functions that are used when checking permissions on results
644+
# returned by the database. This is done to improve
645+
# performance since the filtering is done in the database
646+
# backend, not in python (at least for the SQL backends). The
647+
# user is responsible for making the filter return the same
648+
# set of results as the check function for a permission. So it
649+
# makes sense to aid in debugging (and performance
650+
# measurements) to allow turning off the usage of filter
651+
# functions using only the check functions.
652+
# Allowed values: yes, no
653+
# Default: no
654+
debug_filter = no
655+
641656
# Name of the database to use. For Postgresql, this can
642657
# be database.schema to use a specific schema within
643658
# a Postgres database.

0 commit comments

Comments
 (0)