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

Replace unwelcoming words #82413

Merged
merged 1 commit into from Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/ansible/parsing/vault/__init__.py
Expand Up @@ -61,8 +61,8 @@


b_HEADER = b'$ANSIBLE_VAULT'
CIPHER_WHITELIST = frozenset((u'AES256',))
CIPHER_WRITE_WHITELIST = frozenset((u'AES256',))
CIPHER_ALLOWLIST = frozenset((u'AES256',))
CIPHER_WRITE_ALLOWLIST = frozenset((u'AES256',))
# See also CIPHER_MAPPING at the bottom of the file which maps cipher strings
# (used in VaultFile header) to a cipher class

Expand Down Expand Up @@ -606,7 +606,7 @@ def encrypt(self, plaintext, secret=None, vault_id=None, salt=None):
if is_encrypted(b_plaintext):
raise AnsibleError("input is already encrypted")

if not self.cipher_name or self.cipher_name not in CIPHER_WRITE_WHITELIST:
if not self.cipher_name or self.cipher_name not in CIPHER_WRITE_ALLOWLIST:
self.cipher_name = u"AES256"

try:
Expand Down Expand Up @@ -671,7 +671,7 @@ def decrypt_and_get_vault_id(self, vaulttext, filename=None, obj=None):

# create the cipher object, note that the cipher used for decrypt can
# be different than the cipher used for encrypt
if cipher_name in CIPHER_WHITELIST:
if cipher_name in CIPHER_ALLOWLIST:
this_cipher = CIPHER_MAPPING[cipher_name]()
else:
raise AnsibleError("{0} cipher could not be found".format(cipher_name))
Expand Down Expand Up @@ -958,7 +958,7 @@ def edit_file(self, filename):
# (vault_id=default, while a different vault-id decrypted)

# we want to get rid of files encrypted with the AES cipher
force_save = (cipher_name not in CIPHER_WRITE_WHITELIST)
force_save = (cipher_name not in CIPHER_WRITE_ALLOWLIST)

# Keep the same vault-id (and version) as in the header
self._edit_file_helper(filename, vault_secret_used, existing_data=plaintext, force_save=force_save, vault_id=vault_id)
Expand Down
Expand Up @@ -22,7 +22,7 @@
version_added: "2.10"
short_description: load host and group vars
description:
- 3rd party vars plugin to test loading host and group vars without requiring whitelisting and without a plugin-specific stage option
- Third-party vars plugin to test loading host and group vars without enabling and without a plugin-specific stage option
options:
'''

Expand Down
Expand Up @@ -22,7 +22,7 @@
version_added: "2.10"
short_description: load host and group vars
description:
- 3rd party vars plugin to test loading host and group vars without requiring whitelisting and with a plugin-specific stage option
- Third party vars plugin to test loading host and group vars without enabling and with a plugin-specific stage option
options:
stage:
choices: ['all', 'inventory', 'task']
Expand Down
Expand Up @@ -15,7 +15,7 @@
- File MUST have a valid extension, defined in configuration.
notes:
- If you want to set vars for the C(all) group inside the inventory file, the C(all) group must be the first entry in the file.
- Whitelisted in configuration by default.
- Enabled in configuration by default.
options:
yaml_extensions:
description: list of 'valid' extensions for files containing YAML
Expand Down