-
Notifications
You must be signed in to change notification settings - Fork 94
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
Feature-parity with age
: identity files via -
#384
Comments
Named pipes have the same limitation as stdin:
Why pipes? I'd prefer to use an environment variable containing the identity key, rather than a pipe, but in the interests of maintaining compatibility with |
@str4d Are you open to a PR that accepts environment variables with the prefix "OP_IDENTITY" (examples: @plaidfinch that could address your use case, right? 🤔 It should be possible to unify the implementation with the code in wage where identities are passed to an inner function as an array of Read (ReadableStream in the web-sys case). That implementation could be called for any file-like input, including stdin/pipes, and could be called by rage cli, or WASI, that enumerates environment variables. |
@stevelr this would address my use case, though I think support for stdin would still be a useful addition. |
Just noticed this comment that this there are plans for supporting this in the plugin api. I haven't been following that api development so I don't know whether the api is ready to write that plugin, or whether it's blocked waiting for a future capability of the plugin api. I didn't see a current plugin that implements environment variable support. |
No, that is not an approach I will merge into
Yes the plugin APIs should be sufficient to implement a plugin like this now. I am unaware of any such plugin yet, but environment variables given to |
Regarding this issue, I suspect that both it and #379 will be fixed once |
Cleaning up the issue tracker; this is a duplicate of #177. |
I encountered a similar situation as in #379 when attempting to use the
-
placeholder for stdin andpbpaste
(on macOS) to get my private key off the clipboard:Taking the identity file on stdin is useful for me because it allows using a password manager to do custody of the age private key.
Doing a bit of digging, it looks like here is where there should be a little extra magic:
rage/rage/src/bin/rage/main.rs
Lines 148 to 196 in f84af2c
If here we parse
-
specially to indicate that we should slurp standard in as a singular identity file, then the behavior will line up betweenage
andrage
.The comparison point for how
age
handles this would beparseIdentitiesFile
in the Go implementation.Originally posted by @plaidfinch in #379 (comment)
The text was updated successfully, but these errors were encountered: