DataSunrise Achieves AWS DevOps Competency Status in AWS DevSecOps and Monitoring, Logging, Performance

Elasticsearch Database Activity History

Elasticsearch Database Activity History

The Growing Importance of Data Audit in Modern Infrastructure

As data science tools and libraries become more user-friendly, data-driven insights become more accessible. Elasticsearch, a powerful search and analytics engine, processes millions of records daily. Therefore, maintaining an Elasticsearch database activity history of important server activities is essential for modern organizations.

Elasticsearch takes security seriously through multiple initiatives. They maintain an active bug bounty program on HackerOne, where security researchers can report vulnerabilities and receive compensation for their findings. The company regularly publishes security announcements and updates through their official security advisory portal, ensuring users stay informed about potential risks and fixes.

Did you know? Organizations face an average cost of $4.88 million per data breach in 2024. This makes proper audit trailing not just a security measure, but a financial necessity.

Basic Concepts of Elasticsearch Database Activity History

Elasticsearch offers built-in audit capabilities through its security features. These features track user actions, system changes, and data access patterns. The audit system monitors user authentication attempts and records all significant events within the database environment. Through careful tracking of index operations and document modifications, organizations can maintain a comprehensive database activity history. The system also logs search queries and configuration changes, providing a complete picture of database usage.

Getting Started with Elasticsearch Audit Trail

The audit capability in Elasticsearch comes as a trial feature. To explore these functions, you’ll need to activate the 30-day trial period (you can extend this period). During this time, you can test audit logging and user activity monitoring capabilities. This trial period helps organizations understand the basic security requirements of their Elasticsearch deployment.

I enabled audit and run the query like this (bat file for convinience):

@echo off
set "ELASTICSEARCH_URL=https://localhost:9200"
set "AUTH_CREDS=elastic:CsJZ*aYV-aUzw_8aH2Pm"
set "DOC={\"title\": \"My first document\", \"content\": \"This is some test content\", \"timestamp\": \"2024-10-22\"}"
curl --ca-native --ssl-no-revoke -X POST "%ELASTICSEARCH_URL%/test-index/_doc" ^
    -H "Content-Type: application/json" ^
    -u "%AUTH_CREDS%" ^
    -d "%DOC%"
pause

I got this audit output (6 events truncated):

{"type":"audit", "timestamp":"2024-10-22T19:22:23,034+0300", "cluster.uuid":"ScaTr0vuRoi1-jCkuiyk2A", "node.name":"DESKTOP-KO7CURP", "node.id":"DUwRyLqiRXWTW-RbD8JTcA", "host.ip":"127.0.0.1", "event.type":"ip_filter", "event.action":"connection_granted", "origin.type":"rest", "origin.address":"[::1]:63018", "transport.profile":".http", "rule":"allow default:accept_all"}
…
{"type":"audit", "timestamp":"2024-10-22T19:22:23,157+0300", "cluster.uuid":"ScaTr0vuRoi1-jCkuiyk2A", "node.name":"DESKTOP-KO7CURP", "node.id":"DUwRyLqiRXWTW-RbD8JTcA", "host.ip":"127.0.0.1", "event.type":"transport", "event.action":"access_granted", "authentication.type":"REALM", "user.name":"elastic", "user.realm":"reserved", "user.roles":["superuser"], "origin.type":"rest", "origin.address":"[::1]:63018", "request.id":"PRcjusZXQYGC1ff-sWTjeA", "action":"indices:admin/mapping/auto_put", "request.name":"PutMappingRequest"}

When you make a single document insertion request to Elasticsearch, it triggers multiple internal operations because Elasticsearch performs several steps to ensure proper data handling, security, and consistency. Here’s why you see 8 events:

  1. Connection check (ip_filter) – Basic network security
  2. User authentication (rest) – Verifying your credentials
  3. Index write permission – Checking if you can write to the index
  4. Bulk write operations (4 events) – Elasticsearch internally uses bulk operations even for single document insertions:
    • Initial bulk write permission
    • Bulk shard request
    • Bulk item creation
    • Bulk shard processing
  5. Mapping update – Automatic schema update for new document structure

This is normal behavior because:

  • Security checks happen at multiple levels (network, auth, permissions)
  • Writing data involves both the primary shard and replica shards
  • Document insertion may require schema/mapping updates
  • Elasticsearch optimizes single-document operations by using its bulk operation infrastructure

So while you made one API call, Elasticsearch performs multiple internal operations, and with audit logging set to “_all”, you see all these internal steps in the audit trail.

Limitations of Elasticsearch Database Activity History

While Elasticsearch database activity history provides basic security coverage, they come with notable constraints.

  • The monitoring capabilities focus on basic events without deep customization options.
  • From a data auditing perspective, the most relevant event for tracking who accessed/modified data would be only one. The other 7 events are more about internal Elasticsearch technical operations rather than meaningful audit trail of data access/modifications. If you want to focus purely on data auditing, you might want to modify the audit settings to only include specific events instead of “_all”.
  • The reporting tools, while functional, may not meet complex compliance requirements.
  • Organizations often need more comprehensive solutions for enterprise-level security and compliance needs.

Enhanced Audit Solutions: DataSunrise Database Security

DataSunrise offers a comprehensive approach to database security and audit. The platform operates in five distinct modes, each balancing feature availability with performance impact. This flexibility allows organizations to choose the perfect setup for their needs. The solution integrates seamlessly with existing infrastructure, minimizing disruption to ongoing operations.

Advanced Features and Performance

DataSunrise’s user-friendly web interface makes security management straightforward and efficient. The platform includes an innovative LLM-based security assistant, trained on extensive documentation and real support cases. This AI-powered tool provides intelligent suggestions and automated responses to security challenges. The multi-database support enables centralized security management across various database types.

The rule with query results logged looks as follows:

Query sent through DataSunrise proxy (port 9201):

@echo off
set "ELASTICSEARCH_URL=https://localhost:9201"
set "AUTH_CREDS=elastic:CsJZ*aYV-aUzw_8aH2Pm"
set "QUERY={\"query\":{\"match\":{\"content\":\"test content\"}}}"
curl --ca-native -k -X GET "%ELASTICSEARCH_URL%/test-index/_search" ^
     -H "Content-Type: application/json" ^
     -u "%AUTH_CREDS%" ^
     -d "%QUERY%"
pause

The audit trail for this transaction shows:

Clicking the ID reveals detailed information:

Best Practices for Implementation

Successful audit trail implementation requires careful planning and execution. Organizations should start by defining clear audit policies aligned with compliance requirements. Regular monitoring and review of audit logs helps identify potential security issues early. Setting up appropriate alert thresholds ensures quick response to suspicious activities. Maintaining proper documentation helps track security measures and demonstrate compliance.

Summary and Conclusions

Effective database activity monitoring stands crucial for modern organizations. While Elasticsearch offers basic audit capabilities through its trial program, comprehensive solutions like DataSunrise provide enhanced security features and better control. The choice between these options depends on organizational needs, compliance requirements, and security goals.

DataSunrise leads the industry with cutting-edge AI-based database security tools. Our platform offers flexible deployment options, comprehensive audit capabilities, and advanced security features. Experience the power of intelligent database security – visit DataSunrise.com for an online demo and see how we can strengthen your data protection strategy.

Next

Understanding Information Types: Data-Inspired Security in DataSunrise

Understanding Information Types: Data-Inspired Security in DataSunrise

Learn More

Need Our Support Team Help?

Our experts will be glad to answer your questions.

Countryx
United States
United Kingdom
France
Germany
Australia
Afghanistan
Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Bouvet
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo, Republic of the
Congo, The Democratic Republic of the
Cook Islands
Costa Rica
Cote D'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard Island and Mcdonald Islands
Holy See (Vatican City State)
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran, Islamic Republic Of
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Democratic People's Republic of
Korea, Republic of
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macao
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
North Macedonia, Republic of
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian Territory, Occupied
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russian Federation
Rwanda
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia and Montenegro
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Georgia and the South Sandwich Islands
Spain
Sri Lanka
Sudan
Suriname
Svalbard and Jan Mayen
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan, Province of China
Tajikistan
Tanzania, United Republic of
Thailand
Timor-Leste
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Venezuela
Viet Nam
Virgin Islands, British
Virgin Islands, U.S.
Wallis and Futuna
Western Sahara
Yemen
Zambia
Zimbabwe
Choose a topicx
General Information
Sales
Customer Service and Technical Support
Partnership and Alliance Inquiries
General information:
info@datasunrise.com
Customer Service and Technical Support:
support.datasunrise.com
Partnership and Alliance Inquiries:
partner@datasunrise.com