trilbymedia / grav-plugin-git-sync

Collaboratively Synchronize your Grav `user` folder hosted on GitHub, BitBucket or GitLab
Apache License 2.0
240 stars 58 forks source link

Move away from defuse/php-encryption #142

Closed drzraf closed 5 years ago

drzraf commented 5 years ago

Git password is currently processed through php-encryption. It's actually more an obfuscation than actual encryption because:

That leads to two observations:

That would allow provisioning these credentials using other language/libraries/deployment technologies.

w00fz commented 5 years ago

You are right in saying this is mostly obfuscation as well as pointing out how base64 would do the same, however this is mainly to not store the obfuscated password in a blatantly easy to identify format. Unfortunately proper encryption where we let the server decrypt for us cannot be done due to the nature of Git which is why no matter what solution to encrypt the password we find, it will always be fairly easy to decrypt. The main purpose of obfuscating the password is so that we can somewhat keep the yaml file secure from a plain password.

I'm open to PRs if you a have better implementation that can guarantee backward compatibility and cross platform availability. For example I know for a fact that openssl functions might not be available in windows system and that is definitely going to be a problem.

drzraf commented 5 years ago

Could you keep the issue open so that it's not missed from the radar? Even if a PR pop up, it would be to fix #142.