canop / safecloset Goto Github PK
View Code? Open in Web Editor NEWCross-platform Secure TUI Secret Locker
Home Page: https://dystroy.org/safecloset
License: GNU Affero General Public License v3.0
Cross-platform Secure TUI Secret Locker
Home Page: https://dystroy.org/safecloset
License: GNU Affero General Public License v3.0
Using mac on latest main
branch:
Many times I need to add a new entry below the active entry. Is there a shortcut for it? Right now I always add a new entry at the end of the list and move it up to the proper position, which is a little cumbersome.
Right now if safecloset only show the file name that you passed to it on the title bar. If you have multiple level of nested closets, there is no information for you to identify where you are. For example, if I run the following command:
safecloset test
ctrl+n
aa
ctrl+n
bb
ctrl+n
cc
After running these commands, I'm in the cc
closet of the breadcrumb aa > bb > cc
. But there is no information on the screen that tells me this. Is it possible to add a breadcrumb like aa > bb > cc
or [test] > aa > bb > cc
to safecloset title bar?
Example 1 - Full drawer
I have a drawer with login passwords dumped from Google Chrome, which was originally sorted from the export.
I keep updating that list of logins manually now in safecloset.
I'd like to have all those logins sorted so i can easily scroll through them, if that is my desire.
Example 2 - Sort over a search result
I keep a drawer for several types of secrets.
After a while some entries are misplaced or spread around the drawer, though they are in a way possible to sort, through a numbering system that i used, or alphabetically.
It would be great to use the search feature, find the secrets and be able to sort them.
Alphabetical order could be a good automatic start.
The doubt in Example 2 would be how the result would look like when the secrets to sort are not contiguous within the drawer.
Let's take this following case to clarify this doubt:
If i filter for [pin] and click sort, how would the drawer look like?
Like this?
Like this?
In another way?
The goal would be to let programs running in a container access some keys without using files.
One could imagine a scenario with a script asking you to open a certain drawer of SafeCloset before launching docker-compose (or equivalent). While the drawer stays open, it would accept requests for keys on a unix socket.
So we'd need a way to parameterize a drawer to accept those connections for a given duration.
Note: this is a preliminary discussion.
Right now, values are rendered as markdown when not edited.
It turns out there are really few cases it makes sense.
Do I
Environment:
I found that when the cell contains non-ASCII chars, I can't correctly make selection. But even the cell contains non-ASCII chars, lines that don't contain non-ASCII chars can still be selected correctly.
You can try this text:
そのスレッドがまだ実行されている間While that thread was still executing
While that thread was still executing
While that thread was still executing
This tool looks great, although mac users can use Mac keychain this looks very useful to send closets to other people but there is no darwin executable on the released zip
The problem can be seen on the screenshots of #7
Hi,
I have problems with Ctrl-C to copy things from clipboard to somewhere else, like the browser, in my linux environment, and that's why I use Shift+mouse to Copy and paste.
I noticed that passwords with '*' in them, they are hidden from the view so the copy selection is wrong.
Here you can see how this value has a '*' in it
When i exit from the editing mode it disappears
Notice the change in color, like if it is maybe using the '*' as an escape character or something
When Shift+Mouse select, the Copied value will be dsdffhdf
and not dsdf*fhdf
MacOS: 13.2.1 (Ventura)
Arch: arm64 (M1)
I can't seem to copy any secrets to the clipboard. I've tried it with the standard terminal app, so it's not my terminal app (Warp) causing the issue as far as I can tell.
When I use ^c
, the notification at the bottom shows up saying it's been copied to the clipboard, but it hasn't actually been copied to system clipboard. I can't copy with cmd+c either. Doesn't matter whether I select a string or try to copy the whole entry.
Weird thing is I can still paste into an entry from the system clipboard with cmd+v, but I can't copy to the clipboard at all.
Once the user find the secret information, he/she may need to copy it and paste to some other places. If you add a shortcut to make the copy process a little bit easier it will make the app more usable. I suggest change the following
ctrl c : Close the current drawer, without saving (you're back in the upper level one if you close a deep drawer)
to ctrl+u, which means go to upper level. And make ctrl+cto copy current cell value, ctrl+shift+c to copy both name and value (separated by a newline).
This is just an idea I had. Thanks for creating such a useful tool!
It's hard to explain where this happens, so I uploaded an example to asciinema:
https://asciinema.org/a/ZdnzccVnoGFmfA2QmklmKm3hX
Basically after writing "aaa" I press "enter" and then "right arrow", and the program panics.
You can't see the backtrace when running this command, however thanks to the magic of asciinema I was able to recover it:
"thread 'main' panicked at 'attempt to subtract with overflow', src/tui/drawer_edit_state.rs:159:21\nnote: run with
RUST_BACKTRACE=1
environment variable to display a backtrace\n"
Which points to this line:
safecloset/src/tui/drawer_edit_state.rs
Line 159 in 232b7f2
If the desired behavior is wrapping on overflow (same as when compiling with --release
), try using .wrapping_sub(1)
instead of - 1
.
Tab is active while foreground windows don't support the key. An enables edits in the background.
Tab
enables making entries in the background.
OS=Linux SHELL=bash TERM=xterm-256color
Greetings Rust-Galt
From the very start I considered that at some point I'd need a feature allowing you to import entries from a drawer to another one, either within the same file or from a different file.
Two use-cases:
It turns out that I never felt the need so I didn't code this until now.
But the plan is ready, so, please, if you'd like this function, tell me.
Let's say I have a huge list of secrets, to the point that ^↑ and ^↓ is not feasible.
I would still like to sort some secrets together.
It would be great if when i use the search feature to find relevant secrets through pattern search, that when i use ^↑ and ^↓ the entries are placed together.
Example: Interested secrets are in lines 1,2,3,4 and 1235
Since safecloset is very useable now, I migrated my secret management fully to it. I hope I can run it on my Android devices. I tried build it under Termux, but I got this error:
Do you know how to solve it? Since it's from a color related crate, is it possible to remove color support if not easy to solve. Thanks.
I'm on Windows and use SafeCloset 0.5.2. When I use mouse to select the cell content, SafeCloset exits with an error message Error: Crossbeam(RecvError)
. Is SafeCloset designed so that the user is not allowed to select text inside the program with the mouse? I'm using Windows Terminal and by default Windows Terminal will copy the selection to clipboard. And that's why I was making the selection.
In the document it states that
You may add newlines in values with ctrl enter
and
alt-Enter : New line in the currently edited value
However, I tried both on Windows and it doesn't work. I tried both Windows Terminal and the old school cmd.exe, same result.
I'm using v0.2.5 and when safecloset starts, the ?
shortcut has never worked. Below is the log. I started safecloset, pressed ?
three times and ctrl+x
exited. It seems safecloset did receive the key.
08:38:15.620 [INFO] cli_log::init: Starting safecloset v0.2.5 with log level DEBUG
08:38:15.621 [INFO] safecloset::cli: args: Args {
version: false,
hide: false,
open: false,
path: Some(
"test",
),
}
08:38:15.888 [DEBUG] safecloset::tui::app: user event: Ok(Resize(107, 29))
08:38:20.380 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('?'), modifiers: SHIFT }))
08:38:20.747 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('?'), modifiers: SHIFT }))
08:38:21.077 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('?'), modifiers: SHIFT }))
08:38:23.290 [DEBUG] safecloset::tui::app: user event: Ok(Key(KeyEvent { code: Char('x'), modifiers: CONTROL }))
08:38:23.290 [DEBUG] safecloset::tui::app_state: user requests save and quit
08:38:23.290 [DEBUG] safecloset::tui::app_state: self.close_drawer_input(false) took 300ns
08:38:23.290 [DEBUG] safecloset::tui::app: user requests quit
08:38:23.290 [INFO] safecloset: bye
Also as you can see in the following screen snapshot, there are duplicate help information at the bottom when I started safecloset.
The length of the first help line is not equal to the second line, which is a little weird. For example, when I copy a cell, it looks like this.
I don't know if this trivial behavior is caused by safecloset or the terminal. It behaves exactly the same on Windows Terminal, cmd.exe and the native PowerShell console. It behaves like this.
Not a big issue, just curious why it behaves like this.
This would be a new feature, done from an open drawer.
When the cell has multiple line, it collapsed by default and only show full content when the cell is active. Is it possible to always show the full cell content? That way, you can see the whole content at a glance, which is more useful imo.
Thanks for creating safecloset. It's a very useful utility!
Current SC use TUI for everything. If there is a command line interface so that users can add, query, delete, change drawer entries, that would make the program more versatile and can be used under more situations.
Right now some behaviors are hardcoded in SafeCloset. For example, the user must provide a pretty strong drawer password. If yo u left SafeCloset for a period of time it will automatically close itself. I think if behaviors like these could be customized by the user will make it more useful. You may say enforce a strong password and quickly close a closet are SafeCloset's security features. But there are some cases that the user may want a short password (easier to type) and want it keep open for a longer time. For example, if the information in a drawer is not that sensitive, but the user does want to protect it to some level, he can use SafeCloset with a short password.
My suggestion is, if the user run safecloset without a configuration file (which is the default), safecloset will run with its default behavior. If the user create a safecloset.config
file and put some customization parameter in it, safecloset will use the parameters there.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.