zowe / zowe/zowe-client-python-sdk
vault: Values stored securely take precedence over plain-text
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 38
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the vault contents and zowe.config.json shown in the report, then trace how vault values are merged with the current configuration. Done means the current plain-text certFile and certKeyFile values are used instead of the older stored values; no test file or source entry point is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100