title: Restricting files from Google Cloud Storage to the users that have authenticated with my Google App Engine app?
body: <p>I have a GAE application with a database of users. </p>
  
  <p>When one of the user tries to download, say, file <code>myapplication.appspot.com/somefile.jpg</code>, I would:</p>
  
  <ol>
  <li>check on the GAE database whether he is allowed to</li>
  <li>if he is allowed, redirect him to a cloud storage bucket of mine from where he can download <code>somefile.jpg</code></li>
  <li>if he is not allowed, return him a 404 error code, and do some magic so that directly trying to download <code>somefile.jpg</code> from the cloud storage bucket does not complete.</li>
  </ol>
  
  <p>Now what’s unclear to me is how to control access to <code>somefile.jpg</code>. How can I restrict the download to this scope of users?</p>
  
  <p>PS: using something else than Google Storage is not an option (for those of you guys who thought about blobstore).</p>