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

secrets: Resolve Linux library dep. issues; add repo and README #230

Merged
merged 5 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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