-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
pass command instead of password in zuliprc? #1502
Comments
Thanks for the inquiry! Is this a blocker to you being able to use Zulip or Zulip-terminal? I wasn't familiar with My understanding of your query is that you're wanting to store the password-like detail centrally in a Currently
Zulip-terminal uses the python zulip wrapper library, and further details on the structure of this kind of zuliprc file is at: As a client we could implement this feature individually, since we could support arbitrary features/extensions in a zuliprc file, a little like we do right now for our current options. However, if we added such an option, we may want to coordinate with the larger community to coordinate on this. The Zulip server supports other login methods that we have yet to incorporate, which are typically browser-based, and mostly about connecting to a central authority (see eg. https://zulip.com/help/configure-authentication-methods). My understanding is that your request is specifically for a local authentication feature; the reason I mention this is I'm wondering if the deferral of the authentication to a command might be a common factor to both if we implemented these. |
Thanks for looking at this, and sorry for being cryptic. You got me right. To keep the analogy with mbsync, the token case (for oauth) has |
To be unambiguous: the |
@dkwo To confirm the original intent here:
Based on how we currently include zulip-terminal configuration as extra data in the zuliprc, the above would seem the approach to take. However, we're hoping to look at #678 this Summer, and there are benefits from separating the client config from the bare zuliprc (with only the If so, the bare zuliprc downloadable from Zulip (or via the API, or zulip-terminal) could be placed in the more secure location, with a redirection like |
Thanks for the update. |
Re my last paragraph/question in this comment, I saw that |
I would like to resolve this , but I need some more additional information about the issue. could anyone help me to understand the problem in a better way? |
@Gopinath-Mahendiran Sure. What is unclear from the above discussion? |
explain in detail that how the flow should be once we run the application? |
The flow is: config file contains a line that specifies an external command that when invoked prints to stdout whatever password/token/secret, and zulip-term reads such output when a password is needed. This should be agnostic about which encryption or program is used, just use its output as it would use a password typed by the user. |
@dkwo is it ok to store the encrypted api key in separate file like ~/.zulip_api_key when the application runs, command in the zuliprc file will retrieve the encrypted key and decrypt it and it can be used for login or else ,want to create an password manger like system utility for securely storing the api key |
@zulipbot I need help |
is it possible to let the password manager deal with the key? |
i.e. where to store the key and how to store it is out of scope for zulip. |
@dkwo sorry for asking too much question ,because I am beginner to open source contribution. |
I'm not sure I understand: isn't the api_key generated for you by zulip? |
Yes, the API key is provided by Zulip at the time of login only if the configuration file (zuliprc) is not found. Otherwise, it retrieves the previously stored key from the local configuration file. |
[api]
email[email protected]
key=sdjfkw8345nws85ndfmsar8234mdnfsar8243jsdknf';aswer02wen
site=chat.zulip.org
|
The API key will be encrypted upon receiving the configuration file from Zulip and stored as an api_hash in the configuration file. The hash will only be decrypted during the login process. |
Hi @neiljp , I hope you’re doing well! I have raised a pull request to enhance security by encrypting the api_key stored in the zuliprc file. This implementation ensures that credentials are not stored in plaintext and includes a seamless decryption mechanism. Here is the PR link : #1564 Could you please review the changes and provide your feedback? Let me know if any modifications or improvements are needed. Looking forward to your thoughts! Thanks for your time. Best regards, |
Hmm, it does not look at all like what I had in mind.
|
@Gopinath-Mahendiran The confusion here may be that at least my vision for the revised zuliprc format was to have something like a It may be useful to look at other applications that have support for this, to compare their approaches. It's worth noting that this may be something that is better handled at the python library level instead, which is why I started the conversation I linked in #1502 (comment). Then it could be used for other applications, such as bots or other API users. |
My zuliprc contains a [key] entry, which I guess is derived from the password.
Would it be possible (or maybe already is? I did not find documentation) to have a pass comand instead, like e.g. in mbsync or similar, so the key entry would look more like "PassCmd "/usr/bin/pass name@domain"?
The text was updated successfully, but these errors were encountered: