Permission system¶
Permissions are used by Koji to control access in a number of ways.
Some permissions are built-in (e.g. admin, repo), but new ones can be
created by administrators.
The admin permission is special.
It grants superuser access and can stand in for any other permission.
Most of the built-in permissions control access to various hub calls.
For example, the dist-repo permission allows access to create dist repos.
Custom permissions can used as the required permission for a tag, or they can be referenced in hub policies. Note, that you need to first understand the policy mechanism as most permissions are reflected in policy rules.
Permission management¶
Granting or removing permissions requires the admin permission.
A user with sufficient access can use the following koji CLI commands:
koji grant-permission [--new] <permission> <user> [<user> ...]Grants permission to one or more users. It can be also used to create a new permission with the
--newoption.koji revoke-permission <permission> <user> [<user> ...]Removes the named permission from users.
koji list-permissions [--user <user>] [--mine]Lists permissions in the system.
Built-in permissions¶
Administration¶
The following permissions govern access to key administrative actions.
adminThis is a superuser access without any limitations, so grant with caution. Users with admin effectively have every other permission. We recommend granting the smallest effective permission.
hostRestricted admin permission for handling host-related management tasks.
tagPermission for adding/deleting/editing tags. Allows use of the
tagBuildBypassanduntagBuildBypassAPI calls also. Note, that this name could be confusing as it is not related to tagging builds but to editing tags themselves. Tagging builds (and adding/removing packages from package lists for given tags) is handled bytagandpackage_listpolicies respectively.targetPermission for adding/deleting/editing targets
Tasks¶
The following permissions grant access to trigger specialized tasks.
applianceappliance tasks (
koji spin-appliance)dist-repodistRepo tasks (
koji dist-repo)imageimage tasks (
koji image-build)livecdlivecd tasks (
koji spin-livecd)livemedialivemedia tasks (
koji spin-livemedia)regen-repoThis permission grants access to regenerate repos (i.e. to trigger
newRepotasks).win-adminThe default
vmpolicy requires this permission to trigger Windows builds.
Data Import¶
The following import permissions allow a user to directly import build artifacts of different types. We recommend caution when granting these. In general, it is better to use the content generator interface rather than the direct import calls these govern.
image-importused for importing external maven artifacts (
koji import-archive --type maven)maven-importused for importing external maven artifacts (
koji import-archive --type maven)win-importused for importing external maven artifacts (
koji import-archive --type win)
Other¶
These remaining permissions don’t fit into other categories.
buildDefined in the database but currently unused
repoThis special permission is only intended to be granted to the user that
kojiraruns as. It grants access to regenerate and expire repos, as well as flag them as deleted or broken. Do not grant this permission to normal users. Theregen-repopermission can be used to grant access for regeneration only.signThis permission grants access to add signatures to rpms and to write out signed copies (
koji import-sigandkoji write-signed-rpm).