Reply
Secure cross-site communication
Old 03-31-2008, 12:36 PM Secure cross-site communication
VirtuosiMedia's Avatar
Webmaster Talker

Posts: 738
I'm looking for a little help on secure cross-site communication between sites that are hosted on different domains and do not share a database. I haven't ventured into this area yet, so I'm not very familiar with what the best protocol is and what issues I need to be aware of. Beyond the ability to communicate between sites, security is my highest priority. Does anyone have any words of wisdom in this area?

So far, my two potential candidates are XMLRPC and SOAP. Are there others? What are the pros and cons of using one over the other?
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
When You Register, These Ads Go Away!
Old 03-31-2008, 01:00 PM Re: Secure cross-site communication
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
I prefer XML-RPC. When communicating, be sure to use a secure connection (e.g. HTTPS) and then have some means of validating that the data sent is from your legitimate source. For example, you could have a password tag. Doing these 2 things encrypts (through the HTTPS connection) the data on transport and allows you to validate the data once received (through the password).

Additionally, you could have the receiving server post back values to the sending server which then returns a validation code if the data matches the sent data. An example of this is PayPal's IPN method.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-31-2008, 01:04 PM Re: Secure cross-site communication
VirtuosiMedia's Avatar
Webmaster Talker

Posts: 738
What if an HTTPS connection isn't always guaranteed to be present?
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 03-31-2008, 01:08 PM Re: Secure cross-site communication
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
Well, then, you'd have to encrypt the data yourself, but that's not something I've done. You may want to check out http://us2.php.net/manual/en/functio...pt-encrypt.php for a PHP encryption method -- again, NOT something I've done.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-31-2008, 01:31 PM Re: Secure cross-site communication
VirtuosiMedia's Avatar
Webmaster Talker

Posts: 738
If I go that route, then I guess I would need a unique key for each site that uses it. Is there anyway that an XMLRPC request/response can be intercepted?
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 03-31-2008, 01:34 PM Re: Secure cross-site communication
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
I'd say that it's no probably, but just about anything is possible. Your question, however, was on how to secure something. If you want the best method, use HTTPS or personally-encrypt.

Now, that's just my experience. Others out there may have better ideas -- and, I'd love to hear them.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-31-2008, 03:48 PM Re: Secure cross-site communication
Average Talker

Posts: 15
Depending on what you're trying to accomplish you may be able to just scp files back and forth on cron jobs, assuming you have that kind of access.
__________________
30 Day Money-Back Guarantee - PHP Hosting - VPS Hosting - Linux Dedicated Servers
awatson is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 03:53 PM Re: Secure cross-site communication
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
What's "scp"?
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-31-2008, 05:19 PM Re: Secure cross-site communication
chrishirst's Avatar
Super Moderator

Posts: 13,576
Location: Blackpool. UK
scp is a *nix program that uses SSH to transfer files between hosts.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-31-2008, 05:22 PM Re: Secure cross-site communication
VirtuosiMedia's Avatar
Webmaster Talker

Posts: 738
Quote:
Originally Posted by awatson View Post
Depending on what you're trying to accomplish you may be able to just scp files back and forth on cron jobs, assuming you have that kind of access.
Unfortunately, I don't think that will be an option.
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 03-31-2008, 05:24 PM Re: Secure cross-site communication
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
So, VM, what do you have access to? You've asked an open ended question and rejected a lot of the options presented b/c you don't seem to have much available, so it may be easier to start from the other end of this.

CHRIS: Thanks.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 03-31-2008, 05:34 PM Re: Secure cross-site communication
VirtuosiMedia's Avatar
Webmaster Talker

Posts: 738
Quote:
Originally Posted by JeremyMiller View Post
So, VM, what do you have access to? You've asked an open ended question and rejected a lot of the options presented b/c you don't seem to have much available, so it may be easier to start from the other end of this.
Fair enough question. I should have probably laid out the question a bit differently to begin with. Without going into extravagant detail, I'm writing a web script that I would like to release for public use. I would like to have the sites on which the script is installed to be able to communicate securely (and with the owner's permission) with my site. I won't own or have access to the other sites. More simply said, I'm looking to make a secure web service available through my PHP script.
VirtuosiMedia is offline
Reply With Quote
View Public Profile Visit VirtuosiMedia's homepage!
 
Old 03-31-2008, 05:48 PM Re: Secure cross-site communication
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
Well, most sites, using cURL, for example, can connect to an https connection. And, you'd only have to have the HTTPS setup on your server. The other servers would just have to have support for connecting to yours and that's fairly common.

No matter what you do, there will be some crappy server that someone's on that won't allow your system to work. I've seen servers which simply ban connecting out, for example. GoDaddy, as another example, allows connecting to HTTPS, but through a proxy (their help site shows how using cURL in PHP).

I have a product out which connects to other sites and have very rarely had any problems with people connecting to the other sites to fetch information.

I'm thinking that you're making your requirements unnecessarily restrictive.

Hope that helps. TK appreciated.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 04-01-2008, 11:32 AM Re: Secure cross-site communication
willcode4beer's Avatar
Webmaster Talker

Posts: 695
Name: Paul Davis
Location: San Francisco
The best practice for secure communication between servers is to use a secure channel, TLS (preferred over SSL) where the public certificates from each server is on the other (and the private ones private).

Each server should restrict communication to servers for which is has a cert.
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Secure cross-site communication
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.17740 seconds with 12 queries