Skip to content

per-environment named keys #15

@buhman

Description

@buhman

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions