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] plugin store credentials in base64 #15718

Open
mbarbey opened this issue Mar 19, 2019 · 3 comments
Open

[JIRA] plugin store credentials in base64 #15718

mbarbey opened this issue Mar 19, 2019 · 3 comments
Labels

Comments

@mbarbey
Copy link

mbarbey commented Mar 19, 2019

When registering a JIRA instance in a project, the information and credentials are stored in plain base64 in the database, which mean that anybody able to connect to the database or read the dumps can log into the JIRA instance with the account of the linked user (which can be catastrophic depending the user's permissions).

I would suggest encoding these data in openssl aes256-cbc or any securized way to store sensitive data.

@BYK BYK closed this as completed Nov 20, 2019
@BYK BYK reopened this Nov 20, 2019
@BYK BYK transferred this issue from getsentry/sentry-plugins Nov 20, 2019
@BYK BYK self-assigned this Oct 22, 2020
@BYK BYK added the Security label Oct 22, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Accepted, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@BYK
Copy link
Member

BYK commented Jan 15, 2021

@mbarbey sorry this got stale. I'm thinking about how to fix this but can't really find a good solution as even if we encrypt the credentials, we'd still need to make the key available to the app to decrypt on-demand which defeats the purpose.

Am I missing something here?

@mbarbey
Copy link
Author

mbarbey commented Jan 15, 2021

@BYK I wasn't thinking about a sophisticated solution.
The issue here is about the fact that by simply having access to the database you can get the credentials of a Jira administrator. And we all know well how frequently databases tend to be dumped and published on the web due to security issues somewhere else on websites or servers. And having plain credentials of an administrator directly in the dumps clearly isn't an optimal situation.

I see 2 possible solutions, one very easy and one easy :

1. very easy

Simply generating a random key at the installation, storing it in a file somewhere in the project, and using this key to encrypt the credentials before storing it in the database.
This way, if someone want to get the Jira admin credentials, you need both access to the database and the host machine, which can be 2 differents systems.

2. easy

Same thing as the 1st option, but the file containing the encryption key is stored somewhere on the OS where the access is limited by users (like the .ssh directory on linux). It would probably be differents paths depending the OS so it might be a little more difficult than the 1st option, but not too much.
And with this option, if you want to find the credentials, you need both access to the database, the hosting machine and logging as the user Sentry is using.

And in both case, when migrating data to a new server, you will need to copy the security file to the new server or reconfigure the Jira plugin.

What do you think about it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants