core icon indicating copy to clipboard operation
core copied to clipboard

Password used for external backup in Google drive is in plain text

Open milapointe opened this issue 1 year ago • 3 comments

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

  • [X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
  • [X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Describe the bug

When using the function to export configuration to external storage (e.g. Google Drive), we can see clearly in the logs our password used for encrypting the file. I would assume that no password should be in cleartext...

To Reproduce

Steps to reproduce the behavior:

  1. Save a new google drive backup configuration
  2. Go to 'System: Configuration: History'
  3. See the diff revision and look at that value : '<GDrivePassword>easy123</GDrivePassword>'

Expected behavior

<GDrivePassword>encryptedvalue</GDrivePassword>

Describe alternatives you considered

Not using this feature ?

On another note, could the password be encrypted with the self-signed certificate key or something else?

Could the password be hidden in that panel (and else where if found too?)

Screenshots

ssopnsense

Relevant log files

N/A

Additional context

N/A

Environment

OPNsense 23.7.12-amd64 FreeBSD 13.2-RELEASE-p7 OpenSSL 1.1.1w

First issue here, I looked at past issues but didnt find anything on this....

Thanks !

milapointe avatar Jan 17 '24 00:01 milapointe

I don't think there is a way to verify a password hash to GDrive remotely. You could encrypt it but if you want it automated you'd need to store the key alongside which has the same "issue".

I think you are stuck between a rock and a hard place if you want to automate something but don't want to use the password preinstalled. ;)

Cheers, Franco

fichtner avatar Jan 17 '24 08:01 fichtner

PS: Keep in mind the config history is more or less an administrator page and you are very likely logged in as one.

fichtner avatar Jan 17 '24 08:01 fichtner

PS: Keep in mind the config history is more or less an administrator page and you are very likely logged in as one.

I know but since it's exported on a remote drive, I would expected the data being encrypted.

milapointe avatar Jun 25 '24 21:06 milapointe

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.

OPNsense-bot avatar Jul 14 '24 23:07 OPNsense-bot