Skip to content

feat(appconfig): Automatically store "sensitive" appconfigs encrypted in the database - #43114

Merged
nickvergessen merged 2 commits into
masterfrom
bugfix/noid/automatically-encrypt-sensitive-values
Mar 7, 2024
Merged

feat(appconfig): Automatically store "sensitive" appconfigs encrypted in the database#43114
nickvergessen merged 2 commits into
masterfrom
bugfix/noid/automatically-encrypt-sensitive-values

Conversation

@nickvergessen

@nickvergessennickvergessen commented Jan 25, 2024

Copy link
Copy Markdown
Member

Summary

Quite some app configs contain sensitive information that we could prevent to leak, when a backup of the DB is leaked, to reduce the risk of follow up leaks/hacks.
The state of the art is to use ICrypto::encrypt() and ICrypto::decrypt() for that. While looking into it for some of the talk configs which are arrays, I thought it's a shame that we would loose all the typing as we have to json_encode the config making it strings, in order to be able to encrypt them.

So why not just encrypt all sensitive configs all the time automatically?

TODO

  • Adjust normal getter and setter
  • Check getAllValues and getDetails

Checklist

@nickvergessennickvergessen added this to the Nextcloud 29 milestone Jan 25, 2024
@nickvergessennickvergessen self-assigned this Jan 25, 2024
@nickvergessen
nickvergessen marked this pull request as draft January 25, 2024 13:35
@nickvergessen
nickvergessen changed the base branch from master to enh/noid/improve-index-on-appconfigJanuary 25, 2024 13:35
Comment threadlib/private/AppConfig.php
Comment threadlib/private/AppConfig.php Outdated
Comment threadlib/private/AppConfig.php Outdated
Comment threadlib/private/AppConfig.php Outdated
Base automatically changed from enh/noid/improve-index-on-appconfig to masterJanuary 26, 2024 10:53
@nickvergessen
nickvergessenforce-pushed the bugfix/noid/automatically-encrypt-sensitive-values branch from 2ef454d to 6d20fd0CompareJanuary 26, 2024 21:05
… in the database
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
nickvergessenforce-pushed the bugfix/noid/automatically-encrypt-sensitive-values branch from 6d20fd0 to 24607a3CompareMarch 6, 2024 21:27
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen
nickvergessenforce-pushed the bugfix/noid/automatically-encrypt-sensitive-values branch from e77d9e4 to 3a67080CompareMarch 6, 2024 21:59
@nickvergessen
nickvergessen marked this pull request as ready for review March 6, 2024 21:59
@nickvergessennickvergessen mentioned this pull request Mar 6, 2024
@nickvergessen
nickvergessen merged commit 718c845 into masterMar 7, 2024
@nickvergessen
nickvergessen deleted the bugfix/noid/automatically-encrypt-sensitive-values branch March 7, 2024 08:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@nickvergessen@ArtificialOwl@AndyScherzinger