expand_keyring_var currently calls get_password two ways (renamed labels for clarity):
USE_KEYRING: pair.section, pair.key
USE_KEYRING[name]: name, None
Ignoring the part where get_password's calling convention should be optional keyword arguments and not jank conditional variable reordering, hubble should have support for named keyring variables with implicit section->keyring environment mappings.
The use-case is basically this:
[hubble]
OS_PASSWORD=USE_KEYRING["product-password"]
[lon]
OS_PASSWORD=USE_KEYRING["product-password-lon"]
Instead of having two key names, product-password and product-password-lon, I should be able to create a product-password in the global keyring environment, and a product-password in the lon keyring environment.
This allows the configuration to be condensed to just:
[hubble]
OS_PASSWORD=<new-use-keyring-syntax>["product-password"]
As you can see, this is probably a most easily implemented as backwards-incompatible change.
expand_keyring_varcurrently callsget_passwordtwo ways (renamed labels for clarity):USE_KEYRING:pair.section, pair.keyUSE_KEYRING[name]:name, NoneIgnoring the part where
get_password's calling convention should be optional keyword arguments and not jank conditional variable reordering, hubble should have support for named keyring variables with implicit section->keyring environment mappings.The use-case is basically this:
Instead of having two key names,
product-passwordandproduct-password-lon, I should be able to create aproduct-passwordin the global keyring environment, and aproduct-passwordin the lon keyring environment.This allows the configuration to be condensed to just:
As you can see, this is probably a most easily implemented as backwards-incompatible change.