[hub] only raise error when authtype is not proxyauthtype

fixes: #3163
This commit is contained in:
Yuming Zhu 2021-12-06 16:57:36 +08:00 committed by Tomas Kopecek
parent 850bea59fc
commit 969f102598

View file

@ -376,7 +376,7 @@ class Session(object):
# in this point we can continue with proxied user in same way as if it is not proxied
if proxyauthtype is not None:
if not context.opts['AllowProxyAuthType']:
if not context.opts['AllowProxyAuthType'] and authtype != proxyauthtype:
raise koji.AuthError("Proxy must use same auth mechanism as hub (behaviour "
"can be overriden via AllowProxyAuthType hub option)")
if proxyauthtype not in (koji.AUTHTYPE_GSSAPI, koji.AUTHTYPE_SSL):