Skip to content

Add store_encrypted feature and unit tests to Ansible lookup password…#1

Draft
AR-mones wants to merge 1 commit intodevelfrom
feature/ansible-vault-encrypted-password-storage
Draft

Add store_encrypted feature and unit tests to Ansible lookup password…#1
AR-mones wants to merge 1 commit intodevelfrom
feature/ansible-vault-encrypted-password-storage

Conversation

@AR-mones
Copy link
Copy Markdown

@AR-mones AR-mones commented Dec 19, 2023

Lookup PLUGIN

SUMMARY

This update introduces the 'store_encrypted' feature in the Ansible Lookup Password Plugin, enabling optional encrypted storage of generated passwords. This enhancement is designed to increase security and flexibility in password management within Ansible environments.

ISSUE TYPE
  • Feature Pull Request
  • Test Pull Request
ADDITIONAL INFORMATION

The store_encrypted option, when set to True, allows the plugin to store passwords in an encrypted format, enhancing security for sensitive data. When set to False, passwords are stored in plain text. This feature is essential for scenarios requiring stringent security measures.

Comprehensive unit tests have been added to validate this new functionality. These tests ensure that the plugin behaves as expected for both True and False settings of store_encrypted, thereby maintaining reliability and stability.

This feature is particularly beneficial in environments where secure handling and storage of passwords are paramount, providing users with greater control over their security protocols.

# Example of using the store_encrypted feature in a playbook
- name: Generate and store encrypted password
  ansible.builtin.set_fact:
    secure_password: "{{ lookup('ansible.builtin.password', '/path/to/passwordfile store_encrypted=True') }}"

Copy link
Copy Markdown
Member

@gdelafond gdelafond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: i don't know if the unit test is done right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants