1Password Local Lookup Plugin
This is a simple lookup plugin that search for secrets in a local 1Password database (B5.sqlite format). It uses the onepassword-local-search python module that greatly improve performance over querying directly the 1Password servers.
Requirements
You require:
- python 3.7
- onepassword-local-search module
pip3 install onepassword-local-search
Example Playbook
- hosts: servers
roles:
- role: mickaelperrin.ansible-onepassword-local-lookup-plugin
tasks
- debug:
msg: "{{ lookup('onepassword_local', 'p6iyvjqv4xdxw52hsacpkq4rgi', field='name') }}"
- debug:
msg: "{{ lookup('onepassword_local', 'c3264cef-1e5e-4c96-a192-26729539f3f5', field='your_custom_field') }}"
- debug:
msg: "{{ lookup('onepassword_local', '1234567890', field='password') }}"
Custom uuid feature
uuid in 1Password changes when you move an item from one vault to another. To prevent this issue, a custom uuid mapping feature has been implemented.
You need to add on each item a field named UUID (in capitals).
Then run op-local mapping update to generate the mapping table relationship.
You can display UUID mapping by running op-local mapping list.
As we migrated from Lastpass to 1Password, we have also implemented a UUID mapping feature
related to a field named LASTPASS_ID. If the uuid given is 100% numeric, the search query will be performed over this field.
Tests
Tests are managed by pytest for the python part and molecule for the ansible part with docker as driver.
mkvirtualenv3 ansible-onepassword-local-lookup-plugin
pip install -r requirements/dev.txt
Pytest
pytest
Molecule
Ensure that docker service is up and running
molecule test
License
GPLv3
Metadata
Release files for ansible-1password-lookup-plugin 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ansible 1password lookup plugin-0.2.2.tar.gz | 5.7 kB | Without provenance | Details for ansible 1password lookup plugin-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ansible_1password_lookup_plugin-0.2.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for ansible_1password_lookup_plugin-0.2.2-py2.py3-none-any.whl |
Total release size: 23.5 kB
Release files / ansible 1password lookup plugin-0.2.2.tar.gz
| Download URL | ansible 1password lookup plugin-0.2.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ebb64ed09d96a1c90df03e565dab0c2468c4fd648bc89fbc6e39e6690bc8137
|
|
BLAKE2b-256 checksum How to use checksums |
ac5a6a5243dd77ae87a13a1c6df1c4b61a5fbb4e3260e2d2baf8dd356df32478
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|
Release files / ansible_1password_lookup_plugin-0.2.2-py2.py3-none-any.whl
| Download URL | ansible_1password_lookup_plugin-0.2.2-py2.py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2a9878e55bb8044d9289883f1c6e1e50439e0fef5d71ff2a419f8fce341257a1
|
|
BLAKE2b-256 checksum How to use checksums |
c216c0c73cefc6cbf6ee2cc0ea0889e36556c54498193515c1c31ec9442cf8b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|
Security for ansible-1password-lookup-plugin 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.