-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #230 from zowe/fix/secrets-sdk-linux
secrets: Resolve Linux library dep. issues; add repo and README
- Loading branch information
Showing
5 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Secrets Package | ||
================== | ||
|
||
Contains APIs to store, retrieve, and delete credentials in the end user's operating system (OS) keyring. | ||
|
||
This Python package requires the OS keyring to be unlocked before credentials can stored or retrieved. Please follow the [installation guidelines for Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-installcli#installation-guidelines) to ensure that the Secure Credential Store is accessible. | ||
|
||
If you are using a headless Linux environment, please consult the following article on Zowe Docs: [Configuring Secure Credential Store on headless Linux operating systems](https://docs.zowe.org/stable/user-guide/cli-configure-scs-on-headless-linux-os). | ||
|
||
Example | ||
------------ | ||
```py | ||
from zowe.secrets_for_zowe_sdk import keyring | ||
# Store a short password using the keyring module: | ||
password = "Zowe ❕" | ||
keyring.set_password("Test", "ShortPassword", password) | ||
# Retrieving a password under a given service and account: | ||
assert keyring.get_password("Test", "ShortPassword") == password | ||
# Deleting a password: | ||
assert keyring.delete_password("Test", "ShortPassword") | ||
assert keyring.get_password("Test", "ShortPassword") is None | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters