Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jun 04, 2012 11:49 am 
Offline
Senior Newbie

Joined: Sat May 26, 2012 5:19 pm
Posts: 6
Hi,

I'm deploying a facebook app and I'm wondering if there's anyway of restricting Apache access to the context of the app. That is, disallowing access to the files outside the actual running of the app.

Thanks.


Top
   
 Post subject:
PostPosted: Mon Jun 04, 2012 12:48 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Apache will serve only the files in and under its DocumentRoot, which is configurable globally or per virtual host. You can also restric access to individual dirs under DocumentRoot.

https://httpd.apache.org/docs/2.2/howto/access.html


Top
   
 Post subject:
PostPosted: Mon Jun 04, 2012 1:19 pm 
Offline
Senior Newbie

Joined: Sat May 26, 2012 5:19 pm
Posts: 6
Thanks for taking the time to answer my question.

Perhaps, though, I didn't make myself clear.

I have a facebook app that consists of a Flash client and some other files. I have the delivery of these already working under Apache.

Now, here's the gist of my question: a facebook app runs inside of an iframe in facebook, and I wanted to know if it were to possible to restrict access to my app so that people running the app inside facebook could access the client and other files while restricting access outside of the scope of the facebook iframe.


Top
   
 Post subject:
PostPosted: Mon Jun 04, 2012 1:39 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
Maybe check if the referrer tag is facebook? Or include code in the Flash app that verifies it's inside the Facebook iFrame? What you ask is impossible for Apache to do securely; even if you check the referrer tag, that can easily be spoofed.


Top
   
 Post subject:
PostPosted: Mon Jun 04, 2012 1:49 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Oh, you're asking to make the app available only through FB canvas. Well, one way would be to use referer and do some RewriteCond magick based on the HTTP_REFERER variable. But that's not 100% reliable, can be spoofed.

Another way would be app specific with a none token set per client instance (which you verify via POST only valid signed_request payload), or even hardcoded in the flash app. But even that can be spoofed.

Edit: Ah, guspaz beat me to it :)


Top
   
 Post subject:
PostPosted: Mon Jun 04, 2012 2:02 pm 
Offline
Senior Newbie

Joined: Sat May 26, 2012 5:19 pm
Posts: 6
Thanks, guys.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group