Remove the Koji proxyuser functionality

This commit is contained in:
mprahl
2018-01-30 11:35:04 -05:00
parent 5b4a8f6240
commit df594da8a5
6 changed files with 7 additions and 48 deletions

View File

@@ -353,16 +353,9 @@ chmod 644 %buildroot/%_sysconfdir/rpm/macros.zz-modules
# Timeout after 10 minutes. The default is 12 hours.
koji_config["timeout"] = 60 * 10
# In "production" scenarios, our service principal may be blessed to
# allow us to authenticate as the owner of this request. But, in local
# development that is unreasonable so just submit the job as the
# module_build_service developer.
proxyuser = owner if config.koji_proxyuser else None
address = koji_config.server
authtype = koji_config.authtype
log.info("Connecting to koji %r with %r. (proxyuser %r)" % (
address, authtype, proxyuser))
log.info("Connecting to koji %r with %r." % (address, authtype))
koji_session = koji.ClientSession(address, opts=koji_config)
if authtype == "kerberos":
ccache = getattr(config, "krb_ccache", None)
@@ -374,8 +367,7 @@ chmod 644 %buildroot/%_sysconfdir/rpm/macros.zz-modules
koji_session.krb_login(
principal=principal,
keytab=keytab,
ccache=ccache,
proxyuser=proxyuser,
ccache=ccache
)
else:
koji_session.krb_login(ccache=ccache)
@@ -383,8 +375,7 @@ chmod 644 %buildroot/%_sysconfdir/rpm/macros.zz-modules
koji_session.ssl_login(
os.path.expanduser(koji_config.cert),
None,
os.path.expanduser(koji_config.serverca),
proxyuser=proxyuser,
os.path.expanduser(koji_config.serverca)
)
else:
raise ValueError("Unrecognized koji authtype %r" % authtype)