Mattermost-server: [Help Wanted] [MM-12452] Stop hashing plugin keys on write

Created on 7 Nov 2018  路  3Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.


Notes: Jira ticket

Today, all plugin keys are hashed (sha256) when written to the database. This has the advantage of making the storage requirements for keys independent of the key length, but makes it impossible to effectively enumerate the keys stored by a plugin.

In particular, the newly aded KVList API is useless, since the keys returned are hashes of the original keys, and the API doesn't support querying by same.

Let's pivot away from hashing the keys towards storing the original keys, subject to a length limit (throwing an error if too long). On lookup, try the key provided as well as its hash, returning the first such result so as to guarantee backwards compatibility.

Hard TecGo

Most helpful comment

I can take this.

All 3 comments

I can take this.

Great! Let us now, if you have any questions

Was this page helpful?
0 / 5 - 0 ratings