azurator 0.1.0a1__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 (76) hide show
  1. azurator-0.1.0a1/LICENSE +21 -0
  2. azurator-0.1.0a1/PKG-INFO +145 -0
  3. azurator-0.1.0a1/README.md +94 -0
  4. azurator-0.1.0a1/azurator/__init__.py +10 -0
  5. azurator-0.1.0a1/azurator/__main__.py +6 -0
  6. azurator-0.1.0a1/azurator/auth.py +554 -0
  7. azurator-0.1.0a1/azurator/cli.py +1643 -0
  8. azurator-0.1.0a1/azurator/clients.py +373 -0
  9. azurator-0.1.0a1/azurator/composition.py +81 -0
  10. azurator-0.1.0a1/azurator/discovery.py +66 -0
  11. azurator-0.1.0a1/azurator/execution.py +949 -0
  12. azurator-0.1.0a1/azurator/exporting.py +287 -0
  13. azurator-0.1.0a1/azurator/files.py +592 -0
  14. azurator-0.1.0a1/azurator/fingerprints.py +115 -0
  15. azurator-0.1.0a1/azurator/inputs.py +247 -0
  16. azurator-0.1.0a1/azurator/matching.py +588 -0
  17. azurator-0.1.0a1/azurator/models.py +384 -0
  18. azurator-0.1.0a1/azurator/operation.py +522 -0
  19. azurator-0.1.0a1/azurator/planning.py +803 -0
  20. azurator-0.1.0a1/azurator/presentation.py +1094 -0
  21. azurator-0.1.0a1/azurator/providers/__init__.py +31 -0
  22. azurator-0.1.0a1/azurator/providers/app_service_settings.py +562 -0
  23. azurator-0.1.0a1/azurator/providers/base.py +128 -0
  24. azurator-0.1.0a1/azurator/providers/builtin.py +222 -0
  25. azurator-0.1.0a1/azurator/providers/cognitive_services.py +514 -0
  26. azurator-0.1.0a1/azurator/providers/dotenv_file.py +336 -0
  27. azurator-0.1.0a1/azurator/providers/foundry_connections.py +1076 -0
  28. azurator-0.1.0a1/azurator/providers/resource_ids.py +137 -0
  29. azurator-0.1.0a1/azurator/providers/sops_dotenv_file.py +426 -0
  30. azurator-0.1.0a1/azurator/providers/storage.py +513 -0
  31. azurator-0.1.0a1/azurator/py.typed +1 -0
  32. azurator-0.1.0a1/azurator/sops.py +309 -0
  33. azurator-0.1.0a1/azurator/workflows.py +195 -0
  34. azurator-0.1.0a1/azurator.egg-info/PKG-INFO +145 -0
  35. azurator-0.1.0a1/azurator.egg-info/SOURCES.txt +74 -0
  36. azurator-0.1.0a1/azurator.egg-info/dependency_links.txt +1 -0
  37. azurator-0.1.0a1/azurator.egg-info/entry_points.txt +2 -0
  38. azurator-0.1.0a1/azurator.egg-info/requires.txt +28 -0
  39. azurator-0.1.0a1/azurator.egg-info/top_level.txt +1 -0
  40. azurator-0.1.0a1/pyproject.toml +120 -0
  41. azurator-0.1.0a1/setup.cfg +4 -0
  42. azurator-0.1.0a1/tests/test_app_service_settings_discovery.py +220 -0
  43. azurator-0.1.0a1/tests/test_app_service_settings_mutation.py +300 -0
  44. azurator-0.1.0a1/tests/test_auth.py +812 -0
  45. azurator-0.1.0a1/tests/test_builtin_providers.py +107 -0
  46. azurator-0.1.0a1/tests/test_cli_discovery_auth.py +514 -0
  47. azurator-0.1.0a1/tests/test_cli_export.py +480 -0
  48. azurator-0.1.0a1/tests/test_cli_match_plan.py +948 -0
  49. azurator-0.1.0a1/tests/test_cli_operation.py +371 -0
  50. azurator-0.1.0a1/tests/test_cli_rotate.py +747 -0
  51. azurator-0.1.0a1/tests/test_cli_selection.py +418 -0
  52. azurator-0.1.0a1/tests/test_cli_sops.py +194 -0
  53. azurator-0.1.0a1/tests/test_clients.py +160 -0
  54. azurator-0.1.0a1/tests/test_cognitive_services_provider.py +505 -0
  55. azurator-0.1.0a1/tests/test_composition.py +176 -0
  56. azurator-0.1.0a1/tests/test_discovery.py +104 -0
  57. azurator-0.1.0a1/tests/test_dotenv_file_provider.py +395 -0
  58. azurator-0.1.0a1/tests/test_execution_dotenv.py +111 -0
  59. azurator-0.1.0a1/tests/test_execution_rotation_resume.py +499 -0
  60. azurator-0.1.0a1/tests/test_execution_sops.py +111 -0
  61. azurator-0.1.0a1/tests/test_execution_two_slot.py +101 -0
  62. azurator-0.1.0a1/tests/test_execution_validation.py +456 -0
  63. azurator-0.1.0a1/tests/test_exporting.py +456 -0
  64. azurator-0.1.0a1/tests/test_files.py +334 -0
  65. azurator-0.1.0a1/tests/test_fingerprints.py +91 -0
  66. azurator-0.1.0a1/tests/test_foundry_connections_discovery.py +816 -0
  67. azurator-0.1.0a1/tests/test_foundry_connections_mutation.py +508 -0
  68. azurator-0.1.0a1/tests/test_inputs.py +125 -0
  69. azurator-0.1.0a1/tests/test_matching.py +594 -0
  70. azurator-0.1.0a1/tests/test_operation.py +180 -0
  71. azurator-0.1.0a1/tests/test_package.py +33 -0
  72. azurator-0.1.0a1/tests/test_planning.py +759 -0
  73. azurator-0.1.0a1/tests/test_resource_ids.py +118 -0
  74. azurator-0.1.0a1/tests/test_sops.py +277 -0
  75. azurator-0.1.0a1/tests/test_sops_dotenv_file_provider.py +293 -0
  76. azurator-0.1.0a1/tests/test_storage_provider.py +525 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jan T. Müller
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: azurator
3
+ Version: 0.1.0a1
4
+ Summary: Rotate shared-key credentials for Azure services and update supported places where they are stored.
5
+ Author-email: "Jan T. Müller" <mail@jantmueller.com>
6
+ License-Expression: MIT
7
+ Project-URL: homepage, https://github.com/janthmueller/azurator
8
+ Project-URL: documentation, https://janthmueller.github.io/azurator/
9
+ Project-URL: source, https://github.com/janthmueller/azurator
10
+ Project-URL: tracker, https://github.com/janthmueller/azurator/issues
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Security
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: azure-ai-projects<2.4,>=2.3
26
+ Requires-Dist: azure-core<2,>=1.37
27
+ Requires-Dist: azure-identity<2,>=1.25
28
+ Requires-Dist: azure-mgmt-cognitiveservices<14.2,>=14.1
29
+ Requires-Dist: azure-mgmt-core<2,>=1.6
30
+ Requires-Dist: azure-mgmt-storage<25.2,>=25.1
31
+ Requires-Dist: azure-mgmt-web<11.1,>=11.0.1
32
+ Requires-Dist: openai<3,>=2.8
33
+ Requires-Dist: platformdirs<5,>=4.3
34
+ Requires-Dist: pydantic<3,>=2.12
35
+ Requires-Dist: rich<15,>=14
36
+ Requires-Dist: typer<1,>=0.24
37
+ Provides-Extra: audit
38
+ Requires-Dist: pip-audit<3,>=2.9; extra == "audit"
39
+ Provides-Extra: dev
40
+ Requires-Dist: hypothesis>=6; extra == "dev"
41
+ Requires-Dist: pyright>=1.1; extra == "dev"
42
+ Requires-Dist: pytest>=8; extra == "dev"
43
+ Requires-Dist: pytest-cov>=6; extra == "dev"
44
+ Requires-Dist: ruff>=0.8; extra == "dev"
45
+ Provides-Extra: release
46
+ Requires-Dist: build>=1; extra == "release"
47
+ Requires-Dist: pyinstaller>=6; extra == "release"
48
+ Requires-Dist: python-semantic-release<11,>=10; extra == "release"
49
+ Requires-Dist: twine>=5; extra == "release"
50
+ Dynamic: license-file
51
+
52
+ # Azurator
53
+
54
+ Azurator rotates shared-key credentials for Azure services and updates
55
+ supported places where they are stored.
56
+
57
+ > [!WARNING]
58
+ > Azurator is pre-alpha. Key rotation changes Azure and cannot be rolled back.
59
+ > Review the displayed changes before confirming them.
60
+
61
+ ## Installation
62
+
63
+ Python installations require Python 3.10 or newer. The default login uses the
64
+ [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli).
65
+
66
+ ```bash
67
+ pipx install azurator
68
+ ```
69
+
70
+ Other install paths:
71
+
72
+ - `pip install azurator`
73
+ - prebuilt archives from the [latest release](https://github.com/janthmueller/azurator/releases/latest)
74
+ - `nix run github:janthmueller/azurator -- --help`
75
+
76
+ The optional SOPS workflow also requires SOPS 3.13.x. See the
77
+ [installation guide](https://janthmueller.github.io/azurator/getting-started/installation/)
78
+ for details.
79
+
80
+ ## Quick Start
81
+
82
+ Rotate keys already stored in a dotenv file:
83
+
84
+ ```bash
85
+ azurator login
86
+ azurator rotate --env-file .env
87
+ ```
88
+
89
+ Azurator matches the file values to supported Azure keys, shows every planned
90
+ change, asks once for confirmation, rotates the keys, and updates the file and
91
+ supported Azure configuration that stores the same values.
92
+
93
+ Inspect or preview first when needed:
94
+
95
+ ```bash
96
+ azurator match --env-file .env
97
+ azurator plan --env-file .env
98
+ ```
99
+
100
+ ## Other Workflows
101
+
102
+ - `azurator rotate` selects keys interactively.
103
+ - `azurator rotate --sops-file secrets.enc.env` updates a SOPS-encrypted dotenv file.
104
+ - `azurator export --sops-out azure-keys.enc.env` creates a new SOPS-encrypted dotenv file.
105
+ - `azurator export --out azure-keys.env` creates a new dotenv file from selected keys.
106
+ - `azurator discover` lists supported key resources without retrieving key values.
107
+
108
+ ## Current Scope
109
+
110
+ Azurator rotates Storage Account keys and the `Key1` and `Key2` credentials
111
+ exposed by Azure AI, Cognitive Services, and Azure OpenAI. When the same key is
112
+ stored in a selected dotenv file, a supported Foundry project connection, or an
113
+ App Service application setting, Azurator can update that configuration during
114
+ the rotation.
115
+
116
+ Azurator checks only the documented configuration types. It does not discover
117
+ every Azure secret or prove that a running workload uses a key.
118
+
119
+ See [Supported Key Resources and Bindings](https://janthmueller.github.io/azurator/reference/supported-keys-and-bindings/)
120
+ for the exact current coverage.
121
+
122
+ ## Shared Keys and Microsoft Entra ID
123
+
124
+ Shared keys are useful for prototypes and existing integrations, but they must
125
+ be stored, distributed, and rotated. Prefer Microsoft Entra ID when the service
126
+ and workload support it. Use Azurator when shared keys remain the practical
127
+ choice.
128
+
129
+ Read Microsoft's guidance for
130
+ [secretless authentication](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/secretless-authentication),
131
+ [Foundry authentication](https://learn.microsoft.com/en-us/azure/foundry/concepts/authentication-authorization-foundry),
132
+ and [Azure Storage Shared Key](https://learn.microsoft.com/en-us/azure/storage/common/shared-key-authorization-prevent).
133
+
134
+ ## Documentation
135
+
136
+ See the [documentation](https://janthmueller.github.io/azurator/) for setup,
137
+ supported workflows, and recovery.
138
+
139
+ ## Contributing
140
+
141
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
142
+
143
+ ## License
144
+
145
+ [MIT](LICENSE)
@@ -0,0 +1,94 @@
1
+ # Azurator
2
+
3
+ Azurator rotates shared-key credentials for Azure services and updates
4
+ supported places where they are stored.
5
+
6
+ > [!WARNING]
7
+ > Azurator is pre-alpha. Key rotation changes Azure and cannot be rolled back.
8
+ > Review the displayed changes before confirming them.
9
+
10
+ ## Installation
11
+
12
+ Python installations require Python 3.10 or newer. The default login uses the
13
+ [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli).
14
+
15
+ ```bash
16
+ pipx install azurator
17
+ ```
18
+
19
+ Other install paths:
20
+
21
+ - `pip install azurator`
22
+ - prebuilt archives from the [latest release](https://github.com/janthmueller/azurator/releases/latest)
23
+ - `nix run github:janthmueller/azurator -- --help`
24
+
25
+ The optional SOPS workflow also requires SOPS 3.13.x. See the
26
+ [installation guide](https://janthmueller.github.io/azurator/getting-started/installation/)
27
+ for details.
28
+
29
+ ## Quick Start
30
+
31
+ Rotate keys already stored in a dotenv file:
32
+
33
+ ```bash
34
+ azurator login
35
+ azurator rotate --env-file .env
36
+ ```
37
+
38
+ Azurator matches the file values to supported Azure keys, shows every planned
39
+ change, asks once for confirmation, rotates the keys, and updates the file and
40
+ supported Azure configuration that stores the same values.
41
+
42
+ Inspect or preview first when needed:
43
+
44
+ ```bash
45
+ azurator match --env-file .env
46
+ azurator plan --env-file .env
47
+ ```
48
+
49
+ ## Other Workflows
50
+
51
+ - `azurator rotate` selects keys interactively.
52
+ - `azurator rotate --sops-file secrets.enc.env` updates a SOPS-encrypted dotenv file.
53
+ - `azurator export --sops-out azure-keys.enc.env` creates a new SOPS-encrypted dotenv file.
54
+ - `azurator export --out azure-keys.env` creates a new dotenv file from selected keys.
55
+ - `azurator discover` lists supported key resources without retrieving key values.
56
+
57
+ ## Current Scope
58
+
59
+ Azurator rotates Storage Account keys and the `Key1` and `Key2` credentials
60
+ exposed by Azure AI, Cognitive Services, and Azure OpenAI. When the same key is
61
+ stored in a selected dotenv file, a supported Foundry project connection, or an
62
+ App Service application setting, Azurator can update that configuration during
63
+ the rotation.
64
+
65
+ Azurator checks only the documented configuration types. It does not discover
66
+ every Azure secret or prove that a running workload uses a key.
67
+
68
+ See [Supported Key Resources and Bindings](https://janthmueller.github.io/azurator/reference/supported-keys-and-bindings/)
69
+ for the exact current coverage.
70
+
71
+ ## Shared Keys and Microsoft Entra ID
72
+
73
+ Shared keys are useful for prototypes and existing integrations, but they must
74
+ be stored, distributed, and rotated. Prefer Microsoft Entra ID when the service
75
+ and workload support it. Use Azurator when shared keys remain the practical
76
+ choice.
77
+
78
+ Read Microsoft's guidance for
79
+ [secretless authentication](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/secretless-authentication),
80
+ [Foundry authentication](https://learn.microsoft.com/en-us/azure/foundry/concepts/authentication-authorization-foundry),
81
+ and [Azure Storage Shared Key](https://learn.microsoft.com/en-us/azure/storage/common/shared-key-authorization-prevent).
82
+
83
+ ## Documentation
84
+
85
+ See the [documentation](https://janthmueller.github.io/azurator/) for setup,
86
+ supported workflows, and recovery.
87
+
88
+ ## Contributing
89
+
90
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
91
+
92
+ ## License
93
+
94
+ [MIT](LICENSE)
@@ -0,0 +1,10 @@
1
+ """Discover and safely rotate shared-key credentials for Azure services."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("azurator")
7
+ except PackageNotFoundError: # pragma: no cover - source trees are normally installed editable
8
+ __version__ = "0.0.0+unknown"
9
+
10
+ __all__ = ["__version__"]
@@ -0,0 +1,6 @@
1
+ """Module entry point for PyInstaller and ``python -m azurator``."""
2
+
3
+ from azurator.cli import app
4
+
5
+ if __name__ == "__main__":
6
+ app()