Skip to content
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

UX: non-existent identities aren't completely ignored #294

Open
ryantm opened this issue Mar 8, 2022 · 1 comment
Open

UX: non-existent identities aren't completely ignored #294

ryantm opened this issue Mar 8, 2022 · 1 comment

Comments

@ryantm
Copy link
Contributor

ryantm commented Mar 8, 2022

What were you trying to do / what happened

$ rage --version
rage 0.7.1
$ rage -i /non-existent/path -i ~/.ssh/id_ed25519 -d secret.age
Error: No such file or directory (os error 2)

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report 

I was expecting that the non-existent path identity would be totally ignored because the private key path (~/.ssh/id_ed25519) exists and is able to decrypt the secret, instead it complains about not being able to open the non-existent path. I think this could be useful for situations where you want to have a fallback identity, or want to transition the location of an identity to a different path.

@str4d
Copy link
Owner

str4d commented Sep 11, 2022

rage has always rejected non-existent identity files. Originally it would parse the identities from the given files, and then coalesce them (so e.g. identities from the same plugin would be tried together). This behaviour was changed in 481b994 to instead match age, and treat the provided -i flags as a direct indication of the user's decryption preferences. That line of reasoning implies that if a user specifies an -i flag, they intend for that identity to be used, and hence it must exist.

How does age behave in this context? cc @FiloSottile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants