Commit graph

1109 commits

Author SHA1 Message Date
Jim Foraker
fde8aab177 hub: Fix issue with listing users and old versions of Postgres
Koji was using the array_remove() SQL function, which was not introduced
until Postgres 9.4.  RHEL 7 ships with Postgres 9.2.  This construct
was being used to ensure that the krb_principals arrays in user
dictionaries were empty if no principals were defined, instead of
having a single value of None.  Instead we use QueryProcessor's result
transformation support to remove the None entry.

Signed-off-by: Jim Foraker <foraker1@llnl.gov>
2019-11-06 13:01:25 -05:00
Jim Foraker
b1aaf531aa hub: Fix permissions in readPackageList()
The recent changes to kerberos principal handling broke proper reporting
of package ownership, due to an obvious typo.

Signed-off-by: Jim Foraker <foraker1@llnl.gov>
2019-11-04 15:05:23 -08:00
Tomas Kopecek
1a2b10ae8e More default values in example kojihub.conf
Fixes: https://pagure.io/koji/issue/1661
2019-10-31 11:24:40 +01:00
Tomas Kopecek
79a7da7c0b CGUninitBuild for cancelling CG reservations
Fixes: https://pagure.io/koji/issue/1610
2019-10-16 10:03:46 +02:00
Tomas Kopecek
86fc5cdbd3 fix log message to show package name
Fixes: https://pagure.io/koji/issue/1693
2019-10-16 09:20:51 +02:00
Yu Ming Zhu
3e124f685a fix editUser api for multiple kerberos support 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
180cf894e2 hub: [get_group_members] return field is not named as alias 2019-10-15 09:16:43 +02:00
Yu Ming Zhu
68901dde1c hub: [getUser] support dict userInfo 2019-10-15 09:16:43 +02:00
Yuming Zhu
b2b8d5f9cc strict per item in config_files 2019-10-15 09:14:16 +02:00
Yu Ming Zhu
4c1928f377 extract read_config_files util for config parsing 2019-10-15 09:14:16 +02:00
Ken Dreyer
c01820e50d hub: new listCGs RPC
Add a new hub method for listing new content generator records.

The purpose of this change is to make it easier for administrators to
determine what content generators are present and what user accounts
have access to those.
2019-10-15 08:54:34 +02:00
Brendan Reilly
fb82f04837 Tag permission can be used for un/tagBuildBypass
Fixes: #1510
2019-10-14 10:25:39 +02:00
Brendan Reilly
fda86ce710 Added editUser api call
Fixes: #862
2019-10-14 10:14:50 +02:00
Ken Dreyer
d2a8c10efc hub: remove reference to PythonOption
With mod_python we could use Apache's PythonOption directive. That
directive does not exist with mod_wsgi and we have to use SetEnv
instead.

Remove the PythonOption directive and describe how to use SetEnv.
2019-10-14 10:05:08 +02:00
Yu Ming Zhu
5629ff59a0 doc: GssapiLocalName should be off 2019-10-10 13:04:06 +00:00
Yuming Zhu
7b60e0e7eb backwards compatibility for ProxyDNs change 2019-10-10 13:04:06 +00:00
Yuming Zhu
0c4d57d958 adding some notes in documents 2019-10-10 13:02:55 +00:00
Yuming Zhu
d662fb837d keep on using REMOTE_USER
and handover realm translation to auth_to_local rules in /etc/krb5.conf
2019-10-10 13:02:55 +00:00
Yu Ming Zhu
4a3dc40147 use GSS_NAME instead of REMOTE_USER for GSSAPI auth
jira: https://projects.engineering.redhat.com/browse/BST-475
2019-10-10 13:01:24 +00:00
Yu Ming Zhu
855ffa6b5c hub: fix condition mistake in get_user 2019-10-10 16:37:57 +02:00
Yu Ming Zhu
6179d8f9d8 hub: remove asList in queryOpts of list_user_krb_principals 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
0e411f215b hub: backward compatible for cli moshimoshi command 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
ab37e28d4d hub: add AllowedKrbRealms option and (add|remove)UserKrbPrincipal API 2019-10-10 16:37:56 +02:00
Yu Ming Zhu
aaeb41e57b change users and krb_principal operations 2019-10-10 16:37:56 +02:00
Yuming Zhu
473bc1460b hub: [getRPMFile] add strict behavior 2019-10-10 18:18:32 +08:00
Mike McLean
a9f3afdef7 whitespace: adjust indentations 2019-10-09 08:41:15 -04:00
Mike McLean
c49660be33 hub: use joinpath instead of os.path.join 2019-10-09 08:41:15 -04:00
Tomas Kopecek
873a159e08 drop unused host.repoAddRPM call
Fixes: https://pagure.io/koji/issue/1655
2019-10-09 09:17:20 +02:00
Tomas Kopecek
b8017bfff5 docs for build.extra.source
Fixes: https://pagure.io/koji/issue/1673
2019-10-09 09:14:04 +02:00
Tomas Kopecek
ff57615460 Subselect gives better performance
Original query based on JOINs is 1000x slower in better cases. Sub-query
helps a lot here.

Fixes: https://pagure.io/koji/issue/1674
2019-10-09 09:12:47 +02:00
Tomas Kopecek
0d6d9a51a6 swapped values in message
Related: https://pagure.io/koji/issue/1090
2019-10-03 16:03:03 +02:00
Yu Ming Zhu
2e8611254c fix unavailable id column 2019-09-30 15:47:56 +02:00
Yu Ming Zhu
24afeca663 hub: [groupListRemove] raise Error when no group for tag
Fixes: https://pagure.io/koji/issue/1090
2019-09-30 15:47:45 +02:00
Pat Riehecky
f3ace6b400 hub: add missing package list check 2019-09-30 15:22:54 +02:00
Tomas Kopecek
3de3f61fbb move tag/package owners to separate table
Changing owner is triggering repo regeneration in kojira. As it is
something which doesn't have any effect on repodata, let's put it to
separate table and let kojira ignore these changes.

Fixes: https://pagure.io/koji/issue/956
2019-08-29 15:44:24 +02:00
Tomas Kopecek
bf5da96053 Fix lookup_name usage + tests
Fixes: https://pagure.io/koji/issue/1632
2019-08-28 15:46:02 +02:00
Mike McLean
da1153fc33 raise an error when adding an archive of the wrong type 2019-08-28 15:17:27 +02:00
Mike McLean
ba83f877ff correct error text 2019-08-28 15:17:27 +02:00
Mike McLean
b67de2c26e pass correct buildinfo to callbacks 2019-08-19 11:07:43 -04:00
Mike McLean
a5f2d582cc rework update of reserved builds
Fixes: https://pagure.io/koji/issue/1603
2019-08-16 17:19:57 -04:00
Mike McLean
2a00b1a7a2 fix btype lookup in list_archive_files()
Fixes: https://pagure.io/koji/issue/1507
2019-08-15 17:00:51 -04:00
Tomas Kopecek
07f0cba77a use right top limit
randint's top limit is included in range, so original value 256 can be
reached and as such hex-digit 100 is emitted enlarging the string.

Fixes: https://pagure.io/koji/issue/1611
2019-08-14 11:20:00 +02:00
Tomas Kopecek
dfbe322222 deprecate sha1/md5_constructor from koji.util
These functions are now fully provided by hashlib. Commit removes their
usage from koji's codebase and leaves deprecation message in lib.

Final removal from lib is scheduled to 1.21.

Fixes: https://pagure.io/koji/issue/1487
2019-08-12 16:07:55 -04:00
Mike McLean
8ecfb4dc5b pull owner from correct place
Fixes https://pagure.io/koji/issue/1604

In this function, we have binfo, buildinfo, and self.buildinfo.
A little confusing ;)

Note that self.buildinfo['owner'] is validated in prep_build()
2019-08-06 15:35:33 -04:00
Tomas Kopecek
bf7bd1c1af copy updated policy for reserved cg builds
Fixes: https://pagure.io/koji/issue/1599
2019-08-06 14:31:24 -04:00
Tomas Kopecek
4c0caecca8 fix recycling build due to cg
Fixes: https://pagure.io/koji/issue/1598
2019-08-06 10:25:14 -04:00
Tomas Kopecek
64f734631b Backward-compatible fix for CG import
User needn't to be specified during CG import. In such case actual user
should be the owner.

Fixes: https://pagure.io/koji/issue/1596
2019-08-02 14:46:58 +02:00
Tomas Kopecek
9b72831bdf secrets import is missing 'else' variant
Later in code 'secrets' is tested for its existence, so it should be set
to None if it wasn't imported.

Fixes: https://pagure.io/koji/issue/1590
2019-08-01 15:37:57 -04:00
Tomas Kopecek
8abc2471ca use _writeInheritanceData in _create_tag
Fixes: https://pagure.io/koji/issue/1554
2019-07-31 15:24:15 -04:00
Mike McLean
1f52e60839 only check epoch against reservation if it is given 2019-07-16 10:41:43 -04:00