Skip to content
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

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

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

AR-mones
Copy link

@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
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