{ "info": { "author": "Joachim Jablon", "author_email": "ewjoachim@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "# Bitwarden Keyring\n\n[![Build Status](https://travis-ci.org/ewjoachim/bitwarden-keyring.svg?branch=master)](https://travis-ci.org/ewjoachim/bitwarden-keyring)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI version](https://badge.fury.io/py/bitwarden-keyring.svg)](https://badge.fury.io/py/bitwarden-keyring)\n[![codecov](https://codecov.io/gh/ewjoachim/bitwarden-keyring/branch/master/graph/badge.svg)](https://codecov.io/gh/ewjoachim/bitwarden-keyring)\n\n\nImplementation of the [Keyring](https://pypi.org/project/keyring/) backend code reading secrets from [Bitwarden](https://bitwarden.com) using [Bitwarden-cli](https://help.bitwarden.com/article/cli/)\n\n## Overview\n\nThe [Keyring](https://pypi.org/project/keyring/) python package provides a handy single point of entry for any secret holding system, allowing for seemless integration of those systems into applications needing secrets, like [twine]().\n\nThis projects implement Keyring to be able to read secrets from Bitwarden, an open source multiplatform cloud/self-hostable password manager.\n\nThis backend assumes that it will be used in the context of a CLI application, and that it can communicate with the user using `sdtin`, `stdout` and `stderr`. We could implement an additional backend for use in a library assuming that everything is already unlocked, or another one using `pinentry` to ask the user.\n\n\n## Disclamer\n\nThere's currently a [solved bug](https://github.com/pypa/twine/pull/408) in Twine that's keeping keyring and thus this lib from being used. If you plan to use this for Twine, either wait for a twine release or install from master:\n\n```\npip install git+https://github.com/pypa/twine\n```\n\n## Requirements\n\nThis project uses the official [bitwarden CLI](https://help.bitwarden.com/article/cli/) under the hood, because there's no simple official Python bitwarden lib. Here are the installation instructions as of October 2018 and the link to the [up to date instructions](https://github.com/bitwarden/cli#downloadinstall)\n\nYou can install the Bitwarden CLI multiple different ways:\n\n**NPM**\n\nIf you already have the Node.js runtime installed on your system, you can install the CLI using NPM. NPM makes it easy to keep your installation updated and should be the preferred installation method if you are already using Node.js.\n\n```bash\nnpm install -g @bitwarden/cli\n```\n\n**Native Executable**\n\nNatively packaged versions of the CLI are provided for each platform which have no requirements on installing the Node.js runtime. You can obtain these from the [downloads section](https://help.bitwarden.com/article/cli/#download--install) in the Bitwarden documentation.\n\n**Other Package Managers**\n\n- [Chocolatey](https://chocolatey.org/packages/bitwarden-cli)\n ```powershell\n choco install bitwarden-cli\n ```\n- [Homebrew](https://formulae.brew.sh/formula/bitwarden-cli)\n ```bash\n brew install bitwarden-cli\n ```\n- [Snap](https://snapcraft.io/bw)\n ```bash\n sudo snap install bw\n ```\n\n## Installation and configuration\n\n```\npip install bitwarden-keyring\n```\n\nThe Python packaging ecosystem can be quite a mess.\n\n[](https://xkcd.com/1987/)\n\nBecause of this, it's likely that your setup and my setup are nothing alike. Keyring [supports](https://pypi.org/project/keyring/#config-file-content) a configuration file with an option allowing to explicitely define the path to a backend. You may need that for your installation, or maybe not.\n\n## Usage\n\nUse as a normal keyring backend. It is installed with priority 10 so it's likely going to be selected\nfirst.\n\nIf you want to use it with [twine](https://pypi.org/project/twine/), good news, you're already set. Just make sure that this package is installed in the same location as twine.\n\n`bitwarden-keyring` will automatically ask for credentials when needed. If you don't want to unlock your vault every time, export the vault session to your environment (use `bw unlock` and follow the instructions, or launch `export BW_SESSION=$(bw unlock --raw)`).\n\n## Caveats\n\n`bitwarden-keyring` will try to select an appropriate credential based on the given service name, but as of now, it can't use the normal bitwarden url match mechanism. This is likely to change when bitwarden releases a new version of the CLI thanks to [this issue](https://github.com/bitwarden/cli/issues/32).\n\nIn order to know if one needs to login or just unlock the vault, `bitwarden-keyring` reads the internal datastore of `bitwarden-cli`, so as any private API, it may change without notice.\n\n`bitwarden-keyring` was only tested with:\n- macOS, using the `bitwarden-cli` from `brew`\n- ubuntu, using the `bw` from `snap`\n\nAs mentionned, `bitwarden-keyring` only works in the context of a CLI application with access to standard inputs and output. If you need something that either reads silently or using another method of communication, the best is probably to make another backend and most of the functions ca be reused.\n\n## Licensing\n\n`bitwarden-keyring` is published under the terms of the [MIT License](LICENSE.md).\nThe name Bitwarden is most probably the property of 8bit Solutions LLC.\n\n\n## Contributions and Code of Conduct\n\nContributions are welcome, please refer to the [Contributing](CONTRIBUTING.md) guide.\nPlease keep in mind that all interactions with the project are required to follow the\n[Code of Conduct](CODE_OF_CONDUCT.md).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ewjoachim/bitwarden-keyring", "keywords": "bitwarden keyring password", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "bitwarden-keyring", "package_url": "https://pypi.org/project/bitwarden-keyring/", "platform": "", "project_url": "https://pypi.org/project/bitwarden-keyring/", "project_urls": { "Homepage": "https://github.com/ewjoachim/bitwarden-keyring" }, "release_url": "https://pypi.org/project/bitwarden-keyring/0.2.1/", "requires_dist": [ "keyring", "black; extra == 'dev'", "pytest; extra == 'dev'", "pytest-mock; extra == 'dev'", "pytest-cov; extra == 'dev'" ], "requires_python": "", "summary": "Keyring backend reading password data from Bitwarden", "version": "0.2.1" }, "last_serial": 4407630, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "55866c021d15492a10d229b86c73448e", "sha256": "327d3f6d1ec7edcab944695743d0a7f3c3398306fd864d653a84cf20f0b2f6c2" }, "downloads": -1, "filename": "bitwarden_keyring-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "55866c021d15492a10d229b86c73448e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6368, "upload_time": "2018-10-14T01:28:10", "url": "https://files.pythonhosted.org/packages/a0/10/d56e2f0776fd5dcefebc7a8d4f8d96f30e3cd788cf5faa7f5c04b33d5fb8/bitwarden_keyring-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "581dfd8709ad30a3808329dfb909d406", "sha256": "fad0cf91596a01c59c728c5db959d0ab98450a7796e182b2629baab611c7acf1" }, "downloads": -1, "filename": "bitwarden-keyring-0.1.0.tar.gz", "has_sig": false, "md5_digest": "581dfd8709ad30a3808329dfb909d406", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5002, "upload_time": "2018-10-14T01:28:11", "url": "https://files.pythonhosted.org/packages/56/9a/5e491777e7b0c249431a28c8183e597d4c0ff56d6639dfe38bf96d2ba8f2/bitwarden-keyring-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c651fe4814ff1279e7289768183b34ef", "sha256": "3c7d9796c1c275541cd73e2f5b872cfd639a275a606595d234f1832658bd679e" }, "downloads": -1, "filename": "bitwarden_keyring-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c651fe4814ff1279e7289768183b34ef", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6955, "upload_time": "2018-10-14T13:06:49", "url": "https://files.pythonhosted.org/packages/ee/e5/92fdfa7674969a158f8c015176008dd49d0468daf13750e3699c8befc7cc/bitwarden_keyring-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf5948ec00f6bd2e81c0fcba0d77209b", "sha256": "57e2f24441d9cc26a7db2d6f809d9f4626b5dacde58a00e4e312a99399ae94d2" }, "downloads": -1, "filename": "bitwarden-keyring-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bf5948ec00f6bd2e81c0fcba0d77209b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5619, "upload_time": "2018-10-14T13:06:51", "url": "https://files.pythonhosted.org/packages/47/7a/15b0d8e664990fe1d2510692808694e61d901442d11826725d35b252cd4d/bitwarden-keyring-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c2be8940b25de02acc1498fe32680735", "sha256": "9f6ef8fd0783cf4fb95ad02778b53bbae2feae7d2ab889d9bab6cd0c1c8eb31f" }, "downloads": -1, "filename": "bitwarden_keyring-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c2be8940b25de02acc1498fe32680735", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7101, "upload_time": "2018-10-14T13:10:40", "url": "https://files.pythonhosted.org/packages/7a/8d/b74f092f46a14deeeb4dcb49b548f3738d1ea1e510c8aa0353d0ee8662ac/bitwarden_keyring-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f15c2b44f69b2db5fed01c82d3d040d", "sha256": "d8364a6bf16529bf7333213eaa6d145946b5e3d3b23ba5702b38c92ab88af2cb" }, "downloads": -1, "filename": "bitwarden-keyring-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5f15c2b44f69b2db5fed01c82d3d040d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5786, "upload_time": "2018-10-14T13:10:43", "url": "https://files.pythonhosted.org/packages/0f/a1/a0670a802f306d4906e2b4cea477f74f0bddc4e69d74f7427d7c0b742277/bitwarden-keyring-0.1.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "d460698a637b0e518855605a22b6f287", "sha256": "002ce48da21fc0305348e553f3a50c48bb078c812b6be38190b303a1aaf59e4b" }, "downloads": -1, "filename": "bitwarden_keyring-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d460698a637b0e518855605a22b6f287", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7422, "upload_time": "2018-10-23T18:49:19", "url": "https://files.pythonhosted.org/packages/4c/e4/2e4128f58f2a7a25847b42994a2df7e9658d57aa5466f1974a9ef0c58fea/bitwarden_keyring-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88d93b5f4fedd64a7d27d53388f3ca3c", "sha256": "f85d2f950989cb2f0ce41b04c84d14c38aaac6331a153bb6b55da39212a8e7b5" }, "downloads": -1, "filename": "bitwarden-keyring-0.2.1.tar.gz", "has_sig": false, "md5_digest": "88d93b5f4fedd64a7d27d53388f3ca3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6132, "upload_time": "2018-10-23T18:49:20", "url": "https://files.pythonhosted.org/packages/18/8d/c223f43df1b25f8588a242b7f3ecd90ad632b35bcf1554a9b74b0153d7f5/bitwarden-keyring-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d460698a637b0e518855605a22b6f287", "sha256": "002ce48da21fc0305348e553f3a50c48bb078c812b6be38190b303a1aaf59e4b" }, "downloads": -1, "filename": "bitwarden_keyring-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d460698a637b0e518855605a22b6f287", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7422, "upload_time": "2018-10-23T18:49:19", "url": "https://files.pythonhosted.org/packages/4c/e4/2e4128f58f2a7a25847b42994a2df7e9658d57aa5466f1974a9ef0c58fea/bitwarden_keyring-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88d93b5f4fedd64a7d27d53388f3ca3c", "sha256": "f85d2f950989cb2f0ce41b04c84d14c38aaac6331a153bb6b55da39212a8e7b5" }, "downloads": -1, "filename": "bitwarden-keyring-0.2.1.tar.gz", "has_sig": false, "md5_digest": "88d93b5f4fedd64a7d27d53388f3ca3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6132, "upload_time": "2018-10-23T18:49:20", "url": "https://files.pythonhosted.org/packages/18/8d/c223f43df1b25f8588a242b7f3ecd90ad632b35bcf1554a9b74b0153d7f5/bitwarden-keyring-0.2.1.tar.gz" } ] }