Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm working on a Google chrome extension that basically hits our API to do a search and lists the results. We'd like the extension to have elevated API privileges (i.e. so it has access to data a regular user doesn't, and doesn't have the usual 200/requests a day limit), but we're not sure how to secure the API key used by the extension. A user can easily use the developer tools included in chrome to view the extension source (since it's just HTML, CSS and javascript) or watch the API requests as they are made and extract the API key from that.

Anyone got an idea of how we can secure an API key in a chrome extension? I've perused the google chrome extension documentation to see if there is anything that may help us but I haven't found anything.

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.7k views
Welcome To Ask or Share your Answers For Others

1 Answer

If your extension can send requests to your server, any user can use Fiddler to examine the requests and impersonate the extension.

There is nothing you can do about that.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share
...