Git Product home page Git Product logo

easy-vault's People

Contributors

andy-maier avatar

Stargazers

 avatar

Watchers

 avatar  avatar

easy-vault's Issues

Use random salt for key generation

This improves security, but requires a redesign. We now need to store the key in the keyring, and the key generation cannot be invoked multiple times as it is done now, but needs to be under control of the user.

easy-vault command for removing keyring entry

The encrypt and decrypt commands automatically keep the password stored for a vault file in the keyring service up to date, and can also override it if needed.

What is not supported yet, is to remove the keyring item for a vault file, utilizing the KeyRingLib function provided in issue #35 .

A functionality to update the password in the keyring item separately is not needed, because that is done automatically when encrypting or decrypting the fault file.

0.7.0: pytest is failing

I'm trying to package your module as an rpm package. So I'm using the typical build, install and test cycle used on building packages from non-root account.

  • "setup.py build"
  • "setup.py install --root </install/prefix>"
  • "pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Looks like pytest is failing on collecting units

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-easy-vault-0.7.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-easy-vault-0.7.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=3901611956
rootdir: /home/tkloczko/rpmbuild/BUILD/easy-vault-0.7.0
plugins: shutil-1.7.0, virtualenv-1.7.0, mock-3.6.1, cov-2.12.1, anyio-3.3.4, forked-1.3.0, xdist-2.3.0, flaky-3.7.0, tornasync-0.6.0.post2, console-scripts-1.2.0, trio-0.7.0, timeout-2.0.1, asyncio-0.16.0, freezegun-0.4.2, flake8-1.0.7, pyfakefs-4.5.3, hypothesis-6.29.3, benchmark-3.4.1, profiling-1.7.0, datadir-1.3.1, regressions-2.2.0, randomly-3.8.0, rerunfailures-9.1.1, yagot-0.5.0, requests-mock-1.9.3, django-4.5.1
collected 79 items / 2 errors / 77 selected

================================================================================== ERRORS ==================================================================================
_____________________________________________________________ ERROR collecting tests/unittest/test_keyring.py ______________________________________________________________
tests/unittest/test_keyring.py:34: in <module>
    not is_keyring_available(), reason="No keyring service available")
tests/utils/keyring_utils.py:43: in is_keyring_available
    return kr.is_available()
easy_vault/_keyring.py:203: in is_available
    self.check_available()
easy_vault/_keyring.py:256: in check_available
    raise new_exc  # KeyringError
E   easy_vault._keyring.KeyringError: Failed to create the collection: Prompt dismissed..
_____________________________________________________________ ERROR collecting tests/unittest/test_password.py _____________________________________________________________
tests/unittest/test_password.py:28: in <module>
    not is_keyring_available(), reason="No keyring service available")
tests/utils/keyring_utils.py:43: in is_keyring_available
    return kr.is_available()
easy_vault/_keyring.py:203: in is_available
    self.check_available()
easy_vault/_keyring.py:256: in check_available
    raise new_exc  # KeyringError
E   easy_vault._keyring.KeyringError: Failed to create the collection: Prompt dismissed..
========================================================================= short test summary info ==========================================================================
ERROR tests/unittest/test_keyring.py - easy_vault._keyring.KeyringError: Failed to create the collection: Prompt dismissed..
ERROR tests/unittest/test_password.py - easy_vault._keyring.KeyringError: Failed to create the collection: Prompt dismissed..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 2 errors in 0.79s =============================================================================

More control on password handling

The EasyVault class currently requires that a password is specified. However, it is perfectly valid to operate on unencrypted vault files without having a password.

The get_password() function currently always prompts for a password if the keyring service did not find the password. For use in headless systems, there should be a way to disable the prompting. (Note: The use of the keyring service can already be disabled.)

KeyRingLib function for checking availability

There should be a KeyRingLib function that checks for availability of the keyring service, much like the respective function in the keyring test utils already does. That test utils function could then go away.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.