-
Notifications
You must be signed in to change notification settings - Fork 4
Allow fully qualified paths for new secret name in secrets rename #417
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
Allow fully qualified paths for new secret name in secrets rename #417
Conversation
aryanjassal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic intuition is correct, but the implementation does not align with how it has been done in rest of the codebase. So, the implementation needs a bit of refactoring before it is ready for merging.
|
As matthew should focus on MatrixAI/Polykey#822, I will instead take this over and complete it. |
|
Another thing I've observed is that logic preventing invalid actions was written to polykey CLI. This is incorrect, and all such logical interactions should be present in Polykey itself. I'm pretty sure any illegal interactions like attempting to rename a vault root is intercepted by the filesystem, and an EPERM is thrown. Okay maybe not an EPERM but this is what I get when I attempt to rename vault root -- it is handled automatically. The error is not easy to understand, but invalid actions are protected against, and that's what matters for now. |
… new secret name and ensure its a valid base name even with the vaultName:secret syntax
…ts final new secret name
… in CommandRename
chore: updated help text
5e52833 to
8d9e54b
Compare
|
This should now be implemented correctly to take in a fully-qualified path for both the source and destination parameters. This can now be merged. |
Description
This PR addresses a bug in the polykey secrets rename command where providing as a fully qualified path (e.g., MyVault:/NewSecret) would cause an ENOENT error. This occurred because the underlying rename operation expects a simple base name for the new secret, not a full path.
Issues Fixed
Tasks
CommandRename.tsscript in src/secrets to allow for both simple base namessomeSecretand fully qualified pathsvaultName:/someSecretFinal checklist