Feature Request: Automatic decryption of encrypted fields in MySQL Developer Console
2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 30 (RSS)
By KennyH - January 22
I've noticed that when querying tables with encrypted fields in the MySQL Developer Console, the results show the encrypted values instead of the decrypted readable text. This makes it difficult to verify data when testing queries or share with AI. Would it be possible to add functionality to automatically decrypt these fields in the console view, similar to how they appear when accessed through the CMS interface?
Kenny H
By Dave - January 30
Hi Kenny,
This is a tricky one, but an interesting idea.
The MySQL Console gives you raw access to the MySQL, and the data IS encoded there. So we want both honest data and a way to access it for usability.
Currently, you'd need to type a lot of MySQL in the query to decode those values (or we'd need to generate and replace your query or do it behind the scenes as a secondary query).
I've made some updates to the upcoming beta so you'll be able to type a lot less:
AES_DECRYPT(name, @ek) // @ek is the encryption key
So, for example:
SELECT num, AES_DECRYPT(name, @ek), AES_DECRYPT(name, @ek) FROM cms_users
Note, this doesn't work yet, but will in the upcoming beta.
We could probably come up with a checkbox or something that lets you auto-decode. So * gets replaced with the decode expressions.
I'll think on it some more. Are you mostly using this on SELECT * FROM queries (getting all columns)? And is it mostly single-table queries, or are there joins as well?
interactivetools.com