#2718 "koji call" insists on a krb5 ticket even if it's not required
Closed: Fixed 3 years ago by tkopecek. Opened 3 years ago 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

3 years ago

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

3 years ago

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

3 years ago

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

3 years ago

Commit b6bdad7 relates to this ticket

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

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2738 Merged 3 years ago
  • #2734 Merged 3 years ago