DEV Community

Alex Macniven
Alex Macniven

Posted on

1

Shushi - Minimalist Secrets Management in Python

A lot of the work I produce as a 9-5 developer lives in private repositories. Given the unprecedented times we are all currently experiencing I wanted to take the opportunity to port some of my work into open source repositories.


Problem

When I'd create applications in python I'd create a config.json to store credentials and other sensitive assets needed by the application.

This posed 2 problems for me;

  1. Credentials are spread across multiple config.json files
  2. Generally, the config.json files are in plan-text

Solution

As a result I built shushi, minimalist secrets management in Python.

How does shushi address the above?

  1. Credentials are stored in a single vault file
  2. The vault file is encrypted using cryptography

Shushi comes complete with...

A CLI developed using click;

> shushi -p [password] get twitter
name = twitter
user = alexmacniven
password = secret_password
Enter fullscreen mode Exit fullscreen mode

Access to the back-end functionality;

>>> import shushi
>>> shushi.get([password], "twitter")
VaultRecord(name="twitter", user="alexmacniven", password="secret_password")
Enter fullscreen mode Exit fullscreen mode

Unit tests written with pytest in mind;

> pytest
============================= test session starts =============================
platform win32 -- Python 3.8.2, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: ~\Code\shushi
plugins: mock-2.0.0
collected 25 items

tests\test_api.py ..                                                     [  8%]
tests\test_core.py ..............                                        [ 64%]
tests\test_crpyto.py ........                                            [ 96%]
tests\test_record.py .                                                   [100%]

============================= 25 passed in 1.24s ==============================
Enter fullscreen mode Exit fullscreen mode

Contributions are welcomed using Github issues.

Psst this is my first dev.to post 🥳

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay