canonical / canonical/data-platform-libs

[DESIGN] Should ALL peer data handled as secret?

Open
#128 1 comment 0 reactions 1 assignee Claimed by @juditnovak View on GitHub
Dominant language
Python
Stars
13
Forks
12
PR merge metrics
No merged PRs in 30d

Description

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()`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.