Skip to content

Conversation

@jenic
Copy link

@jenic jenic commented Jan 19, 2026

Support based on pass backend; Cherry-picked from original PR with slight merge conflict edits. See discussion in PR #60

Support based on pass backend; Fix merge conflict from original PR
@mbevc1 mbevc1 added the enhancement New feature or request label Jan 19, 2026
@mbevc1
Copy link

mbevc1 commented Jan 19, 2026

Thanks @jenic ! Would oyu have time to add some test coverage as well?

@jenic
Copy link
Author

jenic commented Jan 19, 2026

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.

@mbevc1
Copy link

mbevc1 commented Jan 19, 2026

hm, probably need to pull in the executable for testing: exec: "age-keygen": executable file not found in $PATH

https://github.com/ByteNess/keyring/blob/main/.github/workflows/test.yml#L27 and add age should solve it 🤔

@jenic
Copy link
Author

jenic commented Jan 19, 2026

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.

@mbevc1
Copy link

mbevc1 commented Jan 19, 2026

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 🤔

@jenic
Copy link
Author

jenic commented Jan 19, 2026

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

@mbevc1
Copy link

mbevc1 commented Jan 19, 2026

Preferably I'd go with native package, but if not available then sure.

@jenic
Copy link
Author

jenic commented Jan 20, 2026

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.

@jenic
Copy link
Author

jenic commented Jan 20, 2026

I should have tested the CI changes in a separate branch first, that's my bad. Everything should be good now though.

@mbevc1
Copy link

mbevc1 commented Jan 20, 2026

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

@jenic
Copy link
Author

jenic commented Jan 20, 2026

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!

@mbevc1
Copy link

mbevc1 commented Jan 20, 2026

Well spotted! Either way, I'm happy to do that so wee keep this change contained :)

@mbevc1 mbevc1 merged commit 77f583c into ByteNess:main Jan 20, 2026
4 checks passed
@mbevc1
Copy link

mbevc1 commented Jan 22, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants