{"id":199,"date":"2009-06-22T08:43:32","date_gmt":"2009-06-22T12:43:32","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/brandonhaynes\/?p=199"},"modified":"2009-06-22T08:46:53","modified_gmt":"2009-06-22T12:46:53","slug":"released-dotnetnuke-amazon-s3-folder-integration-providers","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/2009\/06\/22\/released-dotnetnuke-amazon-s3-folder-integration-providers\/","title":{"rendered":"Beta Release: DotNetNuke Amazon S3 Folder Integration Providers"},"content":{"rendered":"<p>I am pleased to announce a <a href=\"http:\/\/dnnamazons3.codeplex.com\/\">beta release<\/a> of my\u00a0<a href=\"http:\/\/aws.amazon.com\/s3\">Amazon S3<\/a> integration authorization and data providers. \u00a0It may be downloaded via CodePlex on its <a href=\"http:\/\/dnnamazons3.codeplex.com\/\">project homepage<\/a>. \u00a0As is all of my DotNetNuke work, this project is fully open-source and available under a liberal <a href=\"http:\/\/dnnamazons3.codeplex.com\/license\">BSD license<\/a>.<\/p>\n<p>The\u00a0<a class=\"externalLink\" href=\"http:\/\/www.dotnetnuke.com\/\">DotNetNuke web application framework<\/a> offers multiple file persistence options out-of-the-box, including file-system storage (both unsecured and secured by ACL), along with ACL-secured database storage. When creating a link to a resource, the DotNetNuke UI provides a convenient list of these files, and also allows direct input of arbitrary URI.<\/p>\n<p>However, there exists no ready method by which an administrator might link to a known set of files persisted external to the installation. While direct URI input might be used here, it requires knowledge of these data, and does not allow for enumeration and management of the external objects themselves.<\/p>\n<p>This project attempts to bridge that gap by integrating resources persisted on the Amazon S3 into the DotNetNuke framework. Resources stored there are enumerable via the File Manager and selectable via the URL control. Throughout the core framework, these external resources are treated identically to database-secured resources, including observance of Amazon S3 ACL, automatic synchronization, and (reasonably friendly) 301 Redirects to the Amazon S3 when accessed via LinkClick.aspx.<\/p>\n<p>This is effectuated via customization of two providers: authorization and data. The authorization provider integrates Amazon S3 ACLs for external resources, and the data provider allows enumeration of and details about the external resources themselves.<\/p>\n<p><!--more--><\/p>\n<h2>Project Goals<\/h2>\n<ul>\n<li>Integration with the\u00a0<a class=\"externalLink\" href=\"http:\/\/aws.amazon.com\/s3\">Amazon S3<\/a> for data storage external to the DotNetNuke framework.<\/li>\n<li>Seamless integration into the DotNetNuke UI, both at the File Manager and URL controls. For example:\n<ul>\n<li>Amazon S3 objects should appear in the File Manager just like any other internal files,<\/li>\n<li>Amazon S3 objects should appear in the core URL control, and<\/li>\n<li>Insofar as is feasible, Amazon S3 files should be indistinguishable from their secured storage counterparts.<\/li>\n<\/ul>\n<\/li>\n<li>No external Amazon S3 UI or kludgy link generation<\/li>\n<li>Whenever possible, utilization of 301 Redirects to Amazon S3 resource URIs.<\/li>\n<li>Full observance of the external Amazon S3 bucket ACLs.<\/li>\n<li>Require no core changes and utilize only existing DotNetNuke extension points<\/li>\n<\/ul>\n<h2>Configuration and Usage<\/h2>\n<p>After installation, two new profile properties will be automatically created across all portals:<\/p>\n<ul>\n<li>S3Key, and<\/li>\n<li>S3Secret<\/li>\n<\/ul>\n<p>The names of these properties may be changed in the web.config near the configuration\/dotnetnuke\/permissions node). To enable a portal for Amazon S3 integration, the key and secret\u00a0<strong>for the portal administrator<\/strong> must be configured with valid values.<\/p>\n<p>Any user may submit his or her own key and secret information at the profile level; these data will be used to circumscribe the set of available Amazon S3 objects for that user.<\/p>\n<p>After a portal&#8217;s administrator account is configured with a valid Amazon S3 key and secret, the file manager will display those buckets and objects stored on the service:<\/p>\n<div id=\"attachment_133\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-133\" href=\"http:\/\/blogs.law.harvard.edu\/brandonhaynes\/2009\/06\/08\/preview-amazon-s3-integration-dodnn-conference\/amazon-s3-teaser\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-133\" class=\"size-medium wp-image-133\" src=\"http:\/\/blogs.law.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-teaser-300x167.png\" alt=\"A screenshot demonstrating Amazon S3 cloud-based integration on the DotNetNuke platform\" width=\"300\" height=\"167\" srcset=\"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-teaser-300x167.png 300w, https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-teaser-1024x570.png 1024w, https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-teaser.png 1063w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-133\" class=\"wp-caption-text\">A screenshot demonstrating Amazon S3 cloud-based integration on the DotNetNuke platform<\/p><\/div>\n<p>The list of available buckets will be circumscribed by the permissions granted by the administrator&#8217;s S3 account. Because DotNetNuke does not support file-level ACLs, objects within an Amazon S3 bucket are assumed to have an ACL identical to that present on the bucket itself (though a more restrictive policy will still be enforced by the S3 service).<\/p>\n<p>Similarly, the DotNetNuke URL control will display a list of buckets accessible by the accessing user, and allow selection of the objects therein:<\/p>\n<div id=\"attachment_172\" style=\"width: 304px\" class=\"wp-caption aligncenter\"><a rel=\"attachment wp-att-172\" href=\"http:\/\/blogs.law.harvard.edu\/brandonhaynes\/2009\/06\/16\/presentation-materials-advanced-authorization-in-dotnetnuke\/amazon-s3-uri-teaser\/\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-172\" class=\"size-medium wp-image-172\" src=\"http:\/\/blogs.law.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-uri-teaser-294x300.png\" alt=\"Amazon S3 Demonstration Displaying URI Selection\" width=\"294\" height=\"300\" srcset=\"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-uri-teaser-294x300.png 294w, https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/files\/2009\/06\/amazon-s3-uri-teaser.png 565w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/a><p id=\"caption-attachment-172\" class=\"wp-caption-text\">Amazon S3 Demonstration Displaying URI Selection<\/p><\/div>\n<h2>Discussion<\/h2>\n<h3>Overall Authorization Model<\/h3>\n<p>There are a number of areas in which the authorization policy enforced by the provider might be improved. In its current form it is minimally complete, but could easily be made more robust and sensitive to user context (in particular, no attempt is made to deal with Amazon S3 user-specific ACL assignment). The provider is largely aimed at objects intended to be made available to &#8220;everyone.&#8221;<\/p>\n<h3>File-based ACLs<\/h3>\n<p>DotNetNuke does not support file-based ACLs, but these are allowed and enforced by the Amazon S3 service.<\/p>\n<h3>Generated URIs<\/h3>\n<p>The 301 redirect URIs created by the data provider are not per-user, and thereby require read-permission on the &#8220;everyone&#8221; group for the S3 object in question. A stronger model might generate a valid read URI for the accessing user, so long as that user has read permissions on the object itself.<\/p>\n<h3>C<span style=\"text-decoration: line-through\">R<\/span>UD<\/h3>\n<p>Only read access is implemented for Amazon S3 buckets and objects; while it remains quite straightforward to implement the other access characteristics, these are left to the (many) other <a href=\"http:\/\/www.google.com\/search?q=amazon+s3+managers\">S3 managers<\/a> that exist for these purposes.<\/p>\n<h3>Shared secret storage<\/h3>\n<p>Shared secrets are stored in plain-text on a user&#8217;s profile; this is generally a horrible security policy (Alex Shirley will certainly yell at me for doing this after I strongly discouraged him from doing so in a similar project). Because federated authentication is not possible with the Amazon S3 service, this secret cannot be made application-specific and must be stored <em>somewhere<\/em>. \u00a0The solution here is an encrypted profile property type; this is clearly outside the scope of this project, but is on my radar for a future complimentary project.<\/p>\n<h3>Performance<\/h3>\n<p>A number of internal operations are O(n*m). While some of these are cached by the underlying DotNetNuke framework, the integration implementation itself could be improved via additional caching and lookup tables.<\/p>\n<h2>Your Feedback is Needed!<\/h2>\n<p>As this project moves toward an initial production release, it will rely heavily on the feedback provided by the community. \u00a0Any such feedback &#8212; including comments, ratings, and constructive criticism &#8212; is greatly appreciated.<\/p>\n<p>B<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am pleased to announce a beta release of my\u00a0Amazon S3 integration authorization and data providers. \u00a0It may be downloaded via CodePlex on its project homepage. \u00a0As is all of my DotNetNuke work, this project is fully open-source and available under a liberal BSD license. The\u00a0DotNetNuke web application framework offers multiple file persistence options out-of-the-box, [&hellip;]<\/p>\n","protected":false},"author":1933,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3062,6152,142],"tags":[6154,6253,6153,4329,3070,19470,6155,6254,6101,593],"class_list":["post-199","post","type-post","status-publish","format-standard","hentry","category-dotnetnuke-dnn-content-management-system","category-security-technology","category-technology","tag-6154","tag-amazon-s3","tag-authorization","tag-cloud-computing","tag-dotnetnuke","tag-dotnetnuke-dnn-content-management-system","tag-dotnetnuke-51","tag-dotnetnuke-integration","tag-provider","tag-security"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/posts\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/users\/1933"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":29,"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/posts\/199\/revisions\/248"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/brandonhaynes\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}