Skip to content

pulp-cli 0.41 break username password auth in older configs (cert and key present but empty) #1487

Closed

Description

@elelaysh

Summary

Starting in v0.41 of pulp-cli, empty cert and key break username password authentication

Steps to reproduce

  1. ensure in ~/.config/pulp/cli.toml, for instance by generating with pulp-cli version 0.37.2
[cli]
(...)
username = "admin"
password = "xxx"
verify_ssl = true
cert = ""
key = ""
  1. install pulp-cli 0.39

  2. verify pulp user list still works

  3. update pulp-cli from 0.39 to 0.41

Expected behavior

pulp user list still works

Stacktrace/Error log

  Www-Authenticate: Basic realm="api"
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
b'{"detail":"Authentication credentials were not provided."}'
Error: Authentication failed for users_list.

Pulp and pulp-cli version info

Pulp3 Command Line Interface, Version 0.41.0
Plugin Versions:
  common: 0.41.0

Additional context

A config created by pulp-cli 0.37.2 has the empty string values for cert and key

Activity

  1. added
    bugSomething isn't working (template-set)
    Triage-NeededNeeds to be reviewed at next pulp-cli mtg
    on Oct 12, 2026
  2. mdellweg commented on Oct 13, 2026

    @mdellweg
    Member

    How did the old installation authenticate when nothing is specified?

  3. elelaysh commented on Oct 13, 2026

    @elelaysh
    Author

    I had username/password in the config

    username = "admin"
    password = "xxx"
    

    (adding to repro steps)

  4. mdellweg commented on Oct 14, 2026

    @mdellweg
    Member

    Can you attach the output of

    pulp debug openapi security-schemes
    and
    pulp debug openapi spec | jq '.paths."{auth_user_href}".get.security'

  5. mdellweg commented on Oct 14, 2026

    @mdellweg
    Member

    The only change i see that this would affect is that the cli would try to use the cert (specified wrongly as the empty string) (and fail) even in 0.39 if not username had been provided, but with 0.41 it actually prefers using that mechanism over basic auth.
    I think you should remove the keys from the config.

  6. elelaysh commented on Oct 15, 2026

    @elelaysh
    Author

    Thank you: I've already removed the empty strings.

    Please can you add something to the release notes? Because I think every user with a 0.37-generated config will have the issue.

  7. added 2 commits that reference this issue on Oct 15, 2026
    8a3d20a
    1048bac
  8. linked a pull request that will close this issueValidate credentials to not be empty #1489on Oct 15, 2026
  9. mdellweg commented on Oct 15, 2026

    @mdellweg
    Member

    Thank you for reporting this. The cli now fails on startup (validating the config) so a user just has to take action. Silently failing and hiding the root cause really was not nice.

  10. elelaysh commented on Oct 15, 2026

    @elelaysh
    Author

    Thank you for the fix :-)

  11. added a commit that references this issue on Oct 16, 2026
    8ffb354
  12. added a commit that references this issue on Oct 21, 2026
    267459f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage-NeededNeeds to be reviewed at next pulp-cli mtgbackport-0.41bugSomething isn't working (template-set)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions