java - Google push notification. How to validate sender and make sure that was Google? -


i have implemented in app integration google oauth2. can subscribe clients on push notification (pn) changes in google calendar scope. pn handled on rest controllers level. current issue i can't sure pn sent google.

from rest request can sender ip, may more information sender (i not know yet need). right think need have googles` ips range (where pn sent). range register in system , make sender verification than. idea has disadvantages (describing details hope receive answer or suggestion alternative, better solution).

how can verify pn sender google?

answers next questions me implement 1 of verification ideas:

  1. can have googles' ip range use filter (where can googles' ip range used send pn?)?
  2. has google special security api check using request information if request sent google?

my application details:

  • maven web java project;
  • spring boot based;
  • rest api;
  • java google client;

    <dependency>     <groupid>com.google.api-client</groupid>     <artifactid>google-api-client</artifactid> </dependency> 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -