TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Why most CLIs are not using keyring?

19 pointsby eris_agxover 2 years ago
This is bit of a rant on software usability and security. CLIs like kubectl&#x2F;awscli&#x2F;&lt;add your critical tool here&gt; don&#x27;t use keyring to store credentials, instead using plain text files. Besides requiring me to retype passwords over and over.<p>Any good reason to avoid keyring? Please enlighten me<p>FYI: I&#x27;ve learned today that poetry (the python thing) uses keyring for credentials. Good job!

4 comments

3npover 2 years ago
Might be a bit of a chicken-and-egg-thing but the org.freedesktop.secrets options on Linux are still not satisfactory and a blocker for adoption IMO.<p>AFAIK the only mature enough implementations are those available in linux repos, namely gnome-keyring, kwallet (KDE), and keepassxc. So it&#x27;s not really an option for many use-cases. Backups and syncing are hacky or badly supported and documented. Granular control likewise. I don&#x27;t recall the details right now but IIRC the API itself had some problematic and&#x2F;or annoying aspect to it when I looked into it. I also suspect that for many, dbus does not spark joy and relying on it for secrets is not attractive.<p>There are some early implementations I&#x27;m aware of that might work in practice and with enough engagement could become viable:<p><pre><code> https:&#x2F;&#x2F;github.com&#x2F;yousefvand&#x2F;secret-service https:&#x2F;&#x2F;github.com&#x2F;mdellweg&#x2F;pass_secret_service https:&#x2F;&#x2F;github.com&#x2F;nullobsi&#x2F;pass-secrets </code></pre> I&#x27;m also keeping an eye out on Himitsu, which I guess you could say is attempting a more holistic approach: <a href="https:&#x2F;&#x2F;himitsustore.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;himitsustore.org&#x2F;</a>
viraptorover 2 years ago
Don&#x27;t know about kube, but awscli and a few others decouple the idea of getting credentials and doing the actions. You <i>can</i> use the password directly through them every time, but a better way is to either use the preconfigured profile or some wrapper which does use the keychain. For example <a href="https:&#x2F;&#x2F;github.com&#x2F;99designs&#x2F;aws-vault&#x2F;">https:&#x2F;&#x2F;github.com&#x2F;99designs&#x2F;aws-vault&#x2F;</a> supports one-off commands and shell sessions with pre-populated tokens. There&#x27;s also similar cf-vault.<p>Terraform also can be configured to use environment variables (and I&#x27;m sure other utilities) which allows similar &quot;use a separate tool for creds&quot; approach.<p>(kube apparently has <a href="https:&#x2F;&#x2F;github.com&#x2F;chrisns&#x2F;kubectl-passman">https:&#x2F;&#x2F;github.com&#x2F;chrisns&#x2F;kubectl-passman</a>)
评论 #34651529 未加载
mkjover 2 years ago
At least with gnome-keyring, it doesn&#x27;t seem able to limit keyring access to only &quot;good&quot; program executables (how would it identify them? And their linked libs...), so using the keyring won&#x27;t give much security benefit?
perryizgr8over 2 years ago
What&#x27;s a keyring?
评论 #34651902 未加载