-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After enabling client certificate authentication: Error: {"detail":"Authentication credentials were not provided."} #1092
Comments
pulp-cli is supposed to authenticate either via client certs OR via basic auth. |
I'm migrating from old Pulp 2 server installation to Pulp 3 pulp-operator on Kubernetes. To match existing working Pulp 2 configuration in Pulp 3 installation, I've created two custom ingresses:
Client certificate protection is for blocking botnets from trying to exploit Pulp weaknesses. Makes perfect sense to me to support both in pulp cli - TLS for secure tunnel and username/password for API authentication. They are not the same to me, protection is layered, groups of users (mostly robots) are using same client certificate to gain access to API endpoint and protected content under private path. They authenticate themselves to API with unique usernames and passwords. Creating and managing per robot certificates, integreate all this into k8s ingress and Pulp RBAC system seems too much work to manage manually and not easy to automate. Also, I'm not aware of pulp-operator supporting anything else but password authentication for the admin user. https://pulpproject.org/pulp-operator/docs/admin/reference/custom_resources/repo_manager/ |
I'm unable to find Pulp documentation about enabling client certificate authentication for API users in Pulp. Must say that Pulp 3 documentation way worse than Pulp 2 was. Both content, its structure and UI. https://pulpproject.org/pulpcore/restapi/#tag/Users/operation/users_update |
The thing you are searching for is probably: I'm not saying that your initial request (somehow allowing multiple auth mechanisms to be used simultaneously) is invalid. It just never occurred to me that this would be needed, and we need to also think about servers where either one of the auth mechanisms is sufficient. |
The only thing needed to change is to comment out one line in code. pulp-cli/pulpcore/cli/common/generic.py Line 144 in 2feb2da
And pulp cli works as I need it to work. I don't get the external auth thing. There is no need for it, username and password are Pulp internal credentials. Just send them with mTLS cert and key and problem solved. Since there would only be a handful of client certificates, following is working well in Ingress config:
|
Actually, two changes are needed: vkukk@a5342e0 |
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: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
The text was updated successfully, but these errors were encountered: