NCache 4.4 - Online Documentation

Configuring Security for Cache

 
Security can also be configured on cache itself. This can be done as follow:
 
Using NCache Manager
 
  • Open NCache Manager.
  • Go to Security menu option and select Security Credentials option.
 
 
  • Security Credentials dialog will open.
 
 
  • Provide the valid credentials for your active directory like name of Domain Controller, Port (optional), User Name and Password.
 
 
  • Click on the Verify Credentials button. It will prompt success or failure messages. If provided security credentials are correct then it will display the success message like this:
 
 
  • Click OK.
  • Click the cache name for which you want to configure the security. Cache settings open in the right pane inside the NCache Manager.
  • Go to the Security tab in cache settings.
 
 
  • Expand the domain users under the Available Domain Users section.
 
 
  • Add required users to Selected Users section using ‘>’ button. These users will have access for cache operations.
 
  • Check Enable Security check box.
 
 
  • Select users from the users list and then add the required users using ‘>’ button. These users will be allowed to manage the caches.
 
 
  • Check the Enable Security checkbox to enable the security.
  • Right click on the cache name in Cache Explorer and select Apply Configuration option.
 
 
Using Command Line Tool
 
  • Open command prompt
  • Go to the NCache tools directory: cd %NCHOME%/bin/tools
  • Use configurecachesecurity.exe, provide the required information:  
configurecachesecurity demoClusteredCache /E /s 20.200.21.95 /U james_tredwell /P yourpassword /C yourdomain.org
  • Hit ENTER key, it will enable security for demoClusteredCache on server 20.200.21.95 and add the user james_tredwell.
  • If you want to add more users, use the following command after step 2:
  configurecachesecurity demoClusteredCache /A /N aaron_finch /s 20.200.21.95 /U  administrator /P yourpassword /C   yourdomain.org
  • Hit ENTER key. It will add the user aaron_finch to the secured users list of demoClusteredCache.
 
 
How to pass Security Credentials to API:
 
User can also pass security credentials to API from the application using the following code:
 
NCache.InitializeCache("cacheId", new Alachisoft.NCache.Web.Security.SecurityParams("Username", "Password"), null);
 
 
See Also