Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-22309

fix: cast secret data to string in order to allow JSON valued strings

    • rhel-system-roles-1.23.0-2.9.el9
    • sst_system_roles
    • 24
    • 26
    • 3
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • Bug Fix
    • Hide
      .Ansible now preserves JSON strings for use in secrets

      Previously, Ansible converted JSON strings to the corresponding
      JSON object if the value was used in a loop and strings similar to `data: "{{ value }}"`
      As a consequence, you cannot pass JSON strings as secrets and have the
      value preserved.
      This update casts the data value to a string when passing to the `podman_secret`
      module. As a result, JSON strings are preserved as-is for use in secrets.
      Show
      .Ansible now preserves JSON strings for use in secrets Previously, Ansible converted JSON strings to the corresponding JSON object if the value was used in a loop and strings similar to `data: "{{ value }}"` As a consequence, you cannot pass JSON strings as secrets and have the value preserved. This update casts the data value to a string when passing to the `podman_secret` module. As a result, JSON strings are preserved as-is for use in secrets.
    • Done
    • None

      Cause: Ansible is somehow converting JSON strings to the corresponding
      JSON object if the value is used in a loop and the value is used
      like `data: "{{ value }}"`

      Consequence: You cannot pass JSON strings as secrets and have the
      value preserved.

      Fix: Cast the data value to a string when passing to the podman_secret
      module.

      Result: JSON strings are preserved as-is for use in secrets.

      Github issue: https://github.com/linux-system-roles/podman/issues/121

      Signed-off-by: Rich Megginson <rmeggins@redhat.com>

            rmeggins@redhat.com Richard Megginson
            rmeggins@redhat.com Richard Megginson
            Richard Megginson Richard Megginson
            Jakub Haruda Jakub Haruda
            Gabriela Necasova Gabriela Necasova
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: