proxcli 0.7.0__tar.gz → 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {proxcli-0.7.0 → proxcli-0.7.1}/CHANGELOG.md +12 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/PKG-INFO +1 -1
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/main.py +13 -15
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/auth.py +1 -4
- {proxcli-0.7.0 → proxcli-0.7.1}/pyproject.toml +1 -1
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_auth.py +1 -5
- {proxcli-0.7.0 → proxcli-0.7.1}/uv.lock +2 -2
- {proxcli-0.7.0 → proxcli-0.7.1}/.env.example +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/.github/workflows/ci.yml +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/.gitignore +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/.python-version +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/AGENTS.md +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/PLAN.md +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/PROJECT.md +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/PROMPT.md +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/README.md +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/TODO.md +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/auth.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/cluster.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/completion.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/container.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/firewall_helpers.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/node.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/pool.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/storage.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/tasks.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/vm.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/client.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/exceptions.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/config/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/config/config.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/config/models.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/formatter.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/json_fmt.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/table_fmt.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/yaml_fmt.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/utils/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/utils/helpers.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/utils/logging.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/conftest.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_cli/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_cli/test_main.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_client.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_config.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_integration/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_output/__init__.py +0 -0
- {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_output/test_formatter.py +0 -0
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.1] - 2026-06-20
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- API token authentication: Removed incorrect base64 encoding.
|
|
14
|
+
Proxmox expects `PVEAPIToken=user@realm!tokenid=secret` as plain text
|
|
15
|
+
in the Authorization header, not base64-encoded.
|
|
16
|
+
- Dry-run mode now always sets API token headers so that
|
|
17
|
+
`--dry-run` output accurately reflects the Authorization header
|
|
18
|
+
that would be sent. (Password auth is still skipped in dry-run
|
|
19
|
+
since it requires a network call.)
|
|
20
|
+
|
|
10
21
|
## [0.7.0] - 2026-06-20
|
|
11
22
|
|
|
12
23
|
### Added
|
|
@@ -82,6 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
82
93
|
- CSRF ticket auto-refresh on 401.
|
|
83
94
|
- AI-agent-friendly: default JSON output, strict exit codes, `--dry-run` mode.
|
|
84
95
|
|
|
96
|
+
[0.7.1]: https://github.com/xezpeleta/proxcli/releases/tag/v0.7.1
|
|
85
97
|
[0.7.0]: https://github.com/xezpeleta/proxcli/releases/tag/v0.7.0
|
|
86
98
|
[0.6.0]: https://github.com/xezpeleta/proxcli/releases/tag/v0.6.0
|
|
87
99
|
[0.5.0]: https://github.com/xezpeleta/proxcli/releases/tag/v0.5.0
|
|
@@ -149,21 +149,19 @@ def _build_client(overrides: dict[str, Any], args: argparse.Namespace) -> Proxmo
|
|
|
149
149
|
|
|
150
150
|
auth_mgr = AuthManager()
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
verify=overrides["verify_tls"],
|
|
166
|
-
)
|
|
152
|
+
if overrides["api_token_id"] and overrides["api_token_secret"]:
|
|
153
|
+
auth_mgr.set_api_token(
|
|
154
|
+
overrides["username"] or "root@pam",
|
|
155
|
+
overrides["api_token_id"],
|
|
156
|
+
overrides["api_token_secret"],
|
|
157
|
+
)
|
|
158
|
+
elif overrides["password"] and not args.dry_run:
|
|
159
|
+
auth_mgr.authenticate_password(
|
|
160
|
+
overrides["url"],
|
|
161
|
+
overrides["username"] or "root@pam",
|
|
162
|
+
overrides["password"],
|
|
163
|
+
verify=overrides["verify_tls"],
|
|
164
|
+
)
|
|
167
165
|
|
|
168
166
|
client = ProxmoxClient(
|
|
169
167
|
base_url=overrides["url"],
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
import base64
|
|
6
5
|
from enum import Enum
|
|
7
6
|
from typing import Any
|
|
8
7
|
|
|
@@ -63,9 +62,7 @@ class AuthManager:
|
|
|
63
62
|
|
|
64
63
|
def set_api_token(self, user: str, token_id: str, secret: str) -> None:
|
|
65
64
|
"""Use a Proxmox API token for authentication."""
|
|
66
|
-
|
|
67
|
-
encoded = base64.b64encode(raw.encode()).decode()
|
|
68
|
-
self._auth_header = f"PVEAPIToken {encoded}"
|
|
65
|
+
self._auth_header = f"PVEAPIToken={user}!{token_id}={secret}"
|
|
69
66
|
self._method = AuthMethod.API_TOKEN
|
|
70
67
|
self._ticket = None
|
|
71
68
|
self._csrf_token = None
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
import base64
|
|
6
|
-
|
|
7
5
|
import pytest
|
|
8
6
|
|
|
9
7
|
from proxmox.client.auth import AuthMethod
|
|
@@ -60,9 +58,7 @@ class TestAuthManager:
|
|
|
60
58
|
assert auth_manager.method == AuthMethod.API_TOKEN
|
|
61
59
|
|
|
62
60
|
headers = auth_manager.get_headers()
|
|
63
|
-
|
|
64
|
-
expected_encoded = base64.b64encode(expected_raw.encode()).decode()
|
|
65
|
-
assert headers["Authorization"] == f"PVEAPIToken {expected_encoded}"
|
|
61
|
+
assert headers["Authorization"] == "PVEAPIToken=root@pam!my-token=my-secret"
|
|
66
62
|
assert "Cookie" not in headers
|
|
67
63
|
assert "CSRFPreventionToken" not in headers
|
|
68
64
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 2
|
|
3
3
|
requires-python = ">=3.10"
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
@@ -254,7 +254,7 @@ wheels = [
|
|
|
254
254
|
|
|
255
255
|
[[package]]
|
|
256
256
|
name = "proxcli"
|
|
257
|
-
version = "0.7.
|
|
257
|
+
version = "0.7.1"
|
|
258
258
|
source = { editable = "." }
|
|
259
259
|
dependencies = [
|
|
260
260
|
{ name = "httpx" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|