title: What's a good approach to securing MP3 files for a private podcast with Amazon S3?
body: <p>I'm trying to create a private podcast feeds. Each user of my service gets an account and depending on what they pay, they will receive different content. Some content is sensitive so security is reasonably important; if any of the enclosed audio files made the rounds around the internet, it could be catastrophic for our business.</p>
  
  <p>I am currently prototyping the service and MP3s are stored on S3 and they are not secured. It's time to secure them. From my research, I understand that I can, in fact, secure files on S3 with an access expiry period. But, because I have many users, signing the request with my "global" key and have an expiry probably isn't a good idea because </p>
  
  <ol>
  <li>If I need to revoke access, I'll need to do it for everyone</li>
  <li>Since I don't know when, exactly, their podcatcher will request the file, I don't know when to set the expiry.  Sometimes, the podcatcher downloads the feed XML, but only later fetches the MP3 file so the URLs could expire before the client has a chance to fetch them (I'm thinking about iTunes, but there could be others).</li>
  </ol>
  
  <p>The way I see it, I have two options and I'm not sure if either are workable:</p>
  
  <p><strong>Edit</strong> Another potential way, I suppose, would be to <a href="https://stackoverflow.com/questions/2636783/django-as-s3-proxy">role my own security, and simply redirect</a> to an MP3 on S3 with a short expiry if the user is good to go. This seems most sensible.</p>
  
  <ol>
  <li>I can create user accounts on Amazon for ALL of my users and link them to an Amazon token in my database. Everyone's MP3 urls are signed with their secret token and expiry a long time from now. I don't like the idea of storing their tokens on my database, and I'm not sure if the Amazon ACL was designed for this scenario. It also means the files can still be shared if you know the URL.</li>
  <li>I can proxy every request through my server. This means I only have one Amazon account, and I can role my own security system. But proxying every MP3 download through my server sounds slow, wasteful and expensive.</li>
  </ol>
  
  <p>Any ideas on the best way to do this. </p>
  
  <p>P.S. I'm not married to S3. Other solutions could be considered. And I'm on Heroku using Ruby, in case you care. </p>