Our internal clients wanted us to secure some of their resources stored in the media library so that only authenticated and authorized extranet users are able to view or download them. Our current setup has the following components, I'll simply focus on the 3rd and 4th points:
- Sharepoint Workflows on a Sharepoint 2007 Server. This serves as the working repository of the resource owners.
- Sitecore Sharepoint Integration Framework. This hooks up Sitecore with the designated document library in Sharepoint for all finalized files/documents
- Integration folder in the Media library
- Login page to handle the authentication
Create your login page.
You have the option to create your sublayout for this (mostly to control the page contents etc.) or you can just quickly create one and put it in one of your folders in your solution. I normally use CodeFile directive in my pages as we found it easier to maintain this type of setup in the long run. There are plenty of samples of the login functionality in the web.
The important thing to note when you start coding for your Login page's load event is that you would need to intercept Sitecore's default querystring for the return URL i.e. the "url" querystring.
Setup your media library security
This step assumes that you have already put in place the corresponding Roles on the extranet domain that will be given access to the secured media items.
Configure the folders by providing Read access with Inheritance to the corresponding extranet Roles.
Now, for the folders that would not be made or referenced for public pages, put an explicit Deny on the "extranet\Anonymous" account. Publish your changes.
Caveats
There is a bug in Sitecore that for some reason whenever a protected media file/item is requested, the "url" querystring is stripped even though the SaveRawUrl setting was turned on. Kindly contact your SC Support for a patch they provide regarding this issue.
Setup your media library security
This step assumes that you have already put in place the corresponding Roles on the extranet domain that will be given access to the secured media items.
Configure the folders by providing Read access with Inheritance to the corresponding extranet Roles.
Now, for the folders that would not be made or referenced for public pages, put an explicit Deny on the "extranet\Anonymous" account. Publish your changes.
Caveats
There is a bug in Sitecore that for some reason whenever a protected media file/item is requested, the "url" querystring is stripped even though the SaveRawUrl setting was turned on. Kindly contact your SC Support for a patch they provide regarding this issue.
Comments
Post a Comment