loteoo / ks Goto Github PK
View Code? Open in Web Editor NEWCommand-line secrets manager powered by macOS keychains
License: MIT License
Command-line secrets manager powered by macOS keychains
License: MIT License
Hi,
this is a great idea, but unfortunately it does not work for me:
> ks add "mysecret" "test"
No secret specified. Please provide the value to encrypt
it will ask for the password though.
When trying to access elements in the keychain, it also does not work properly. I added an object called testObject
to the Secrets
keychain. When doing an ls, all looking good:
> ks ls
testObject
But accessing it does not work:
> ks show testObject
Secret "testObject" was not found in keychain.
Hi.
First thanks for thought provoking and some fun.
The Secrets file and secret (as a kind of entry, as seen by the UI) are a bit unclear to me. The ks script or the help could maybe clarify this a bit?
Also that the secrets_file is per user (I always have atl east a priv and non-priv user, as I suspect would many people). So I was a priv shell to install with sudo but then testing as non priv user in the UI "Keychain Access" where nothing seemed to appear.
I then chown the ks script for owner,staff and could use it as non priv shell.
Created a new Secrets file for that user. Then UI "Keychain Access" (as non priv UI user) saw the Keychain.
So seemed better to enter secrets via "Keychain Access" - so the data is not in my command logging systems (I run a sqlite3 db of command date on top of the normal logging, that is my own so would at least let me trim and delete secrets.)
BUT the "Keychain Access" UI only seems to allow me to create items where Kind="secure note" or "password item"...
ks will list those
$ ks ls
test
secNote_UI
but then cannot really see them
$ ks show secNote_UI
Secret "secNote_UI" was not found in keychain.
Is there some way to unify the 2 areas/tools?
[I am using El Capitan 10.11.6 as my tech and dev world since I like my greater freedom there. Not yet tried this on Catalina, say]
Is there a way to add a multiline secret such as a SSH key? Copying and pasting directly in the keychain access app Secrets keychain works after which ks correctly lists and shows the entry.
Edit: ks add ssh "$(cat ./.ssh/id_ed25519)"
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.