-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnePassword library assumes incorrectly that a field als an attribute 'value' #7240
Closed
1 task done
Comments
wkleinheerenbrink
added a commit
to wkleinheerenbrink/community.general
that referenced
this issue
Sep 11, 2023
…-collections#7240) A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).
Files identified in the description: If these files are incorrect, please update the |
ansibullbot
added
bug
This issue/PR relates to a bug
lookup
lookup plugin
plugins
plugin (any type)
labels
Sep 11, 2023
Very good find. In the v1 class, the Simple reproducer playbook- hosts: localhost
tasks:
- debug:
msg: "{{ lookup('onepassword', 'Dummy Login', field='some-omitted-property') }}"
|
wkleinheerenbrink
added a commit
to wkleinheerenbrink/community.general
that referenced
this issue
Sep 12, 2023
…-collections#7240) A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).
wkleinheerenbrink
added a commit
to wkleinheerenbrink/community.general
that referenced
this issue
Sep 12, 2023
…-collections#7240) A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).
felixfontein
pushed a commit
that referenced
this issue
Sep 13, 2023
felixfontein
pushed a commit
that referenced
this issue
Sep 13, 2023
…for safe lookup of value (Fixes #7240) (#7258) Use `get(..)` instead of [..] for safe lookup of value (Fixes #7240) (#7241) A OnePassword field item might not have a value (property) when the user has omitted it (on purpose). (cherry picked from commit 1beb38c) Co-authored-by: Wouter Klein Heerenbrink <[email protected]>
felixfontein
pushed a commit
that referenced
this issue
Sep 13, 2023
…for safe lookup of value (Fixes #7240) (#7257) Use `get(..)` instead of [..] for safe lookup of value (Fixes #7240) (#7241) A OnePassword field item might not have a value (property) when the user has omitted it (on purpose). (cherry picked from commit 1beb38c) Co-authored-by: Wouter Klein Heerenbrink <[email protected]>
etrombly
pushed a commit
to etrombly/community.general
that referenced
this issue
Oct 25, 2023
…-collections#7240) (ansible-collections#7241) A OnePassword field item might not have a value (property) when the user has omitted it (on purpose).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When using the 'lookup' method to get a field value from a field in a OnePassword Vault, the method might raise a KeyError when trying to access the key 'value' on the field dict. Given a template in the OnePassword vault, a label for a field might exist without a value if the user has omitted this value on purpose.
Issue Type
Bug Report
Component Name
onepassword
Ansible Version
Community.general Version
Configuration
$ ansible-config dump --only-changed
OS / Environment
No response
Steps to Reproduce
Expected Results
Empty (or None-like) value at the location of lookup(..., 'some-omitted-property')
Actual Results
KeyError("value", "value")
Code of Conduct
The text was updated successfully, but these errors were encountered: