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

Port the Zowe Secrets SDK to Python #208

Closed
t1m0thyj opened this issue Aug 29, 2023 · 1 comment · Fixed by #222
Closed

Port the Zowe Secrets SDK to Python #208

t1m0thyj opened this issue Aug 29, 2023 · 1 comment · Fixed by #222

Comments

@t1m0thyj
Copy link
Member

Historically the node-keytar package has been used by Zowe CLI and Explorer to store secure credentials.
After that package was deprecated at end of 2022, Zowe CLI squad created the Secrets SDK as a replacement.

Currently we use the Python keyring package which has a number of quirks.
On Windows, it doesn't always use the same encoding as node-keytar:

if is_win32:
try:
encoded_credential = encoded_credential.encode('utf-16le').decode()
except (UnicodeDecodeError, AttributeError):
# The credential is not encoded in UTF-16
pass

On Linux, it requires a custom backend to read from the correct keyring. Currently our custom backend only implements get_password, so on some Linux systems set_password and delete_password may fail.
class KeyringBackend(SecretService.Keyring):

In the future, maybe we can investigate publishing the Rust keyring backend used by the Secrets SDK as a crate:
https://github.com/zowe/zowe-cli/tree/master/packages/secrets/src/keyring
Then we could create Python bindings for the Rust keyring, and publish a Secrets SDK for Python like the one for Node.js 😋

@github-actions
Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant