In order to elliminate the potential for developer error (i.e. "forgetting to register a peer relation field as a secret field"), should we potentially consider a specific interface function that makes sure that a field is added as a secret?
I.e. what could be called from the charm's set_secret() method, ensuring that the field will be considered as a secret
So it would dynamically add the field to secret-fields if needed (see https://github.com/canonical/data-platform-libs/issues/127, and add the value specified.
This should be very simple to do, by literally calling the new function to be added, let's say update_secret_fields(new_field), and update_relation_data().
In order to elliminate the potential for developer error (i.e. "forgetting to register a peer relation field as a secret field"), should we potentially consider a specific interface function that makes sure that a field is added as a secret?
I.e. what could be called from the charm's
set_secret()
method, ensuring that the field will be considered as a secret So it would dynamically add the field tosecret-fields
if needed (see https://github.com/canonical/data-platform-libs/issues/127, and add the value specified.This should be very simple to do, by literally calling the new function to be added, let's say
update_secret_fields(new_field)
, andupdate_relation_data()
.