[PR #128] [MERGED] FIX: HTTPS Token Auth verify_ssl propagation #188

Closed
opened 2026-02-27 15:46:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/proxmoxer/proxmoxer/pull/128
Author: @domrim
Created: 12/18/2022
Status: Merged
Merged: 12/20/2022
Merged by: @jhollowe

Base: developHead: fix/https-token-auth


📝 Commits (3)

  • ddb48ff fix pass all provided arguments to token auth-backend
  • f84fcfc add test to check correct propagation of verify_ssl
  • 0f99336 FIX: black linting error

📊 Changes

2 files changed (+24 additions, -1 deletions)

View changed files

📝 proxmoxer/backends/https.py (+8 -1)
📝 tests/test_https.py (+16 -0)

📄 Description

I discovered a bug in the https backend code for token auth. The verify_ssl arg was not passed correctly to the auth backend (and so was the timeout arg). I fixed this and implemented some checks to protect against this error for the future.

FYI this bug produced the folowing output at "normal" requests with correct SSL-Certificates on a proxmox host:

from proxmoxer import ProxmoxAPI
proxmox = ProxmoxAPI('proxmox-1.example.com user='demo@pve', token_name='demo', token_value='redacted', verify_ssl=True)
proxmox.nodes.get()
/Users/dominik/code/virtualenvs/proxmox-utils-vBjC0H-5-py3.10/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'proxmox-1.example.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
[{'ssl_fingerprint': 'redacted', 'id': 'node/proxmox-1', 'node': 'proxmox-1', 'level': '', 'status': 'online', 'type': 'node'}]

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/proxmoxer/proxmoxer/pull/128 **Author:** [@domrim](https://github.com/domrim) **Created:** 12/18/2022 **Status:** ✅ Merged **Merged:** 12/20/2022 **Merged by:** [@jhollowe](https://github.com/jhollowe) **Base:** `develop` ← **Head:** `fix/https-token-auth` --- ### 📝 Commits (3) - [`ddb48ff`](https://github.com/proxmoxer/proxmoxer/commit/ddb48ff6b8f49d2bc59e1d6bc1a7c97399dc3b1a) fix pass all provided arguments to token auth-backend - [`f84fcfc`](https://github.com/proxmoxer/proxmoxer/commit/f84fcfc90738bc2288cf59c23308e0a1ed5b0675) add test to check correct propagation of verify_ssl - [`0f99336`](https://github.com/proxmoxer/proxmoxer/commit/0f9933646665b53193675c9505d3f4010be1a2ce) FIX: black linting error ### 📊 Changes **2 files changed** (+24 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `proxmoxer/backends/https.py` (+8 -1) 📝 `tests/test_https.py` (+16 -0) </details> ### 📄 Description I discovered a bug in the https backend code for token auth. The `verify_ssl` arg was not passed correctly to the auth backend (and so was the `timeout` arg). I fixed this and implemented some checks to protect against this error for the future. FYI this bug produced the folowing output at "normal" requests with correct SSL-Certificates on a proxmox host: ```python from proxmoxer import ProxmoxAPI proxmox = ProxmoxAPI('proxmox-1.example.com user='demo@pve', token_name='demo', token_value='redacted', verify_ssl=True) proxmox.nodes.get() /Users/dominik/code/virtualenvs/proxmox-utils-vBjC0H-5-py3.10/lib/python3.10/site-packages/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'proxmox-1.example.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings warnings.warn( [{'ssl_fingerprint': 'redacted', 'id': 'node/proxmox-1', 'node': 'proxmox-1', 'level': '', 'status': 'online', 'type': 'node'}] ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:46:49 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmoxer#188
No description provided.