linux:security:keyring:secret-tool
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:security:keyring:secret-tool [2021/11/09 00:26] – [Usage] chuck | linux:security:keyring:secret-tool [2021/11/14 16:59] (current) – chuck | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======secret-tool====== | ======secret-tool====== | ||
| - | Store and retrieve passwords from the keyring. | ||
| ---- | ---- | ||
| - | ===Description=== | + | =====Description===== |
| - | <WRAP green announcement smaller> | + | Store and retrieve passwords from the keyring. |
| - | ==From man secret-tool== | + | |
| - | Each password is stored in an item. Items are uniquely identified by a set of attribute keys and values. When | + | |
| - | storing a password you must specify unique pairs of attributes names and values, and when looking up a | + | |
| - | password you provide | + | |
| - | </ | + | |
| ---- | ---- | ||
| Line 25: | Line 19: | ||
| =====Usage===== | =====Usage===== | ||
| - | ====Flags==== | + | * **Flags:** |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | + | ||
| - | ---- | + | |
| * Add an entry:< | * Add an entry:< | ||
| secret-tool store --label=' | secret-tool store --label=' | ||
| - | Password: | ||
| </ | </ | ||
| * Retrieve a password:< | * Retrieve a password:< | ||
| secret-tool lookup {attribute} {value} {attribute2} {value2} [...] | secret-tool lookup {attribute} {value} {attribute2} {value2} [...] | ||
| - | P4s$W0rd | ||
| </ | </ | ||
| * Show entries with similar key/ | * Show entries with similar key/ | ||
| secret-tool search --all {attribute} {value} {attribute2} {value2} [...] | secret-tool search --all {attribute} {value} {attribute2} {value2} [...] | ||
| - | [/ | ||
| - | label = test2 | ||
| - | secret = P4s$W0rd | ||
| - | created = 2020-05-08 17:58:08 | ||
| - | modified = 2020-05-08 21:16:04 | ||
| - | schema = (null) | ||
| - | attribute.Path = /test2 | ||
| - | attribute.Uuid = 04706d96b2404a2f96de02a8a76bf113 | ||
| - | attribute.UserName = chuck | ||
| - | attribute.URL = | ||
| - | attribute.Notes = | ||
| - | attribute.Title = test2 | ||
| - | attribute.Key1 = Value1 | ||
| - | attribute.Key2 = Value2 | ||
| </ | </ | ||
| - | |||
| * Delete an entry:< | * Delete an entry:< | ||
| secret-tool clear {attribute} {value} {attribute2} {value2} [...] | secret-tool clear {attribute} {value} {attribute2} {value2} [...] | ||
| </ | </ | ||
| - | ===Additional search terms=== | + | ---- |
| - | Can create values and search them: | + | ====Searching==== |
| - | < | + | * Generic Formatting Example:<code bash> |
| + | secret-tool search --all {attribute} {value} [...] | ||
| + | </ | ||
| + | * Search '' | ||
| secret-tool search --all Title name | secret-tool search --all Title name | ||
| + | </ | ||
| + | * Search '' | ||
| secret-tool search --all UserName name | secret-tool search --all UserName name | ||
| + | </ | ||
| + | * Search '' | ||
| secret-tool search --all URL https:// | secret-tool search --all URL https:// | ||
| + | </ | ||
| + | * Search '' | ||
| secret-tool search --all Notes value | secret-tool search --all Notes value | ||
| - | secret-tool search --all {attribute} {value} [...] | ||
| </ | </ | ||
| ---- | ---- | ||
| - | ====Tips==== | + | =====Tips===== |
| - | * Set an alias in ~/ | + | * Set an alias in '' |
| - | * Use in docker:< | + | alias get_password1=' |
| - | # "The operator can set any environment variable in the container by using one or more -e flags" | + | </ |
| - | docker run -it --rm \ | + | * Use in docker: |
| - | -e AWS_ACCESS_KEY_ID=$(aws-key-id) \ | + | |
| - | -e AWS_SECRET_ACCESS_KEY=$(aws-key-secret) \ | + | ---- |
| - | local/aws-shell | + | |
| + | ====Use keyring for Ansible==== | ||
| + | | ||
| + | secret-tool store --label=' | ||
| + | </code> | ||
| + | * Create variable in playbook:< | ||
| + | admin_user: " | ||
| + | ansible_become_pass: | ||
| </ | </ | ||
| - | * From here: https://www.marian-dan.ro/blog/storing-secrets-using-secret-tool/ | + | * https://docs.ansible.com/ansible/latest/collections/ |
| ---- | ---- | ||
linux/security/keyring/secret-tool.1636417599.txt.gz · Last modified: by chuck
