Add limits on name values

Fixes: https://pagure.io/koji/issue/2117
This commit is contained in:
Jana Cupova 2021-08-25 15:03:08 +02:00 committed by Jana Cupova
parent 95717ba28d
commit 74ac826a87
25 changed files with 761 additions and 49 deletions

51
docs/source/hub_conf.rst Normal file
View file

@ -0,0 +1,51 @@
hub.conf
--------
hub.conf is a standard .ini-like configuration file. Its main section is
called ``[hub]`` and contains the following options. They can occur anywhere.
Incomplete document
^^^^^^^^^^^^^^^^^^^
This document is a stub and does not cover all options.
Work to complete this document is tracked in `Issue 3073 <https://pagure.io/koji/issue/3073>`_
The old :doc:`Server HOW TO <server_howto>` doc also describes some hub configuration options.
Name verification
^^^^^^^^^^^^^^^^^
Currently we have two groups for name verification:
- internal names
- user names
Group internal names is currently used for:
- archive type
- btype
- channel
- external repo
- group
- host
- kerberos
- permission
- tag
- target
- volume
Group user names is currently used for:
- user
- host
Host names are listed in both groups because hosts always have an associated user entry.
.. glossary::
MaxNameLengthInternal = 256
Set length of internal names. By default there is allowed length set up to 256.
When length is set up to 0, length verifying is disabled.
RegexNameInternal = ^[A-Za-z0-9/_.+-]+$
Set regex for verify an internal names. When regex string is empty, verifying
is disabled.
RegexUserName = ^[A-Za-z0-9/_.@-]+$
Set regex for verify a user name and kerberos. User name and kerberos have
in default set up allowed '@' and '/' chars on top of basic name regex
for internal names. When regex string is empty, verifying is disabled.

View file

@ -41,6 +41,7 @@ Contents
signing
database_howto
kojid_conf
hub_conf
using_the_koji_build_system
setting_rpm_macros
profiles

View file

@ -777,6 +777,8 @@ override all these values. So, you can use e.g.
``/etc/koji-hub/hub.conf.d/secret.conf`` for sensitive values. Typical usecase
for separate config is :doc:`policy <defining_hub_policies>` configuration file.
Doc page about hub options in :doc:`Hub conf <hub_conf>`. (Currently in progress).
Authentication Configuration
----------------------------