Mercurial > p > roundup > code
annotate doc/roundup-server.ini.example @ 8411:ef1ea918b07a reauth-confirm_id
feat(security): Add user confirmation/reauth for sensitive changes
Auditors can raise Reauth(reason) exception to require the user to
enter a token (e.g. account password) to verify the user is performing
the change.
Naming is subject to change.
actions.py: New ReauthAction class handler and verifyPassword() method
for overriding if needed.
client.py: Handle Reauth exception by calling Client:reauth() method.
Default client:reauth method. Add 'reauth' action declaration.
exceptions.py: Define and document Reauth exception as a subclass of
RoundupCGIException.
templating.py: Define method utils.embed_form_fields().
The original form making a change to the database has a lot of form
fields. These need to be resubmitted to Roundup as part of the form
submission that verifies the user's password.
This method turns all non file form fields into type=hidden inputs.
It escapes the names and values to prevent XSS.
For file form fields, it base64 encodes the contents and puts them
in hidden pre blocks. The pre blocks have data attributes for the
filename, filetype and the original field name. (Note the original
field name is not used.)
This stops the file content data (maybe binary e.g. jpegs) from
breaking the html page. The reauth template runs JavaScript that
turns the encoded data inside the pre tags back into a file. Then
it adds a multiple file input control to the page and attaches all
the files to it. This file input is submitted with the rest of the
fields.
_generic.reauth.html (multiple tracker templates): Generates a form
with id=reauth_form to:
display any message from the Reauth exception to the user (e.g. why
user is asked to auth).
get the user's password
submit the form
embed all the form data that triggered the reauth
recreate any file data that was submitted as part of the form and
generate a new file input to push the data to the back end
It has the JavaScript routine (as an IIFE) that regenerates a file
input without user intervention.
All the TAL based tracker templates use the same form. There is also
one for the jinja2 template. The JavaScript for both is the same.
reference.txt: document embed_form_fields utility method.
upgrading.txt: initial upgrading docs.
TODO:
Finalize naming. I am leaning toward ConfirmID rather than Reauth.
Still looking for a standard name for this workflow.
Externalize the javascript in _generic.reauth.html to a seperate file
and use utils.readfile() to embed it or change the script to load it
from a @@file url.
Clean up upgrading.txt with just steps to implement and less feature
detail/internals.
Document internals/troubleshooting in reference.txt.
Add tests using live server.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 11 Aug 2025 14:01:12 -0400 |
| parents | 09af33304790 |
| children |
| rev | line source |
|---|---|
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 ; This is a sample configuration file for roundup-server. See the |
|
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
2 ; admin_guide for information about its contents. |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
3 |
|
3880
2359d6304a4f
Allow template for tracker index page
Justus Pendleton <jpend@users.sourceforge.net>
parents:
2632
diff
changeset
|
4 [main] |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
5 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
6 # Host name of the Roundup web server instance. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
7 # If left unconfigured (no 'host' setting) the default |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
8 # will be used. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
9 # If empty, listen on all network interfaces. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
10 # If you want to explicitly listen on all |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
11 # network interfaces, the address 0.0.0.0 is a more |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
12 # explicit way to achieve this, the use of an empty |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
13 # string for this purpose is deprecated and will go away |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
14 # in a future release. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
15 # Default: localhost |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
16 host = localhost |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
17 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
18 # Port to listen on. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
19 # Default: 8080 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
20 port = 8017 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
21 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
22 # Path to favicon.ico image file. If unset, built-in favicon.ico is used. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
23 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
24 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
25 # Default: favicon.ico |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
26 favicon = favicon.ico |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
27 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
28 # User ID as which the server will answer requests. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
29 # In order to use this option, the server must be run initially as root. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
30 # Availability: Unix. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
31 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
32 user = roundup |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
33 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
34 # Group ID as which the server will answer requests. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
35 # In order to use this option, the server must be run initially as root. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
36 # Availability: Unix. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
37 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
38 group = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
39 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
40 # don't fork (this overrides the pidfile mechanism)' |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
41 # Allowed values: yes, no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
42 # Default: no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
43 nodaemon = no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
44 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
45 # Log client machine names instead of IP addresses (much slower) |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
46 # Allowed values: yes, no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
47 # Default: no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
48 log_hostnames = no |
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
49 |
|
7332
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
50 # Have http(s) request logging done via python logger module. |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
51 # If set to yes the python logging module is used with qualname |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
52 # 'roundup.http'. Otherwise logging is done to stderr or the file |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
53 # specified using the -l/logfile option. |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
54 # Allowed values: yes, no |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
55 # Default: no |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
56 loghttpvialogger = no |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
57 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
58 # File to which the server records the process id of the daemon. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
59 # If this option is not set, the server will run in foreground |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
60 # |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
61 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
62 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
63 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
64 pidfile = |
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
65 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
66 # Log file path. If unset, log to stderr. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
67 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
68 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
69 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
70 logfile = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
71 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
72 # Set processing of each request in separate subprocess. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
73 # Allowed values: debug, none, thread, fork. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
74 # Default: fork |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
75 multiprocess = fork |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
76 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
77 # Tracker index template. If unset, built-in will be used. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
78 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
79 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
80 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
81 template = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
82 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
83 # Enable SSL support (requires pyopenssl) |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
84 # Allowed values: yes, no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
85 # Default: no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
86 ssl = no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
87 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
88 # PEM file used for SSL. A temporary self-signed certificate |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
89 # will be used if left blank. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
90 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
91 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
92 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
93 pem = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
94 |
|
7332
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
95 # Comma separated list of extra headers that should |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
96 # be copied into the CGI environment. |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
97 # E.G. if you want to access the REMOTE_USER and |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
98 # X-Proxy-User headers in the back end, |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
99 # set to the value REMOTE_USER,X-Proxy-User. |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
100 # Allowed values: comma-separated list of words |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
101 # Default: |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
102 include_headers = |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
103 |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
104 # Change to HTTP/1.0 if needed. This disables keepalive. |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
105 # Default: HTTP/1.1 |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
106 http_version = HTTP/1.1 |
|
09af33304790
Update roundup-server example config file example and docs
John Rouillard <rouilj@ieee.org>
parents:
5102
diff
changeset
|
107 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
108 # Roundup trackers to serve. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
109 # Each option in this section defines single Roundup tracker. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
110 # Option name identifies the tracker and will appear in the URL. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
111 # Option value is tracker home directory path. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
112 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
113 # to the directory containing this config file. |
|
3880
2359d6304a4f
Allow template for tracker index page
Justus Pendleton <jpend@users.sourceforge.net>
parents:
2632
diff
changeset
|
114 [trackers] |
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
115 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
116 demo = /trackers/demo |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
117 sysadmin = /trackers/sysadmin |
