Elasticsearch Security Guidelines - Multi-tenant Deployments

Best practices for Elasticsearch for Cortex XSOAR Multi-tenant deployments. Multi-tenant security.
It is recommended that you implement these suggested best practices to secure tenant accounts that use Elasticsearch indexes. This is applicable for multi-tenant environments.
This feature allows for automatic user management in Elasticsearch for tenants, to ensure complete data segregation for multiple tenants in a single Elasticsearch cluster.
If you instead use your own Elasticsearch credentials, we recommend disabling this feature to prevent any mismatches.

How it works

Due to Elasticsearch security limitations, tenants do not generate an API key using the main/host configuration. They will always generate a user name, role, and password per tenant.
API key
If there is no API key on the main/host configuration, you can force create an API key for a tenant by setting
"Security.elasticsearch.apikey":true
. However, it will not create an API key if the main/host account is configured with an API key due to https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.6.html#_elasticsearch_api_key_privileges.
User name, role, and password
When you create or restart a tenant account, Cortex XSOAR checks if the role and user for the tenant already exists (based on the tenant name). If the role and user don't exist, they are created. The user is created with a 32-character password that contains capital letters, lower-case letters, numbers, and special characters.
The password is then stored in the configuration file and encrypted using the route
/encrypt/
.

Enable security features in Elasticsearch

In order to automatically generate unique credentials for each tenant account's index, in your
elasticsearch.yml
file, you need to add the following key:
xpack.security.enabled: "true"
. The
elasticsearch.yml
is the Elasticsearch service configuration file. It is not stored in the demisto folder and can exist in varied places.
If you do not enable XPack security, the tenant accounts will inherit the credentials of the main account. You can still create or restart a tenant account but will receive the following warning:
security (xpack) is not active. Will not set account user. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node

Disable security features

If you enabled security features in Elasticsearch, you can create a server configuration in Cortex XSOAR that will override and disable the security features.
  1. Go to
    Settings
    About
    Troubleshooting
    .
  2. In the
    Server Configurations
    section click
    Add server configuration
    .
    Security.elasticsearch.account: false

Recommended For You