Release KSM Ansible v1.5.0 - #982
Draft
stas-schaller wants to merge 6 commits into
Draft
stas-schaller wants to merge 6 commits into
stas-schaller wants to merge 6 commits into
Conversation
stas-schaller
force-pushed
the
release/integration/ansible/v1.5.0
branch
from
April 9, 2026 19:38
3764ddf to
a44f0da
Compare
- feat: add folder_uid parameter to keeper_create for subfolder record targeting (KSM-845) - fix: replace pickle with JSON cache serialization to eliminate unsafe deserialization path (KSM-1103) - ci: add paths filter to test.ansible.yml including sdk/python/core dependency
stas-schaller
force-pushed
the
release/integration/ansible/v1.5.0
branch
from
July 16, 2026 18:24
78e254e to
06df0d6
Compare
stas-schaller
marked this pull request as ready for review
July 16, 2026 18:27
* VM-1452: replace pickle cache serialization with JSON Remove insecure pickle.loads from the Ansible record cache path (CWE-502) and round-trip Record state via Fernet-encrypted JSON. * VM-1452: invalidate legacy cache and fall back to vault Ignore unusable pickle/invalid record caches without deserializing them, warn, and fetch from the vault so plays continue until keeper_cache_records rebuilds JSON. * VM-1452: avoid AnsibleError str() in cache fallback test Newer ansible-core can recurse in AnsibleError.__str__; assert on exception args instead so CI stays green. * docs(ansible): correct changelog version 1.4.1 -> 1.5.0
- Add KSM-845 changelog entry to both READMEs' 1.5.0 section, which only documented the VM-1452 cache fix - Add playbook-level test for keeper_create_subfolder.yml, exercising the actual YAML via AnsibleTestFramework rather than only the Python create_record() unit test, matching every other example playbook's coverage in this suite
helper FieldType.__init__ crashes with IndexError when a dict-typed
field (address, name, host, passkey, etc.) has value: [] -- the
server's normal representation of an unpopulated complex field.
keeper_create passed field values from playbook args directly to
Field(), so any playbook with an explicitly empty complex field
crashed with AnsibleError("Could not create record: list index out
of range"), giving no signal about which field caused the failure.
Fix: convert value: [] to None with "or None" before passing to
Field(). FieldType.__init__ treats None as "no value" and skips the
dict-field index that crashes on empty lists, so the field is created
as unpopulated rather than crashing. Applies to both standard fields
and custom_fields.
Root cause in the helper is tracked as KSM-1119. Cleanup comments
added at both Field() sites to flag the workaround for removal once
the helper ships the "if self.value:" guard in FieldType.__init__.
…creation (KSM-1445) Adds keeper_create_folder action/module plugin: creates a folder directly in a shared folder, or nested inside an existing subfolder of that shared folder. Idempotent - if a folder with the given name already exists directly under the target parent, its UID is returned instead of creating a duplicate. Ported from PR #1171 (external contribution). Resolved one conflict against KSM-845: the PR independently added a subfolder_uid parameter to create_record() that duplicated KSM-845's already-shipped folder_uid under a different, unused name; dropped in favor of the shipped name. version_added corrected from the PR's "1.4.1" to "1.5.0" to match the release this actually ships in.
mgallego-keeper
marked this pull request as draft
September 17, 2026 17:21
…lder_uid (KSM-1454) (#1182) KSM-845 added the ability to create a keeper_create record inside a subfolder and named the parameter folder_uid. KSM-1445 then added the sibling module keeper_create_folder, which names the same concept subfolder_uid, and the Python SDK's CreateOptions has always used subfolder_uid for the same thing. This aligns keeper_create with both. Collection version 1.5.0 is unpublished (PyPI and Ansible Galaxy both top out at 1.4.0, and release PR 982 into master is still open), so folder_uid is not a public interface yet and this rename breaks no released user. Also fixes two defects found while making this change: - create_record() now normalizes an empty subfolder_uid to None. The SDK sets payload.subFolderUid unconditionally and serializes the whole payload, so a playbook passing subfolder_uid: "" would otherwise send an empty value to the server. - keeper_create now raises an explicit error if a playbook still sets the old folder_uid key. No plugin in this integration declares an argument_spec, so Ansible would otherwise silently drop the unknown key and create the record at the shared folder root instead of the intended subfolder. Adds version_added: "1.5.0" to the option, matching the point release it actually ships in; the option previously had none. This surfaced while porting external contribution PR #1170 (Geoffroy RABOUIN), which adds this same subfolder capability under the name subfolder_uid. The capability already existed under a different name, so there was nothing new to port; this commit adopts the contributor's parameter name instead. Co-authored-by: RABOUIN Geoffroy <grabouin@sigma.fr>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release branch for Keeper Secrets Manager Ansible v1.5.0, adding subfolder record creation, idempotent folder creation, replacing the unsafe cache serialization format, and fixing a crash in keeper_create on empty complex fields.
Changes
New Features
keeper_createnow accepts an optionalfolder_uidparameter to place new records in a subfolder within a shared folder, rather than always creating at the shared folder root.keeper_create_foldermodule to create a folder directly in a shared folder or nested inside an existing subfolder. Returns the existing folder's UID instead of creating a duplicate when a folder with the given name already exists under the target parent.Bug Fixes
picklewith JSON for the record cache encrypt/decrypt path.pickle.loads()on attacker-influenced data (e.g. via AWX extra vars) is a known RCE vector; JSON is safe regardless of input source.keeper_createcrashed with "Could not create record: list index out of range" when a playbook supplied a dict-typed complex field (address, name, host, etc.) withvalue: []. Playbook values are now converted from[]to unpopulated before being passed to the helper, so the record is created with the field empty rather than crashing. Root cause in the helper library is tracked as KSM-1119.Maintenance
keeper-secrets-manager-core>=17.3.0,keeper-secrets-manager-helper>=1.1.2test.ansible.ymlCI workflow includingsdk/python/coredependencyBreaking Changes
None.
Related Issues
keeper_create_foldermodule)