Commit graph

582 commits

Author SHA1 Message Date
Jana Cupova
8a72187e6b Deprecated get_sequence_value
Fixes: https://pagure.io/koji/issue/3634
2022-12-20 14:24:18 +01:00
Jana Cupova
21c8c0f681 Remove krbLogin API
Fixes: https://pagure.io/koji/issue/3593
2022-11-24 13:59:17 +01:00
Jana Cupova
e5367b088f Fix logout when hub is older than CLI
https://pagure.io/koji/issue/3396
2022-11-15 12:19:31 +01:00
Tomas Kopecek
dbb6d60e4f separate headers 2022-11-10 11:07:03 +01:00
Tomas Kopecek
82d2d4dd55 use header-based auth 2022-11-10 11:07:03 +01:00
Tomas Kopecek
850a161e2b cookies-based sessions
Related: https://pagure.io/koji/issue/3393
2022-11-10 11:07:03 +01:00
Jana Cupova
7897628159 Add active sessions web page
Fixes: https://pagure.io/koji/issue/3396
2022-11-10 10:17:51 +01:00
Jana Cupova
9287f672ee Parse_arches allows string and list of arches
Fixes: https://pagure.io/koji/issue/3434
2022-08-17 10:42:49 +02:00
Tomas Kopecek
b3f7d7c34e remove unused import 2022-08-01 11:34:41 +02:00
Tomas Kopecek
2006ab1dd8 don't propagate SIGHUP ignore to child processes
Related: https://pagure.io/koji/issue/672
2022-08-01 11:34:41 +02:00
Jana Cupova
44f5ebaabb Authtype as enum and getSessionInfo prints authtype name
Fixes: https://pagure.io/koji/issue/3436
2022-07-26 14:36:00 +02:00
Patrick Uiterwijk
d4d2594653 Fix rpm_hdr_size file closing
The current code will try to close a passed in file object, and will not
try to close a file object it opened when a string is passed in.
This results in either a leaked file object, or a file object that was
passed in to be closed after the function is called.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2022-07-26 14:06:23 +02:00
Tomas Kopecek
93bdd16724 Fix wrong encoding in changelog entries
Relates: https://pagure.io/koji/issue/3412
2022-06-27 17:49:49 +02:00
Tomas Kopecek
1652dcc606 improved sensitive values handling (requests/urllib3)
Related: https://pagure.io/koji/issue/3246
2022-05-16 16:19:33 +02:00
Pat Riehecky
4203fbee14 kojid: permit forcing the target arch within mock per tag 2022-05-16 16:15:03 +02:00
Pat Riehecky
a50ca237c7 kojid: permit forcing releasever within mock per tag 2022-05-16 16:15:03 +02:00
Tomas Kopecek
d95e3ff094 logging and comment update 2022-03-29 12:28:17 +02:00
Tomas Kopecek
2f1090d051 Retry gssapi_login if it makes sense
Related: https://pagure.io/koji/issue/3170
2022-03-29 12:28:17 +02:00
Jana Cupova
b3258c4273 Set dst permissions same as src permissions
Fixes: https://pagure.io/koji/issue/3260
2022-03-21 14:33:43 +01:00
Jana Cupova
8f91020a01 Fix tag and target shows as string, not as dict to string
Fixes: https://pagure.io/koji/issue/3251
2022-03-21 14:30:03 +01:00
Jana Cupova
995b57c961 Remove koji.listFaults
Fixes: https://pagure.io/koji/issue/3083
2022-03-21 14:29:11 +01:00
Tomas Kopecek
77aec93b98 Revert "refactor exceptions to koji.exceptions"
This reverts commit 1e00081991.
2022-02-21 12:33:25 +01:00
Ken Dreyer
1e00081991 refactor exceptions to koji.exceptions
Move Koji's custom exceptions classes to a dedicated koji.exceptions
library. This organizes the code so it's easier to maintain, and matches
patterns in other well-known projects, like requests.exceptions or
cryptography.exceptions.
2022-02-10 15:44:04 +01:00
Jana Cupova
968eb61055 Fix makedirs for existing dirs
Fixes: https://pagure.io/koji/issue/3097
2022-02-07 15:04:34 +01:00
Tomas Kopecek
06b5f7c188 Hide sensitive values in urrlib3 exceptions
Fixes: https://pagure.io/koji/issue/2801
2022-02-07 11:10:19 +01:00
Jana Cupova
c1920b330a Write signed copies atomically
Fixes: https://pagure.io/koji/issue/3097
2022-02-07 10:12:57 +01:00
Tomas Kopecek
3ee95baa5f mock.module_setup_commands tag extra option
Fixes: https://pagure.io/koji/issue/2483
2022-02-07 09:33:14 +01:00
Ken Dreyer
eaa5bf9add lib: rename inner error variable in is_conn_err()
Rename this variable to something easier to understand.
2022-01-11 12:32:52 +01:00
Ken Dreyer
1cc6c79157 lib: refactor errno list in is_conn_error()
Move the copy-and-pasted list of errnos into a variable and use that in
both places. This makes this code easier to understand.
2022-01-11 12:32:52 +01:00
Jana Cupova
74ac826a87 Add limits on name values
Fixes: https://pagure.io/koji/issue/2117
2021-12-09 07:11:57 +01:00
Tomas Kopecek
9e6be3f977 lib: Deprecate koji.listFaults
Related: https://pagure.io/koji/issue/3071
2021-11-07 09:37:18 +00:00
Tomas Kopecek
a6aeaee3e3 fix callMethod 2021-11-04 12:07:05 +00:00
Tomas Kopecek
09a8fd71e5 backward compatibility for older hub
use proxyauthtype only if it is explicetly requested. Older hubs
don't know this option and will refuse login attempt.
2021-11-04 12:07:05 +00:00
Tomas Kopecek
252121c11f propagate proxyauthtype in login calls 2021-11-04 12:07:05 +00:00
Jana Cupova
32b5377392 Remove translation stub functions
Fixes: https://pagure.io/koji/issue/3072
2021-10-21 13:25:16 +02:00
Tomas Kopecek
ba2e1e520b basic security checks with bandit
Fixes: https://pagure.io/koji/issue/3042
2021-10-20 15:20:14 +02:00
Ken Dreyer
0747714f6e document convertFault method
Update the convertFault docstring to describe how the method converts
faults, the "fault" parameter type, and possible return values.
2021-10-12 14:27:39 -04:00
Tomas Kopecek
a626d818a2 fix typo 2021-09-15 12:43:06 +02:00
Patrick Uiterwijk
af25fc2e24 Support packages that are head-signed
This supports packages which do not have the RPMv3 signature scheme
(over the full RPM header+payload), but instead only have signatures
over the header (v4 scheme).
For the v4 scheme, the signature is only stored in SIGTAG_RSA (or
SIGTAG_DSA).

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2021-09-15 12:43:06 +02:00
Tomas Kopecek
7a4b17005a expose force_auth in config 2021-09-14 13:26:11 +02:00
Tomas Kopecek
d53c3f88fa lib: return taskLabel for unknown tasks
"malformed task" has been returned for everything unknown, but external
plugins can create completely valid tasks which we can't parse without
those plugins. In such case we want to return at least method/arch info.

Related: https://pagure.io/koji/issue/2904
2021-06-09 14:44:04 +02:00
Jana Cupova
9541c2a173 importlib instead of imp
Fixes: https://pagure.io/koji/issue/2822
2021-06-02 11:19:33 +02:00
Jana Cupova
de008b5f27 Add kerberos debug message
Fixes: https://pagure.io/koji/issue/2063
2021-05-03 13:41:35 +02:00
Tomas Kopecek
6e3553459f lib: is_conn_error catch more exceptions
Related: https://pagure.io/koji/issue/2789
2021-04-28 13:34:40 +02:00
Tomas Kopecek
ef3e2cd04b lib: use parse_task_params for taskLabel
Fixes: https://pagure.io/koji/issue/2519
2021-04-26 14:43:20 +02:00
Tomas Kopecek
290e1ddf31 lib: more portable BadStatusLine checking
Fixes: https://pagure.io/koji/issue/2789
2021-04-13 13:26:10 +02:00
Tomas Kopecek
a7c769fd41 lib: set sinfo=None for failed ssl_login
Fixes: https://pagure.io/koji/issue/2793
2021-03-31 13:54:08 +02:00
Tomas Kopecek
32929a7916 lib: missing default values in read_config
e.g. self.opts.get('max_retries', 30) will return wrong value if there
is None as a default value.

Fixes: https://pagure.io/koji/issue/2668
2021-03-31 13:51:34 +02:00
Mike McLean
c71ebec58a Revert "requests exception"
This reverts commit ff8c13969e.

Fixes https://pagure.io/koji/issue/2786
2021-03-29 11:27:22 +02:00
Tomas Kopecek
3321abbf88 lib: more verbose conn AuthError for ssl/gssapi
Fixes: https://pagure.io/koji/issue/2502
2021-03-29 11:22:06 +02:00