• Facebook
  • Twitter
  • Youtube
  • LinkedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Try NCache
  • Contact Us
Try NCache
Show / Hide Table of Contents

Security

NCache provides a security framework to protect cache server nodes through authentication, authorization, and encrypted communication. It supports LDAP/Active Directory-based user validation, role-based access for NCache operations, RSA-based credential exchange, and TLS encryption for secure communication. This multi-layered approach decouples administrative management from data-tier access, ensuring that only authenticated actors can interact with the cache while maintaining line-rate throughput.

Authentication and Authorization

NCache offers LDAP-integrated security to secure cache nodes. Once a node is secured, there are two access levels defined on that node:

  • Machine Level authorization: It is performed by an OS-level administrator on the target server.
  • NCache-level Authorization: This controls who can manage NCache and who can access secured caches.
Note

All the caches on a secured node are automatically secured.

An OS-level administrator, also referred to as a Machine Administrator, is a user who has local administrator privileges on the server machine. This user does not have to be an LDAP or Active Directory user. If the Machine Administrator is not added to NCache security, the user is not treated as a Node Administrator or Cache User. Such a user can only authorize enabling or disabling NCache security.

Once NCache security is enabled on a node, NCache uses registered security users to authorize management and cache operations. NCache supports the following types of security users:

  • Node Administrators
  • Cache Users
  • gMSA Cache Users

Security Configuration

The NCache Management Center allows you to select the server nodes to which a security configuration applies before configuring the domain controller and adding Node Administrators. You can add users or groups from different search bases by verifying each search base before searching for its entries. The domain controller settings and configured administrator identities are saved in security.ncconf, with each administrator's distinguished name identifying its location in the directory.

Machine Administrators

A Machine Administrator is an OS-level user with local administrator privileges on the server where NCache security is being enabled or disabled. This user is used to authorize security configuration changes at the machine level.

A Machine Administrator is not automatically granted NCache management or cache access rights. To perform NCache management operations after security is enabled, the user must also be added as a Node Administrator in NCache security.

If the Machine Administrator account cannot query the LDAP or Active Directory directory, you can provide separate directory browsing credentials to validate the Node Administrator identity.

Node Administrators

Node Administrators are Super-Users and have complete control over the cache - they can create, modify, remove caches, and perform any other cache management operations.

Cache Users

If you want to limit some users to cache API access only and prevent them from performing management operations, configure them as Cache Users. Cache Users can perform data operations including Add, Remove, Update, and Retrieve through the relevant APIs only.

If you do not want to define different access levels for your users and want all of them to perform all types of operations on the cache, there is no need to configure Cache Users, as Node Administrators already have the rights to manage and operate the cache.

gMSA Cache Users

NCache supports gMSA accounts as a special type of cache user for applications that operate under a Windows gMSA identity. Unlike standard LDAP users, gMSA accounts do not require a password to be provided or stored, instead, the NCache Client SDK automatically retrieves a Kerberos token from Windows at runtime, delegating authentication to Windows Authentication (SSPI/LSA) which obtains Kerberos tickets from the Kerberos Key Distribution Center (KDC). gMSA accounts can be added as cache users (not node administrators) and are authenticated against Active Directory the same way as standard LDAP users. The '$' suffix must be used when specifying the account name (e.g., user1gmsa$).

Note

gMSA accounts are supported as cache users only. gMSA support requires NCache 5.3.7 or above.

Credential Validation and Caching

NCache validates LDAP and Active Directory users through the configured domain controller. When a user or group is added to NCache security, NCache verifies that the identity exists in the directory.

If the domain controller is unavailable during validation, the operation fails and the user cannot be added or authenticated.

To reduce repeated authentication during the lifetime of a process, NCache provides Credential Caching. When enabled, credentials of an already authenticated user are cached by NCache so the user does not have to be authenticated repeatedly during the same process lifecycle.

Credential Caching is disabled by default. To enable it, set the NCacheServer.EnableCredentialCaching tag to True in the NCache Service configuration file.

Homogeneous Security Settings

All nodes in a cache cluster must have consistent security settings. A user or group configured as a Node Administrator on one node should have the same access on the other nodes in the cluster. Similarly, a Cache User on one node should be configured as a Cache User on the remaining nodes.

When configuring security through the NCache Management Center, first add the IP addresses of all participating nodes in the Select Nodes section. Then configure security and add the required administrators in Users/Groups Configuration. Clicking Save applies the configuration to all selected nodes.

If homogeneous security settings are not ensured on all nodes of a cluster, you may encounter different issues while managing and operating the cache.

Note
  • A secured node as the first node in a cache cluster should prevent the addition of vulnerable nodes.
  • A vulnerable node as the first node in a cache cluster shall prevent the addition of secured nodes.

Data Encryption

In distributed caching systems, communication mostly occurs over the network channels. The data travels and resides in the cache in its serialized form, and anyone eavesdropping on your connection can intercept your data easily if it is not encrypted. NCache Data Encryption allows for information to be converted into ciphertext. Only authorized people (i.e., with the appropriate key) can decipher the code and access the original information. NCache supports AES, 3DES, and AES FIPS Encryption algorithms.

Data Encryption Workflow

When you add data to the cache, it is encrypted on the client-side using the configured Encryption algorithm and Encryption key. The encrypted data is stored in the cache, ensuring that data remains secure. Now when the encrypted data is fetched, it is retrieved from the cache and decrypted on the client-side before usage. This end-to-end Encryption approach ensures that data remains protected, both in transit and at rest, making NCache a secure solution for caching sensitive information.

Encryption Key Management

Encryption key management in NCache involves securely handling all Encryption keys, including the Key Encryption Key (KEK), Data Encryption Key (DEK), and Credentials Encryption Key (CEK), as discussed below.

  • Key Encryption Key (KEK): The Key Encryption Key (KEK), based on AES 256 Encryption, secures the Data Encryption Key (DEK) by encrypting it. This key must be configured in the NCache Service configuration file on the server. To ensure consistency and security across all cache servers in a distributed environment, the same Key Encryption Key (KEK) must be used on each server.

  • Data Encryption Key (DEK): The Data Encryption Key (DEK) is responsible for encrypting user data before it is stored in the cache. This DEK is itself encrypted using the KEK. This approach ensures that only authorized tools or processes can retrieve and use Encryption keys.

  • Credentials Encryption Key (CEK): NCache encrypts the user credentials stored in the client configuration file (client.ncconf) using a Credential Encryption Key (CEK). This key must be configured in the NCache Service configuration file. Similar to KEK, the same Credentials Encryption Key (CEK) must be used on each server. This ensures consistency and secures client credentials effectively in distributed environments.

Key Exchange and Authentication Mechanisms for Management Tools

NCache employs advanced cryptographic techniques for secure key exchange and authentication for management tools, like NCache Management Center, PowerShell, etc., as discussed below.

Key Encryption Key Management

For management tools, the key exchange process involves generating an RSA-256 public/private key pair during the process's lifecycle. The tool shares its public key with the server. The server then encrypts the KEK using this public key and shares the encrypted KEK with the tool. The management tool decrypts the KEK using its private key. This RSA key pair remains valid only for the duration of the tool’s lifecycle, ensuring short-lived and secure exchanges. When User Access Control (UAC) is enabled, only authorized tools and clients are permitted to fetch the KEK from the server.

Credentials Encryption Key Management

The management tools fetch the CEK from the cache server using RSA-based secure key exchange. Similar to KEK management, the tool generates an RSA-256 public/private based key pair during its lifecycle. The public key is shared with the server, which encrypts the CEK using the tool’s public key and shares the encrypted CEK with the tool. The management tool then decrypts the CEK using its private key and uses it to encrypt user credentials in the client.ncconf file.

Key Exchange for Clients

Similarly, clients connect to the server and request the CEK using RSA-based secure key exchange. The server encrypts the CEK with the client’s public key, and the client decrypts it using its private key, enabling it to decrypt stored credentials in client.ncconf.

TLS Encryption

NCache supports Transport Layer Security (TLS) to encrypt communication between clients and cache servers, between cluster nodes, between caches and Bridges, and with management components. Unlike Data Encryption, which encrypts cached data, TLS protects communication while it travels over the network. NCache provides a unified TLS configuration for Windows and Linux using PEM-formatted certificates.

NCache supports two modes of transport security:

  • TLS: Encrypts communication and allows connecting clients to validate the NCache server certificate. Clients do not need to present their own certificates.
  • Mutual TLS (mTLS): Encrypts communication and requires both the server and connecting client to authenticate using certificates. Each endpoint must trust the CA that issued the other endpoint's certificate.

TLS Certificate Options

NCache supports the following server certificate options for TLS and mTLS:

  • NCache-provided certificates: NCache automatically generates a unique private key and certificate request on each server node, obtains a signed server certificate, and stores the certificate chain locally. Certificates follow the NCache Root CA → Customer Intermediate CA → Server Leaf Certificate hierarchy. NCache automatically checks certificate expiration every 12 hours and renews certificates when 30 days or fewer remain before expiration. Renewed certificates are loaded without restarting the server.
  • Custom certificates: You can provide a PEM file issued by your organization's Certificate Authority (CA). The file must contain the private key, server leaf certificate, and Intermediate certificates, in that order. The file must be accessible on each applicable server node, and the issuing Root CA must be trusted. Your organization is responsible for provisioning, protecting, and renewing these certificates.

For mTLS, connecting applications must also present a valid client certificate. You can generate an NCache-signed client certificate using the New-NCacheTlsCertificate PowerShell cmdlet or use one issued by your organization's CA. The client must trust the server certificate's issuing Root CA, and the server must trust the client certificate's issuing Root CA. For modern .NET clients, configure a PEM client certificate; .NET Framework clients support PFX certificates.

TLS Configuration and Restart Behavior

You can configure TLS and mTLS on selected server nodes through NCache Management Center or the Enable-NCacheTLS PowerShell cmdlet. Settings include the certificate source, TLS protocol version (TLS 1.2, TLS 1.3, or Auto), and whether client certificates are required. NCache stores these settings in tls.ncconf.

Enabling, disabling, or changing TLS settings requires affected components to reload their configuration. After confirmation, NCache Management Center and the TLS PowerShell cmdlets automatically restart running caches and the applicable execution and Bridge components. The NCache Service reloads TLS settings without requiring a restart. A client application generally reconnects without restarting for TLS alone; with mTLS, restart the application if it must load a newly added or changed client certificate path or password.

For certificate trust, configuration steps, PowerShell examples, and restart details, see Configure TLS Encryption in Windows and Linux.

HTTPS for NCache Management Center

Similar to TLS, HTTPS (Hypertext Transfer Protocol Secure) is a widely used protocol to secure communication over a network. As such, NCache supports HTTPS for NCache Management Center in Windows and Linux using TLS certificates.

In This Section

User Security
Explains how to configure the Security for nodes and caches.

gMSA
Describes how to add a gMSA cache user or group using the NCache Management Center and PowerShell commands.

TLS
Describes how to enable and configure SSL Encryption for cache in Windows and Linux.

Encryption
Describes how to enable and configure Encryption for cache.

HTTPS for NCache Management Center
Describes how to enable and configure HTTPS for NCache Management Center.

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Try NCache
Pricing
NCache Playground

Deployments
  • Cloud
  • Docker
  • Kubernetes
  • On-Premises
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • SignalR Backplane
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Blogs
  • Foundations
  • Videos
  • Comparisons
  • Shows
  • Whitepapers
  • Articles
  • Tech Talks
  • Magazine Articles
  • Third-Party Articles
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Docs
  • Schedule a Demo
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Terms of Use
  •  
  • Privacy Policy
  •  
  • Cookie Policy
© Copyright Alachisoft 2002 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
  • Facebook
  • Twitter
  • Youtube
  • LinkedIn
  • RSS