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

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

Open
zFernand0 opened this issue Jul 12, 2024 · 1 comment
Open

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

zFernand0 opened this issue Jul 12, 2024 · 1 comment
Labels

Comments

@zFernand0
Copy link
Member

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

@zFernand0 zFernand0 added the bug Something isn't working label Jul 12, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Jul 12, 2024
Copy link

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@zowe-robot zowe-robot moved this from New Issues to Medium Priority in Zowe CLI Squad Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Medium Priority
Development

No branches or pull requests

2 participants