Repository navigation
[WIP] proton_pass lookup: mark plugin return values as secrets - #12740
felixfontein wants to merge 3 commits into
Conversation
|
@jeankhawand @kingtong I would very much appreciate if you could take a look at this PR, to make sure that only definite secrets are marked as secrets, and not random other values. Thanks. |
I took a quick look and, from what I understand, every string in an item's parsed fields will be registered as a secret, including non-secret fields. Whether a field is secret could be determined during parsing, while the necessary context is still available. For extra fields, we can distinguish The values could be registered directly during parsing, but that would have a broader effect because not all parsed fields are necessarily returned. Another option would be for the parser to return the fields as it does currently, together with the set of fields identified as secret. The caller could then register only the secret values it actually returns. |
300d4fc to
e76a77c
Compare
e76a77c to
884e571
Compare
|
@kingtong thanks for your feedback! I've adjusted the module that it internally passes on a boolean flag ( |
LGTM. I’d suggest maybe adding a test in |
23d67ba to
93cce51
Compare
93cce51 to
c645e75
Compare
This comment was marked as outdated.
This comment was marked as outdated.
c645e75 to
9ca0dfd
Compare

SUMMARY
Mark sensitive return values of lookups and modules as secrets on ansible-core 2.22+. Uses the helper introduced in #12709.
The Secrets API is being introduced for ansible-core 2.22 and allows modules and plugins to mark secret values for redaction. As opposed to the rudimentary
no_loghandling up until ansible-core 2.21, this improves masking of secret values.More infos:
For this plugin I have no idea how the return values look like, so this definitely needs help from active users and/or plugin maintainers!
ISSUE TYPE
COMPONENT NAME
plugins/lookup/proton_pass.py