#2718 "koji call" insists on a krb5 ticket even if it's not required
Closed: Fixed by tkopecek. Opened by dcantrell.

I am able to communicate with the Koji hub using XML-RPC without an active krb5 ticket, but only for certain calls. This makes sense. Reading information requires no auth and submitting information does. For example, I can do:

xmlrpc https://koji.fedoraproject.org/kojihub getBuild nfs-utils-2.5.3-0.fc35

And get the build information for that build. This is great because it's how rpminspect works to gather builds from Koji. But if I try this using the koji command line program:

koji call --json-output getBuild nfs-utils-2.5.3-0.fc35

Then I get "[ERROR] koji: AuthError: unable to obtain a session". I would expect this to work for read-only calls like I can with the XML-RPC API.


It is coming from the reason, that call command is not intended for normal use. It is more a debug helper for things which can't be achieved by other means via CLI. So, it is simply authenticate everytime and it doesn't need to know about that specific API call if it needs auth or not. So, I don't think we want to extend whole API now to enable introspection for auth requirements (on the other hand it is an interesting idea for future).

Anyway, what is simple to be done is to add --no-auth option. So, if user knows that auth is not needed for that call he can add it. Would it be usable?

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

Yeah, that would be usable. The use case I'm coming from are CI integration scripts for rpminspect. Those are either shell or Python scripts and using 'koji call' to get either JSON or Python data from Koji makes the script runner more reliable.

I am ok with a --no-auth option that we know we just have to use, but I consider this pretty usable for integration in other software and not strictly an end-user tool.

Thanks!

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.25

Metadata Update from @tkopecek:
- Issue tagged with: usability

PR #2734

Metadata Update from @jcupova:
- Issue tagged with: testing-ready

Commit 56754989 fixes this issue

Commit 1dd53ab7 fixes this issue

Commit c23e8088 fixes this issue

Commit b6bdad7d relates to this ticket

Metadata Update from @mfilip:
- Issue tagged with: testing-done

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/2718

Please continue any further discussion there.

Metadata
Related Pull Requests