title: Reading a Secure XML from Google-App-Engine in Xcode (iOS)
body: <p>I have a Google-App-Engine website written in Java on which I am storing an XML file, and an iOS app which needs to read that file. However, it is very important that this XML cannot be viewed by anyone else. I've been looking into some possibilities, but have had some issues.</p>
  
  <p>I've mainly been trying to add a security constraint in my Java project's web.xml such as this:</p>
  
  <pre><code>&lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
          &lt;url-pattern&gt;/file.xml&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
      &lt;auth-constraint&gt;
          &lt;role-name&gt;admin&lt;/role-name&gt;
      &lt;/auth-constraint&gt;
  &lt;/security-constraint&gt;
  </code></pre>
  
  <p>This works fine for me when I'm trying to access the file from a web browser. I'm redirected to a login page where I can enter username and password. But inside the app, I don't know where to enter this information. Trying to get the file returns the source code of the Google login page. So how does one access these files?</p>
  
  <p>I also tried to use the ASIHTTPRequest classes, and set:</p>
  
  <pre><code>[request setUsername:@"username"];
  [request setPassword:@"password"];
  </code></pre>
  
  <p>But still, I end up with the login page's source code. Should I look into using CFCredentials? Or is there a much simpler solution that I am missing?</p>
  
  <p>I know I could also manually encrypt the file and then decrypt it in the app, but it's a pretty large XML and so I would prefer not having to do that.</p>
  
  <p>Thanks very much.</p>