Skip to main content
To create role-based users in Elasticsearch, authentication configuration must be done. Click for detailed information.

Basic Operations Performed in Apinizer

FunctionElasticsearch RoleDescription
Document indexing (API log writing)writeWriting log data to Elasticsearch
Document indexing (Audit log writing)writeWriting audit logs to index
Document indexing (Token log writing)writeWriting token logs to index
Document indexing (Application log writing)writeWriting application logs to index
Search operationsreadQuerying and searching log data
Get document operationsreadReading specific documents
Bulk operationswriteBulk data writing operations

Management Operations Available in Apinizer

FunctionElasticsearch RoleDescription
Creating/managing Index Lifecycle Policy (ILM)manage_ilmCreating and managing ILM policies
Deleting Index Lifecycle Policymanage_ilmDeleting ILM policies
Creating/Managing Index Templatemanage_index_templatesCreating and managing index templates
Creating new indices (with ILM/Rollover)create_index or more comprehensive manage (index level)Automatic or manual creation of new indices

Monitoring Operations Available in Apinizer

FunctionElasticsearch RoleDescription
Cluster health checkmonitorChecking cluster health status
Getting cluster statisticsmonitorReading cluster statistics
Getting node statisticsmonitorReading node statistics
Getting thread pool statisticsmonitorReading thread pool statistics
Getting index statisticsmonitorReading index statistics
CPU and disk usage ratesmonitorMonitoring system resource usage

Minimum Requirements (Log Writing/Reading Only)

These minimum requirements are sufficient only for basic log writing and reading operations.
  • write (to own indices)
  • read (to own indices)
The following roles are required to use features such as API proxy, ILM, Index Template, Monitoring, etc.
  • write (to own indices)
  • read (to own indices)
  • create (to own indices)
  • index (to own indices)
  • delete (to own indices)
  • monitor (to own indices)
  • manage (to own indices)
  • monitor (at cluster level)
  • manage_ilm (at cluster level)
  • manage_index_templates (at cluster level)

Example Role Configurations

Minimum Permission Role (Log Writing/Reading to Own Index, etc.)

Important Considerations in Apinizer Elasticsearch IntegrationWhen using the following minimum role, the Apinizer-Elasticsearch integration cannot be completed through the Apinizer interface. To complete this integration, Index templates and ILM policies must be created manually by an authorized Elasticsearch user. Click for detailed information.Also, with minimum permissions, some configurations that can normally be done through the interface will not be possible due to limited permissions (index rollover, etc.).
curl --request PUT \
  --url '<ELASTICSEARCH_ACCESS_URL>/_security/role/apinizer_basic?pretty=' \
  --header 'Authorization: Basic <BASE64_ENCODED_AUTH>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cluster": [
    "monitor"
  ],
  "indices": [
    {
      "names": ["apinizer-log-apiproxy-<INDEX_KEY>*"],
      "privileges": ["read", "write", "create", "index", "delete","monitor"]
    }
  ]
}'
curl --request PUT \
  --url '<ELASTICSEARCH_ACCESS_URL>/_security/role/apinizer_minimum_roles?pretty=' \
  --header 'Authorization: Basic <BASE64_ENCODED_AUTH>' \
  --header 'Content-Type: application/json' \
  --data '{
  "cluster": [
    "monitor",
		"manage_ilm",
		"manage_index_templates"
  ],
  "indices": [
    {
      "names": ["apinizer-log-apiproxy-<INDEX_KEY>*"],
      "privileges": ["read", "write", "create", "index", "delete","monitor","manage"]
    },
	{
      "names": [".monitoring-*", ".kibana*"],
      "privileges": ["read"]
	}
  ]
}'

Full Feature Role (All Management Operations)

curl --request PUT \
  --url '<ELASTICSEARCH_ACCESS_URL>/_security/role/apinizer_all_needed_roles?pretty=' \
  --header 'Authorization: Basic <BASE64_ENCODED_AUTH>' \
  --header 'Content-Type: application/json' \
  --data '{
   "cluster": [
  "monitor",
 	"manage_ilm",
 	"manage_index_templates",
 	"create_snapshot",
 	"monitor_snapshot"
   ],
   "indices": [
     {
       "names": ["apinizer-log-apiproxy-<INDEX_KEY>*"],
       "privileges": ["all"]
     },
 	{
   "names": [".monitoring-*", ".kibana*"],
   "privileges": ["read"]
 	}
 ]
}'

User Creation Example

curl --request POST \
  --url <ELASTICSEARCH_ACCESS_URL>/_security/user/apinizer_user \
  --header 'Authorization: Basic <BASE64_ENCODED_AUTH>' \
  --header 'Content-Type: application/json' \
  --data '{
    "password":"<PASSWORD>",
    "roles": ["apinizer_minimum_roles"],
    "full_name": "Apinizer Recommended User",
    "email": "<MAIL>"
  }'

Effects of Missing Roles on Apinizer

When you don’t give full permissions to the user you use to access Elasticsearch with Apinizer, some screen features are restricted. In this case, alternative solutions are possible.

Missing Cluster Privileges

Missing RoleEffect on ApinizerAlternative Solution
monitorCluster health check cannot be performed; CPU/disk usage cannot be viewed; Elasticsearch status is not shown on the dashboard.Use manual monitoring tools.
manage_ilmILM policies cannot be created from the Apinizer interface; Lifecycle management cannot be performed; Rollover operations do not work automatically.Create ILM policies manually. Click for detailed information.
manage_index_templatesIndex templates cannot be created from Apinizer; New indices may be created with incorrect configuration.Define templates manually. Click for detailed information.

Missing Index Privileges

Missing RoleEffect on ApinizerAlternative Solution
writeLog data cannot be written. API traffic is not recorded. Audit logs cannot be created.CRITICAL - Basic functions do not work.
readLog queries cannot be performed. Analytics screens remain empty. Reporting does not work.CRITICAL - Data analysis cannot be performed.
create_index or more comprehensive manageNew indices cannot be created. Initial setup cannot be completed (in ILM/rollover state).Manual index creation required

Recommendation: Gradual Permission Granting

  • Start: Establish integration with the roles you have determined.
  • When Needed: Add required roles one by one.
  • Test: Test the relevant Apinizer feature after each role is added.