0
0
Elasticsearchquery~20 mins

Audit logging in Elasticsearch - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Audit Logging Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:00remaining
Purpose of Audit Logging in Elasticsearch

What is the main purpose of enabling audit logging in Elasticsearch?

ATo monitor cluster health and node resource usage
BTo track and record security-related events such as user authentication and access attempts
CTo automatically backup data to a remote location
DTo improve search query performance by caching frequent queries
Attempts:
2 left
💡 Hint

Think about what audit logs are generally used for in security contexts.

Configuration
intermediate
1:30remaining
Enabling Audit Logging in elasticsearch.yml

Which configuration snippet correctly enables audit logging for all events in Elasticsearch?

A
xpack.security.audit.enabled: true
xpack.security.audit.logfile.events.exclude: ["authentication_failed"]
B
xpack.security.audit.enabled: false
xpack.security.audit.logfile.events.include: ["access_denied"]
C
xpack.security.audit.enabled: true
xpack.security.audit.logfile.events.include: ["authentication_failed"]
D
xpack.security.audit.enabled: true
xpack.security.audit.logfile.events.include: ["*"]
Attempts:
2 left
💡 Hint

Look for the setting that enables audit logging and includes all events.

💻 Command Output
advanced
1:30remaining
Output of Audit Log Entry for Failed Login

Given audit logging is enabled, what is the expected key field value in the audit log entry when a user fails to login?

A"event.action": "authentication_failed"
B"event.action": "access_granted"
C"event.action": "cluster_health"
D"event.action": "index_created"
Attempts:
2 left
💡 Hint

Think about what action describes a failed login attempt.

Troubleshoot
advanced
2:00remaining
Troubleshooting Missing Audit Logs

You enabled audit logging in Elasticsearch but no audit logs appear in the log files. Which is the most likely cause?

AThe audit log file path is not writable by Elasticsearch process
BElasticsearch cluster is offline
CAudit logging is enabled but the log level is set too high, filtering out audit events
DThe index templates are missing
Attempts:
2 left
💡 Hint

Consider file permissions and where logs are written.

Best Practice
expert
2:30remaining
Best Practice for Managing Audit Log Size

What is a recommended best practice to manage the size and retention of Elasticsearch audit logs in a production environment?

AManually delete audit log files weekly from the file system
BDisable audit logging during peak hours to reduce log size
CConfigure log rotation and retention policies using Elasticsearch's built-in rollover and ILM (Index Lifecycle Management)
DStore audit logs only in memory to avoid disk usage
Attempts:
2 left
💡 Hint

Think about automated ways to keep logs manageable over time.