Security on REST API Keys
-
Hello there,
I have a very simple question, maybe I am missing something. If Yes, then please let me know what I am missing.So let’s start.
– Suppose I build a theme/plugin that I wanna sell on my WooCommerce store and manage license.
– In order to manage licenses I installed your License Manager plugin, and set up a Generator, and Linked to my themes and plugins products that I sell on the store.
– Now, a customer came to my website and ordered the product.
– After successful payment, he got the theme/plugin zip file that I sell and he also got the license through your License Manager plugin as I set up the generators.– Now, the customer goes to his website and install my theme\plugin where I added a form to enter the license key to activate/deactivate the license.
– Of course, I will have to some code in my theme and plugin that will help me license check, activation, deactivation through my website where I manage all the themes\plugins that I sell.
– Now, as described in your documentation that REST API requires client and secret keys in order to use the REST API, which I can generate and save somewhere as they won’t be shown again.
– Now I generated the REST API Keys and saved them.
– Now I will have to save those keys in my plugin and themes somewhere because I have to make a REST API call using those keys from the theme\plugin I just sold.– So now, I put those keys in my plugins\themes file, Now all good.
Now, since my client and secret keys are in the plugin file, so anyone can see those keys from the file. then they can make any kind of REST API call.
For example:
/wp-json/lmfwc/v2/licenses
from this they got all the licenses data I have on my website.And since I have to activate license from REST API which is a PUT request that must have write permission in REST API keys so it means, I am giving full control of my website to the whole world if my sold product got distributed in the nulled market or if not someone who bought finds the keys in the file he can easily do anything using those keys.
Now please let me know if I am missing anything in this whole process, or you’re plugins can’t allow me to sell themes\plugins or anything related to code things as for license status, activation, and deactivation I will have to give the buyer REST API keys that open all the gates for him?
Thanks
- The topic ‘Security on REST API Keys’ is closed to new replies.