Code Monkey home page Code Monkey logo

passrs's Introduction

NOTICE

This repo is now archived due to me no longer using pass. GPG is a pain to deal with, so I shall deal with it no longer. Feel free to fork and continue working on it, if you so choose.

passrs

passrs is a reimplementation of pass in Rust.

Inspiration

While gopass inspired passrs, it does not accomplish the same goals, nor does it try to. For example, you will not find the ability to specify recipients on a per-secret basis (this is only done on a store or substore basis, utilizing the keys stored in the .gpg-id file), it does not expose an API for use in browser extensions, and it does not support any cryptography protocol aside from OpenPGP.

Security

I should probably add a big, red, flashy warning about this: I do not yet have any knowledge in the way of developing programs with security in mind, and therefore cannot guarantee the security of this implementation. I take no responsibility for any damage caused to the integrity of your password store and related files. That said, however, I will do my best to resolve any problems that may arise in order to improve this project.

In another vein: there is only one instance of unsafe code, and that is in util::set_permissions_recursive -- a call to libc::getuid() to facilitate checking if the user owns the path about be to operated on.

Dependencies

Before you get started with installing and running the passrs binary, you will need the gpgme, gpg-error, and libgit2 libraries (and, obviously, a Rust toolchain).

Installation

With that out of the way, let's get to the fun stuff. At the moment, passrs only supports Linux systems; however, more targets might come down the line, as I become more competent in Rust.

To install the passrs binary, run:

$ cargo install --git https://github.com/cole-h/passrs

Differences to unix pass

  • passrs find does not display a tree of the found entries, unlike pass find
  • lack of support for deinitializing store
  • lack of support for the following env vars:
    • PASSWORD_STORE_ENABLE_EXTENSIONS
    • PASSWORD_STORE_EXTENSIONS_DIR
    • PASSWORD_STORE_GPG_OPTS
    • GREPOPTIONS

Nix-specific

Cache

Thanks to the wonderful people over at Cachix, a cache serving pre-built passrs binaries is usable by adding --extra-substituters 'https://passrs.cachix.org' --trusted-public-keys 'passrs.cachix.org-1:qEBRtLoyRFMZC8obhs0JjUW95PVaPYAUvixVPt6Qsa0=' to your Nix command (whether it be nix build or nix-build). This means you don't actually have to build passrs yourself -- the GitHub Actions runner already did it for you (with the caveat that it only runs on x86_64)!

Licensing

  • This software is licensed under the MIT License
  • Portions of this software are derived from tui-rs examples, under the MIT license
  • Portions of this software are derived from the treeline library, under the MIT license
  • Portions of this software are derived from the copy_dir library, under the MIT license
  • Portions of this software are derived from the grep-cli library, under the MIT license
  • Portions of this software are derived from the terminal_qrcode library, under the MIT license

passrs's People

Contributors

cole-h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

colemickens

passrs's Issues

Tests fail in a Nix derivation

I'm adding this to my nixpkgs to dogfood.

Is there a scenario supported by run-tests.sh, and requiring an environment variable, versus just looking for the password-store in that location by default?

Also, am I understanding that it's then going to run against my actual password-store by default when running cargo test? That makes me very uncomfortable.

relax case sensitivity?

Hi. I haven't dug in much, but gopass show capital would show:

 colemickens/Capital Federal
 colemickens/capitalone.com
 notes/Credit Cards/Capital One CC
 websites/personalcapital.com/[email protected]

but passrs show capital shows only:

 > colemickens/capitalone.com
   websites/personalcapital.com/[email protected]

At first I thought it was notes (was surprised), but now as I'm typing this up, I realize it's probably just a case sensitivity thing.

This isn't configureable is it? Probably an easy first patch?

Freedesktop Secrets API provider (libsecret dbus provider)

I think it would be nice to be able to run passrs libsecret in a systemd user unit and have it provide the Freedesktop Secrets API for various applications to use for secret storage/retrieval.

This would give me a nice way of using Fractal, for example, which only uses libsecret to store credentials, without needing to use Gnome-keyring.

The only thing in this area I've found is a python bridge, but that's a bit of a non-starter for me for multiple reasons: https://github.com/mdellweg/pass_secret_service

WIP: I have a branch where I did less than the bare minimum. It autogens some dbus code, but I didn't actually wire anything up: https://github.com/colemickens/passrs/commits/libsecret

Thoughts? It's already implemented as an optional feature (albeit on by default at the moment).

Display find results in a tree like password-store does

Last time I looked into this, I had a hard time implementing it on top of my current tree stuff used for passrs ls. Right now, I'm mostly satisfied with how passrs find looks and behaves (barring any bugs I've overlooked), but it would be nice if it were possible to draw a tree just like pass does when using pass find.

$ pass find beale
Search Terms: beale
└── Uncategorized
    └── Beale Diceware Wordlist
        └── attachments
            └── beale.wordlist.asc

vs

$ passrs find beale
Uncategorized/Beale Diceware Wordlist/attachments/beale.wordlist.asc

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.