JEGADEESAN S
JEGADEESAN S

Reputation: 618

How to restrict Play store's Publishing API based on IP Address?

We are going to implement continuous integration for alpha release in play store. I refereed the playstore's documentation and github project for releasing APKs via API. But I didn't find the security mechanism for restricting the Release API to be used by only the permitted IP address. How to restrict the Release API based on ip address?

Referred the Google's best practice documentation for securing the API access. They also suggested to restrict the API acccess based on IP Address.

Thanks in advance :)

Upvotes: 1

Views: 1199

Answers (1)

Thomas
Thomas

Reputation: 182083

You configure the IP addresses when creating an API key. The list of allowed addresses is tied to the key you use for authenticating.

  • On https://console.developers.google.com/apis/credentials, click "Create credentials", "API key".
  • The key appears. Click "Restrict key" to immediately go to the editing screen.
  • Under "Application restrictions", select "IP addresses (web servers, cron jobs, etc.)".
  • Under "Accept requests from these server IP addresses", add the IP address(es) of your server(s).
  • Recommended: under "API restrictions", select "Restrict key" and select only the Release API. (I don't see it in the list, but maybe I don't have it enabled for this particular project.)
  • Click "Save".

See also documentation here and here.

Upvotes: 1

Related Questions