Security Profiles
In order to protect your data, Smartsite has a completely new security model. It is a role based model that allows you to specify different credentials for each role in your system. These credentials are used to e.g. access your database or files on your disk. Every request that is made takes place using the credentials specified for that role such that a site administrator or editor can have e.g. read and write rights in your system while a site visitor can have only read access to your database and files.
We'll start with the security profile element in the Smartsite.Security.Config file which you can find in your site root. A security profile defines a set of credentials and specifies to which roles these credentials apply.
Here you can see an example of three defined security profiles, each being assigned to different roles. As you can see below, users in the Site Visitor role are using a readonly reference to the database whereas editors and the System Administrator also have write access. The asteriks (*) in the security profile Visitor means that any role that is not explicitly mapped to a security profile, is mapped to this role. Example of a Smartsite.Security.config securityprofiles section:
XML | Copy Code |
---|---|
<securityprofiles> <profile id="Visitor" userroles="VISITOR,*"> <database ref="MySiteReadOnly"/> <impersonate windowsaccount="Guest"/> </profile> <profile id="User" userroles="EDITOR"> <database ref="MySite"/> <impersonate windowsaccount="User"/> </profile> <profile id="System Administrator" userroles="ADMINISTRATOR"> <database ref="MySite"/> <impersonate windowsaccount="SystemUser"/> </profile> </securityprofiles> |
XML | Copy Code |
---|---|
<databases> <database id="Falcon"> <connectionstring>Provider=SQLOLEDB.1;Password=12345;Persist Security Info=True;UserID=FalconAdmin;Initial Catalog=Falcon;Data Source=MyServer</connectionstring> <schema ref="Smartsite,MyObjects"/> </database> <database id="FalconReadOnly"> <connectionstring>Provider=SQLOLEDB.1;Password=55555;Persist Security Info=True;UserID=FalconReadOnlyAccount;Initial Catalog=Falcon;Data Source=MyServer</connectionstring> <schema ref="Smartsite,MyObjects"/> </database> <schemas> <schema id="Smartsite">... </schema> </schemas> </databases> |
XML | Copy Code |
---|---|
<windowsaccounts> <windowsaccount id="Guest" password="12345" username="FalconTestGuest" domain="mycompany" /> <windowsaccount id="User" password="12345" username="FalconTestUser" domain="mycompany" /> <windowsaccount id="SystemUser" password="12345" username="FalconTestAdmin" domain="mycompany" /> </windowsaccounts> |