canonical / vault-operator

A machine charm for Vault
https://charmhub.io/vault?channel=1.16/stable
Apache License 2.0
0 stars 2 forks source link

fix: Store the vault kv secret id in peer relation data #259

Closed saltiyazan closed 2 months ago

saltiyazan commented 3 months ago

Description

This change will store the vault kv secret id in relation and make sure that the secret is only fetched using that Id to be ensure that the ID format does not change over time not even when the relation is removed then added again.

The optimal solution would be to remove the secret when the relation is removed so a new secret is created if that relation is added again. This solution is not straightforward as it requires the charm to know the label of the secret it wants to remove, that will only be possible if it is passed by the lib as in #263 example pr. However as explained the description of that PR this makes the lib tied to some implementation detail it should not be concerned with. A ticket has been created in the backlog to simplify juju secret labels in the charm which should make it much easier to remove the secret on relation-broken events.

Checklist:

saltiyazan commented 2 months ago

Closing in favour of #266