Skip to content
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

Jira Commit Hint plugin credentials stored in plain text #4447

Closed
RussKie opened this issue Feb 9, 2018 · 5 comments · Fixed by #6467
Closed

Jira Commit Hint plugin credentials stored in plain text #4447

RussKie opened this issue Feb 9, 2018 · 5 comments · Fixed by #6467

Comments

@RussKie
Copy link
Member

RussKie commented Feb 9, 2018

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Credentials are stored in plain text

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Choose to persist the settings into "Distributed with current repository" settings source (it doesn't matter which layer it is stored, this layer makes it easier to see)
image

Open the GitExtensions.settings file:
image

What is the expected behavior?
Password isn't stored at all.

The issue may not be a big deal for home users who rarely change passwords and do not share their computers with anyone. However in a corporate environments storing passwords in plain text, especially in settings, which may be committed into a public repository, is a massive security issue.
The username must not be persisted into a configuration file either. Credentials must be persisted into Windows Vault (credential store).
Few links to start with:

Environment you encounter the issue:
2.51 / master

/cc: @ierof @pmiossec

@RussKie RussKie added this to the 3.00 milestone Feb 9, 2018
@RussKie RussKie modified the milestones: 3.00, 3.0x Jun 16, 2018
@ghost
Copy link

ghost commented Jan 30, 2019

I think it is not bad solution, but there is a issue with current settings architecture and Credential manager. I am really needed this fix for our company and I can dot it, but I am not sure about my vision of the fix. I have the questions:

  1. Should I save old logic to store credentials as plain text in gitextensions.config (it requres to add new checkbox)?
  2. Can I disable distributed settings logic for credentials? I can save credentials using Credential manager, but they cannot be distributed and saved inside repository, because we cannot share credentials from credential manager.

@RussKie
Copy link
Member Author

RussKie commented Jan 30, 2019

I would deprecate the old insecure storage mechanism and replace it with a secure store. It may be a little inconvenient for a user to re-enter username/password, but it is a small price to pay for security.

It is a good idea to lock username/password persistence to the local config only to prevent accidental sharing of secrets.

@pmiossec
Copy link
Member

I did this proof of concept some times ago to store passwords in the credential manager. I don't know if it could help you: https://github.com/pmiossec/gitextensions/tree/passwords_in_credential_manager

@ghost
Copy link

ghost commented Jan 30, 2019

Philippe, thanks. My prototype is the same :-). I will try to find free time to end the fix.

@pmiossec
Copy link
Member

My prototype is the same :-). I will try to find free time to end the fix.

If you planned to fix it, you surely should create the pull request now.
Just prefix the title with "WIP:" until it's not finished.

RussKie added a commit to RussKie/gitextensions that referenced this issue Apr 11, 2019
* Credentials for JIRA plugin are saved to Windows credential manager.

* Global and local (local = distributed in this case) setting levels are
supported. It is need for users, who works with several JIRA instances
and different accounts.
Distributed level is not supported because credential manager is not
a file storage.

Fixes gitextensions#4447

Co-authored-by: Ivan Sterkhov <stivx0@users.noreply.github.com>
@ghost ghost assigned RussKie Apr 11, 2019
@ghost ghost added the status: ready label Apr 11, 2019
@RussKie RussKie modified the milestones: Future release, 3.1.0 Apr 11, 2019
RussKie added a commit to RussKie/gitextensions that referenced this issue Apr 11, 2019
* Credentials for JIRA plugin are saved to Windows credential manager.

* Global and local (local = distributed in this case) setting levels are
supported. It is need for users, who works with several JIRA instances
and different accounts.
Distributed level is not supported because credential manager is not
a file storage.

Fixes gitextensions#4447

Co-authored-by: Ivan Sterkhov <stivx0@users.noreply.github.com>
RussKie added a commit to RussKie/gitextensions that referenced this issue Apr 14, 2019
* Credentials for JIRA plugin are saved to Windows credential manager.

* Global and local (local = distributed in this case) setting levels are
supported. It is need for users, who works with several JIRA instances
and different accounts.
Distributed level is not supported because credential manager is not
a file storage.

Fixes gitextensions#4447

Co-authored-by: Ivan Sterkhov <stivx0@users.noreply.github.com>
@ghost ghost removed the status: ready label Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment