Secure handling of OAuth Consumer Key and Secret in Chrome Extensions and Gmail Gadgets

前端 未结 1 1858
情话喂你
情话喂你 2021-01-18 12:22

I would like to get some ideas on to properly handle Salesforce OAuth Consumer Key and Secret in Chrome Extensions and Gmail Gadgets. Chrome extensions are essentially Javas

相关标签:
1条回答
  • 2021-01-18 12:38

    Here are a couple of options.

    1) Run a proxy through your own server that protects the secrets and limits the allowed methods through your own API. This will also allow you to update the API keys in moments instead of the potential days to update an extension.

    2) Obfuscate the secrets in the extension/gadget code. You can make it difficult to find but with Chrome it will be easy to pick out the keys in the dev tools network tab.

    3) Say screw it, leave them in the code, and make sure no actual damage can be done using the secrets.

    As for Salesforce's roadmap you will likely have to ask them and they probably won't comment.

    0 讨论(0)
提交回复
热议问题