Elasticsearch - SecurityWhich of the following is the correct JSON structure to define a role with read access to the index logs-2024?A{"cluster": ["all"], "indices": [{"names": ["logs-2024"], "privileges": ["monitor"]}]}B{"cluster": ["all"], "indices": [{"names": ["logs-2024"], "privileges": ["write"]}]}C{"cluster": ["read"], "indices": [{"names": ["logs-2024"], "privileges": ["write"]}]}D{"cluster": ["monitor"], "indices": [{"names": ["logs-2024"], "privileges": ["read"]}]}Check Answer
Step-by-Step SolutionSolution:Step 1: Check cluster privileges for read accessRead access to an index usually requires cluster privileges like 'monitor', not 'all' or 'read'.Step 2: Verify index privilegesThe index privileges must include 'read' for the specified index.Final Answer:{"cluster": ["monitor"], "indices": [{"names": ["logs-2024"], "privileges": ["read"]}]} -> Option DQuick Check:Cluster 'monitor' + index 'read' = correct role [OK]Quick Trick: Cluster 'monitor' + index 'read' grants read access [OK]Common Mistakes:MISTAKESUsing 'all' cluster privilege unnecessarilyConfusing 'write' with 'read' privilegesAssigning 'read' cluster privilege which is invalid
Master "Security" in Elasticsearch9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Elasticsearch Quizzes Cluster Management - Rolling upgrades - Quiz 5medium Cluster Management - Cluster health API - Quiz 13medium Cluster Management - Node roles (master, data, ingest) - Quiz 14medium Cluster Management - Why cluster health ensures reliability - Quiz 12easy Cluster Management - Shard allocation awareness - Quiz 5medium Kibana and Visualization - Visualization types - Quiz 5medium Kibana and Visualization - Discover for data exploration - Quiz 10hard Performance and Scaling - Cache management (query, request, field data) - Quiz 4medium Performance and Scaling - Hot-warm-cold architecture - Quiz 11easy Security - API key management - Quiz 8hard