Skip to content

Modernize vaultlocker for python 3.12+ and current hvac APIs#24

Open
Raven-182 wants to merge 2 commits into
openstack-charmers:masterfrom
Raven-182:vaultlocker-updates
Open

Modernize vaultlocker for python 3.12+ and current hvac APIs#24
Raven-182 wants to merge 2 commits into
openstack-charmers:masterfrom
Raven-182:vaultlocker-updates

Conversation

@Raven-182

Copy link
Copy Markdown

Updates vaultlocker to support python 3.12+ and current hvac releases.

Changes

  • Replace Client.auth_approle() with Client.auth.approle.login().
  • Set hvac>=0.10.6 as the minimum supported version.
  • Add a regression test for the AppRole login call.
  • Remove the undeclared six dependency. A clean installation was failing with with ModuleNotFoundError: No module named 'six'
  • Remove old python 2 and 3 test environments.
  • Add noble, resolute, and latest dependency test environments.
  • Test against Vault 1.8, 1.18, and 2.0.
  • Update the GitHub Actions versions.

The old auth_approle() method is not available in hvac 1.x or 2.x. hvac 0.10.6 introduced the namespaced AppRole API used here.

The other hvac calls currently used by vaultlocker still work with hvac 2.x. KV API changes will be handled separately as part of the KV v2 work.

Testing

Manually verified the vaultlocker encrypt and decrypt flows against a real Vault instance.

OPEN-4605

- Replace deprecated `Client.auth_approle()` call with
`Client.auth.approle.login()`.
- Require `hvac>=0.10.6` at minimum, this adds support for `Client.auth.approle.login()`.
- Replace `six.moves.configparser` with `configparser`.

Signed-off-by: Raven Kaur <raven.kaur@canonical.com>
- Drop python 2 and legacy python 3 test environments and require Python
3.12 or newer.
- Add tox and CI coverage for noble, resolute, and latest dependencies on python 3.12 and 3.14
- Remove the OpenStack upper constraints for dependencies
- Test each dependency set against Vault 1.8, 1.18, and 2.0
- Update github action versions

Signed-off-by: Raven Kaur <raven.kaur@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant