• About Morris Development
  • A Focus for Cloud Efficiency
    • Microsoft Azure
    • Amazon Web Services
  • What our Clients Say
  • Our Products
    • PreschoolDB
    • WebinarDB
  • Contact Us

Morris Development

Custom System Development and Integration

March 8, 2015

Cross-Origin Resource Sharing (CORS) Data Security with Amazon Web Services

Using S3 to host static web pages or store objects used by other web pages can load content
securely by configuring an S3 bucket to explicitly enable cross-origin requests. Modern browsers use the Same Origin
policy to block JavaScript or HTML5 from allowing requests to load content from another site or domain as a way to help
ensure that malicious content is not loaded from a less reputable source (such as during cross-site scripting attacks).
With the Cross-Origin Resource Sharing (CORS) policy enabled, assets such as web fonts and images stored in an S3
bucket can be safely referenced by external web pages, style sheets, and HTML5 applications.

Our most common tool is Amazon S3, where we can keep encrypted files and depend on AWS to utilize TrueCrypt to ensure further encryption.

Getting the files to and from the server is actually quite easy:

 

static IAmazonS3 client;
using (client = new AmazonS3Client(Amazon.RegionEndpoint.USEast1)) 
{
    GetObjectRequest request = new GetObjectRequest 
    {
        BucketName = bucketName,
        Key = keyName
    };

    using (GetObjectResponse response = client.GetObject(request))  
    {
        string dest = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), keyName);
        if (!File.Exists(dest))
        {
            response.WriteResponseStreamToFile(dest);
        }
    }
}

That is an example of just getting the file down to the server.  What is ideal is to have the server bring it into a MemoryStream Object and then redirect it to the client.  This ensures that no information ever stays on the server itself.  By making the web servers entirely read-only, we reduce the risk of outsourced IT companies having access to hosted servers.  Additionally, we completely eliminate the need to synchronize load-balanced servers, keeping any dynamic information in cloud hosted environments.

 

 

More information can be found on the AWS Whitepaper

To compare, you can look at the Microsoft Azure Network Security Whitepaper (v2)

Article by MacGyver / Amazon

About MacGyver

I've worked with database systems for over 20 years, and started my own company in 2000. Almost all my business consists of internal database systems, either ERP or CRM. My programming is primarily in Angular / Microsoft C# and MS SQL.

About This Site

Morris Development has been specializing in internal database system design and integration since 1999. We provide long-term management and support of secure data systems for many businesses as well as developing the more complex code structures for ERP systems like Intellievent, Apidas, and AVMS.

This site is primarily for our developers to keep track up various technologies and updates that are used by Morris Development.

Training

Integrating Angular Microsite with .Net

Private Data Caching with Google Storage

Continuous Deployment for Production Releases?

Azure Websites – the perfect Angular host

Angular 2

  • Angular 2 Authentication
  • Angular Command Line Interface
  • Material Design for Angular
  • Using Observables in Angular 2

Mentors

  • Ben Nadel
  • Dan Wahlin
  • Deborah Kurata
  • John Papa

Staff

  • Dan Morris

Training

  • Google Development Courses
  • Microsoft Virtual Academy
  • PluralSight
  • Test Deep Links

© 2025 · Morris Development