php - Google App Engine Server IP adresses -
i'm migrating our system google app engine.
when our pdf generator needs external resource (for example picture) internal http request (where request ip different user ip). starts different session, cannot see if user logged. in order give right permissions, need check if request comes server ip.
in previous code checked trough following code:
if($_server['remote_addr'] == $_server['server_addr']) { return true; }
but since $_server['server_addr'] not available, cannot used.
in new code check trough following code:
$allowed_ips = array( '127.0.0.1', '8.35.201.100' ); if(in_array($_server['remote_addr'], $allowed_ips)) { return true; }
the problem is; not know ip addresses google app engine uses internal request. have found ip address 8.35.201.100 server address, there more ip addresses or maybe ranges.
the task queues google app engine issues requests ip address 0.1.0.2 (https://developers.google.com/appengine/docs/php/taskqueue/overview-push#task_execution). same @ internal request.
greets, hendrik
i don't think appengine discloses ip addresses. appengine dynamic environment instances spinning , spinning down, there requests different ips things change.
when make http requests appengine, set few header fields mark request appengine. think appid included. anyway here documentation on that.
https://developers.google.com/appengine/docs/php/urlfetch/#request_headers
from security standpoint, can write fake http headers. wouldn't rely on means of authentication.
Comments
Post a Comment