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

[BUG] Vault SDB driver overwrites whole secret #64096

Closed
5 tasks done
lkubb opened this issue Apr 17, 2023 · 2 comments · Fixed by #62684
Closed
5 tasks done

[BUG] Vault SDB driver overwrites whole secret #64096

lkubb opened this issue Apr 17, 2023 · 2 comments · Fixed by #62684
Assignees
Labels
Bug broken, incorrect, or confusing behavior Vault

Comments

@lkubb
Copy link
Contributor

lkubb commented Apr 17, 2023

Description
When calling sdb.set (or sdb.get_or_set_hash when writing) with the Vault SDB driver, there is no way to only update a single secret key.

Setup

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • classic packaging
  • onedir packaging
  • used bootstrap to install
  • Existing Vault setup
  • Existing Vault secret at some path, e.g. salt/minions/myminion
{
    "existing": "whatever",
    "important": "data"
}
  • Vault SDB config
sdbvault:
  driver: vault

Steps to Reproduce the behavior

  • salt-call sdb.set sdb://sdbvault/salt/minions/myminion/new "val"
  • salt-call vault.read_secret salt/minions/myminion

Expected behavior

existing: whatever
important: data
new: val

Screenshots

new: val

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3005.1

Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.9
     gitpython: 3.1.29
        Jinja2: 3.1.0
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
        Python: 3.9.16 (main, Nov  1 2022, 00:00:00)
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
         smmap: 5.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: rocky 9.1 Blue Onyx
        locale: utf-8
       machine: x86_64
       release: 5.14.0-162.12.1.el9_1.0.1.x86_64
        system: Linux
       version: Rocky Linux 9.1 Blue Onyx
@lkubb lkubb added Bug broken, incorrect, or confusing behavior needs-triage labels Apr 17, 2023
@anilsil anilsil added this to the Sulfur v3006.1 milestone Apr 17, 2023
@dmurphy18 dmurphy18 assigned dmurphy18 and unassigned Ch3LL Apr 28, 2023
@dmurphy18
Copy link
Contributor

Moving this to 3007 release given there is a fix already for it in #62684

@dmurphy18
Copy link
Contributor

Note the fix in #62684, being moved to a salt extension, but it should be available when 3007 is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Vault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants