Add legacy support for KWallet maps - #294
Conversation
In the ongoing migration from KWallet to QtKeychain in Plasma, in order to migrate without too strong rewrites and most important have the existing stored data still working, (some secrets actually have the structure of multiple key value maps) make reading from map still work. return it as a json serialized string, which is also how the kwallet compatibility layer stores maps on secretservice. This is only supported while reading, so when writing again it will be written directly as a serialized json string. this makes an implicit data migration which will make easier to go completely away from kwallet.
|
An alternative might be actually supporting maps as a first class citizen (which they would still be stored just as json strings, so should work on any platform) just to have the serializing/unserializing behind a ReadMapJob/WriteMapJob |
|
Given that maps are a legacy KWallet concept, and the plan for KWallet is to eventually retire its legacy API, I think the extra complexity of full maps support in QtKeychain is not worth the effort and maintenance cost. Secret Service has no concept of maps, and each client knows which of its stored values are JSON (or any other format). So I think the better approach is to migrate map entries to plain JSON with the generic But as I noted elsewhere, we do need the basic read support in this PR to get that migration done. |
47788d3 to
39ff1c7
Compare
As is now in this PR, it will successfully read from maps, but when writing again, it would then write a normal string, thus doing a kind of implicit migrations |
|
LGTM |
|
anything left to do? |
39ff1c7 to
dd034b6
Compare
In the ongoing migration from KWallet to QtKeychain in Plasma, in order to migrate without too strong rewrites and most important have the existing stored data still working, (some secrets actually have the structure of multiple key value maps) make reading from map still work. return it as a json serialized string, which is also how the kwallet compatibility layer stores maps on secretservice.
This is only supported while reading, so when writing again it will be written directly as a serialized json string. this makes an implicit data migration which will make easier to go completely away from kwallet.