Skip to content

Commit

Permalink
Merge pull request #230 from zowe/fix/secrets-sdk-linux
Browse files Browse the repository at this point in the history
secrets: Resolve Linux library dep. issues; add repo and README
  • Loading branch information
t1m0thyj authored Nov 22, 2023
2 parents a41278e + 1c79cb0 commit b62f6ec
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to the Zowe Client Python SDK will be documented in this file.

## Recent Changes

### Bug Fixes

- Fixed Secrets SDK requiring LD_LIBRARY_PATH to be defined when installed from wheel on Linux [#229](https://github.com/zowe/zowe-client-python-sdk/issues/229)

## `1.0.0-dev11`

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion src/secrets/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/secrets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[package]
name = "keyring"
version = "1.0.0-dev11"
readme = "README.md"
repository = "https://github.com/zowe/zowe-client-python-sdk"
version = "1.0.0-dev12"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
22 changes: 22 additions & 0 deletions src/secrets/README.md
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
```
3 changes: 3 additions & 0 deletions src/secrets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ classifiers = [
dynamic = ["version"]

[tool.maturin]
compatibility = "manylinux2014"
features = ["pyo3/extension-module"]
module-name = "zowe.secrets_for_zowe_sdk.keyring"
skip-auditwheel = true
strip = true

0 comments on commit b62f6ec

Please sign in to comment.