Skip to content

vault: Values stored securely take precedence over plain-text #311

@zFernand0

Description

@zFernand0

Describe the bug

Assuming the following vault contents and the config file below...


Vault contents
{
  "/path/to/$pwd/zowe.config.json": {
    "profiles.base.properties.certFile": "old_cert.pem",
    "profiles.base.properties.certKeyFile": "old_key.pem"
  }
}

Note: The contents above are base64 enconded in the vault

Actual contents
eyIvcGF0aC90by8kcHdkL3pvd2UuY29uZmlnLmpzb24iOnsicHJvZmlsZXMuYmFzZS5wcm9wZXJ0aWVzLmNlcnRGaWxlIjoib2xkX2NlcnQucGVtIiwicHJvZmlsZXMuYmFzZS5wcm9wZXJ0aWVzLmNlcnRLZXlGaWxlIjoib2xkX2tleS5wZW0ifX0=

Config file
{
    "$schema": "./zowe.schema.json",
    "profiles": {
        "zosmf": { "type": "zosmf", "properties": { "port": 443, "rejectUnauthorized": false }, "secure": [] },
        "base": {
            "type": "base",
            "properties": { "host": "my_lpar.net", "certFile": "crt.pem", "certKeyFile": "key.pem"},
            "secure": []
        }
    },
    "defaults": {
        "zosmf": "zosmf",
        "base": "base"
    },
    "autoStore": true
}

Expected and actual results

I would expect the python SDK to use the contents of the zowe.config.json as it is at the time of executing the script.

Instead, it is using the old_cert and old_key (from the vault)

Describe your environment

Py: 3.12.4
Pip: 24.0
Terminal: Zsh
Env: N/A

Additional context

Found this while testing #305

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Medium Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions