-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add passage backend #61
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
Conversation
Support based on pass backend; Fix merge conflict from original PR
|
Thanks @jenic ! Would oyu have time to add some test coverage as well? |
|
I totally forgot about this but I actually mostly had the test cases done a few days after the initial PR back in 2023 but they never responded to me so I just forgot about it. I've added them to the PR, they pass on my machine at least. |
|
hm, probably need to pull in the executable for testing: https://github.com/ByteNess/keyring/blob/main/.github/workflows/test.yml#L27 and add age should solve it 🤔 |
|
We could pull in the go code for age and do it natively instead but i was keeping to the style of the existing pass code. Up to you which you prefer. |
|
Yeah, how about we keep it like this and maybe explore that idea in a separate PR? I wonder how much code/deps will that pull in 🤔 |
|
Not much deps other than age itself and its indirect crypto stuff but yeah, a non-trivial amount of code would be added. Before I push it to the PR, are you fine with something like this: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index dce21ff..87c0457 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -24,7 +24,12 @@ jobs:
#go-version-file: 'go.mod'
check-latest: true
- run: sudo apt-get update
- - run: sudo apt-get install pass gnome-keyring dbus-x11
+ - run: sudo apt-get install pass gnome-keyring dbus-x11 age
+ - run: |
+ git clone https://github.com/FiloSottile/passage /tmp/passage
+ cd /tmp/passage
+ sudo make install
+
- run: go test -race ./...
mac:
runs-on: macos-latest |
|
Preferably I'd go with native package, but if not available then sure. |
|
There is no passage package in Ubuntu as far as I'm aware, unless a snap package counts, but I don't actually use it so that's just based on some searching. |
|
I should have tested the CI changes in a separate branch first, that's my bad. Everything should be good now though. |
|
Thanks, looks good and tests are passing 🎉 Would you mind also updating README to reflect new backend please? https://github.com/ByteNess/keyring?tab=readme-ov-file#keyring |
|
Ah right, forgot about that. While reviewing the readme to ensure I didn't need to add mention of passage anywhere else I noticed a small typo on line 80. Would you be OK if we fixed that within this same PR? diff --git a/README.md b/README.md
index b8445ac..51e43a8 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ Currently Keyring supports the following backends
* Secret Service ([Gnome Keyring](https://wiki.gnome.org/Projects/GnomeKeyring), [KWallet](https://kde.org/applications/system/org.kde.kwalletmanager5))
* [KWallet](https://kde.org/applications/system/org.kde.kwalletmanager5)
* [Pass](https://www.passwordstore.org/)
+ * [Passage](https://github.com/FiloSottile/passage)
* [Encrypted file (JWT)](https://datatracker.ietf.org/doc/html/rfc7519)
* [KeyCtl](https://linux.die.net/man/1/keyctl)
* [1Password Connect](https://developer.1password.com/docs/connect/)
@@ -77,6 +78,6 @@ To make a contribution:
* Make your changes on the fork
* Submit a pull request back to this repo with a clear description of the problem you're solving
* Ensure your PR passes all current (and new) tests
- * Ideally verify that [aws-vault](https://github.com/bteness/aws-vault) works with your changes (optional)
+ * Ideally verify that [aws-vault](https://github.com/byteness/aws-vault) works with your changes (optional)
...and we'll do our best to get your work merged in! |
|
Well spotted! Either way, I'm happy to do that so wee keep this change contained :) |
|
Released with: https://github.com/ByteNess/aws-vault/releases/tag/v7.9.0 |
Support based on pass backend; Cherry-picked from original PR with slight merge conflict edits. See discussion in PR #60