pulp / pulp/pulp-cli

After enabling client certificate authentication: Error: {"detail":"Authentication credentials were not provided."}

Open
#1,092 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
43
Forks
52
Avg merge
11h 38m
Merged PRs (30d)
11

Description

Summary

[cli]
base_url = "https://pulp3.hostname.tld"
username = "admin"
password = "password"
api_root = "/pulp/"
domain = "default"
format = "json"
cert = "secret/client.cert.pem"
key = "secret/client.key.pem"
verify_ssl = true

First I got CERTIFICATE_VERIFY_FAILED because pulp cli config file has no option for providing CA certificate bundle.
After enabling environment variable export PULP_CA_BUNDLE="secret/ca.crt" a new error appears:

$ pulp --config secret/cli.toml --verbose rpm repository list
repositories_rpm_rpm_list : get https://pulp3.hostname.tld/pulp/api/v3/repositories/rpm/rpm/?offset=0&limit=25
Response: 401
Error: {"detail":"Authentication credentials were not provided."}

Admin credentials didn't change, i just added client certificate authentication requirement to relevant ingress.

Steps to reproduce

As provided above

Expected behavior

pulp cli would return repository list

Pulp and pulp-cli version info

pulp-cli version:
$ pulp --config secret/cli.toml --version
Pulp3 Command Line Interface, Version 0.29.1
Plugin Versions:
common: 0.29.1

Pulp version:
latest default images from pulp-operator

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the verbose pulp --config secret/cli.toml --verbose rpm repository list request with PULP_CA_BUNDLE set, then inspect how pulp-cli combines client certificates, CA bundles, and admin credentials. The secret/cli.toml configuration and PULP_CA_BUNDLE environment variable are the concrete inputs. Done means the authenticated request returns the repository list when client certificate authentication is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.