#1125 Ignore non-existing option when activate a session
Merged by mikem. Opened by cqi.
cqi/koji fix-krb-auth  into  master

Download 1125.patch

For kerberos auth, if not login with a keytab and principal, those two
options may not be present in the incoming options.

Similarly, debug is also an optional option that could not exist.

Signed-off-by: Chenxiong Qi cqi@redhat.com

:thumbsup:

All of these options have default values in read_config(). In what situation are they not set?

@mikem I encountered this issue during running rpkg tests after replacing code with activate_session. rpkg logs into a session via gssapi, so test just uses a fake koji config dict without setting keytab and principal, then test fails at line if options.keytab and options.principal:.

Yes, read_config returns a mapping containing keytab and principal with proper values, and I can also set them in the fake config dict in test to workaround. I made this PR and just thought it could be convenient in some cases where those two configs are not necessary.

Fair enough. I just wanted to make sure we weren't missing a problem elsewhere in Koji.

Commit dc9e0dd2 fixes this pull-request

Pull-Request has been merged by mikem

Metadata