Hosting Your Content In The Cloud

Unzipping Courses to S3

If you are letting Engine handle the management of your course zip files, but you want them to be saved to S3 rather than a content server, you can configure Engine to treat your S3 bucket like a file store.

To use Engine's S3 support, you'll need to specify the value of FilePathToContentRoot to RusticiSoftware.ScormContentPlayer.Logic.DataAccess.FileStorage.S3StreamingFileStore|RusticiSoftware.ScormEngineRusticiSoftware.ScormContentPlayer.Logic.DataAccess.FileStorage.S3StreamingFileStore and include the following parameters:

  • AWS Key
  • AWS Secret
  • AWS region
  • bucket
  • prefix

For example:

RusticiSoftware.ScormContentPlayer.Logic.DataAccess.FileStorage.S3StreamingFileStore|RusticiSoftware.ScormEngine, AWS_key, AWS_secret, us-east-1, rustici-tests, engine-content/${TenantName}/

RusticiSoftware.ScormContentPlayer.Logic.DataAccess.FileStorage.S3StreamingFileStore, AWS_key, AWS_secret, us-east-1, rustici-tests, engine-content/${TenantName}/

If you want to also store your xAPI documents on the cloud, you can set the value for xAPIFilesPath in the same way. However, you should not set FilePathToUploadedZipFile to use an S3 bucket. FilePathToUploadedZipFile is only used as a temporary location for your zip files during the upload process, and the files will be promptly removed at the conclusion of your course's import. Setting this location to use S3 can slow down your import process due to the increased network activity necessary for moving the course files around.

If you are using a cloud storage solution other than S3 that is inconvenient to mount as a file store on your server, reach out to the Rustici support staff for more information on this solution. We offer an interface call IStreamingFileStore that can be implemented by your team. S3StreamingFileStore is an implementation of this interface that ships with Engine for the convenience of our S3-reliant customers, but the interface can be used to interact with just about any cloud storage you would need.

Note:

  • You may have noticed that ${TenantName} is included in the example prefix. This is crucial for multi-tenant installations. Engine does not examine the parameters passed in to verify a unique store is set up for each tenant, it's up to you to make sure a unique file store location is established for each tenant.
  • When content is stored on something like S3, cross-domain restrictions still apply, so a proxy solution (such as CloudFront) is needed if you are hosting your player on a different domain than your S3 bucket.

Content Authentication (CloudFront support)

Engine supports adding content authorization cookies via ContentAuthCookieFactory. We provide an implementation for use with Amazon CloudFront. To use Engine's CloudFront support, specify the class 'RusticiSoftware.ScormContentPlayer.Logic.Utilities.CloudFrontCookieFactory`, and the following parameters:

  • path to private key .pem file
  • key pair id
  • seconds for which authorization is valid

Example for CloudFront authorization cookies that will expire in 8 hours:

RusticiSoftware.ScormContentPlayer.Logic.Utilities.CloudFrontCookieFactory, /fullpath/to/privatekey.pem, keyPairId, 480

If your application launches Engine's player within an iframe, you might run into issues with the cookies produced by this factory being considered third party cookies and blocked by some browsers. This type of issue can be circumvented by sending your learner's browser to a page within Engine that will set a placeholder cookie and transparently redirect them to whatever URL you specify. After this page has been loaded in the top-level window, the user's browser will no longer treat cookies set by Engine as third party cookies because the user has visited Engine directly, indicating to the browser that Engine is a trustworthy source.

To do this, send your learners to /SetCookiesAndRedirect.(jsp|aspx) and pass a URL-encoded web path that you would like the learner to be redirected to as the query parameter redirectUrl. Here is an example of a learner's launch link being directed through this page: http://example.com/ScormEngineInterface/SetCookieAndRedirect.jsp?redirectUrl=https%3A%2F%2Fexample.com%2Fexample%2Fweb%2Fpath

Note:

  • When using content authorization cookies, ideally CourseDirectoryNamingMethod should be set to ApiCourseId and all content would be imported via the API. If not, most content will work properly but Engine will be unable to calculate the appropriate path for multi-AU AICC content (and authorization cookies will not be set for such content).
  • Cross-domain cookies cannot be set. So even if other cross domain issues are solved, the content must be served from the same domain as Engine.

results matching ""

    No results matching ""