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.
Files changed (52) hide show
  1. {proxcli-0.7.0 → proxcli-0.7.1}/CHANGELOG.md +12 -0
  2. {proxcli-0.7.0 → proxcli-0.7.1}/PKG-INFO +1 -1
  3. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/main.py +13 -15
  4. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/auth.py +1 -4
  5. {proxcli-0.7.0 → proxcli-0.7.1}/pyproject.toml +1 -1
  6. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_auth.py +1 -5
  7. {proxcli-0.7.0 → proxcli-0.7.1}/uv.lock +2 -2
  8. {proxcli-0.7.0 → proxcli-0.7.1}/.env.example +0 -0
  9. {proxcli-0.7.0 → proxcli-0.7.1}/.github/workflows/ci.yml +0 -0
  10. {proxcli-0.7.0 → proxcli-0.7.1}/.gitignore +0 -0
  11. {proxcli-0.7.0 → proxcli-0.7.1}/.python-version +0 -0
  12. {proxcli-0.7.0 → proxcli-0.7.1}/AGENTS.md +0 -0
  13. {proxcli-0.7.0 → proxcli-0.7.1}/PLAN.md +0 -0
  14. {proxcli-0.7.0 → proxcli-0.7.1}/PROJECT.md +0 -0
  15. {proxcli-0.7.0 → proxcli-0.7.1}/PROMPT.md +0 -0
  16. {proxcli-0.7.0 → proxcli-0.7.1}/README.md +0 -0
  17. {proxcli-0.7.0 → proxcli-0.7.1}/TODO.md +0 -0
  18. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/__init__.py +0 -0
  19. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/__init__.py +0 -0
  20. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/auth.py +0 -0
  21. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/cluster.py +0 -0
  22. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/completion.py +0 -0
  23. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/container.py +0 -0
  24. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/firewall_helpers.py +0 -0
  25. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/node.py +0 -0
  26. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/pool.py +0 -0
  27. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/storage.py +0 -0
  28. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/tasks.py +0 -0
  29. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/cli/vm.py +0 -0
  30. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/__init__.py +0 -0
  31. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/client.py +0 -0
  32. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/client/exceptions.py +0 -0
  33. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/config/__init__.py +0 -0
  34. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/config/config.py +0 -0
  35. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/config/models.py +0 -0
  36. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/__init__.py +0 -0
  37. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/formatter.py +0 -0
  38. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/json_fmt.py +0 -0
  39. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/table_fmt.py +0 -0
  40. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/output/yaml_fmt.py +0 -0
  41. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/utils/__init__.py +0 -0
  42. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/utils/helpers.py +0 -0
  43. {proxcli-0.7.0 → proxcli-0.7.1}/proxmox/utils/logging.py +0 -0
  44. {proxcli-0.7.0 → proxcli-0.7.1}/tests/__init__.py +0 -0
  45. {proxcli-0.7.0 → proxcli-0.7.1}/tests/conftest.py +0 -0
  46. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_cli/__init__.py +0 -0
  47. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_cli/test_main.py +0 -0
  48. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_client.py +0 -0
  49. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_config.py +0 -0
  50. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_integration/__init__.py +0 -0
  51. {proxcli-0.7.0 → proxcli-0.7.1}/tests/test_output/__init__.py +0 -0
  52. {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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxcli
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: A CLI tool to interact with Proxmox VE nodes and clusters via the REST API
5
5
  Author-email: Xabi Ezpeleta <xezpeleta@gmail.com>
6
6
  License: MIT
@@ -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
- # Don't authenticate if dry-run (no actual API calls will be made)
153
- if not args.dry_run:
154
- if overrides["api_token_id"] and overrides["api_token_secret"]:
155
- auth_mgr.set_api_token(
156
- overrides["username"] or "root@pam",
157
- overrides["api_token_id"],
158
- overrides["api_token_secret"],
159
- )
160
- elif overrides["password"]:
161
- auth_mgr.authenticate_password(
162
- overrides["url"],
163
- overrides["username"] or "root@pam",
164
- overrides["password"],
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
- raw = f"{user}!{token_id}={secret}"
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "proxcli"
3
- version = "0.7.0"
3
+ version = "0.7.1"
4
4
  description = "A CLI tool to interact with Proxmox VE nodes and clusters via the REST API"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -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
- expected_raw = "root@pam!my-token=my-secret"
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 = 3
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.0"
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