Bird
Raised Fist0

Why does this role fail to grant write access? { "indices": [{"names": "user-data", "privileges": ["write"]}] }

medium📝 Debug Q7 of Q15
Elasticsearch - Security
Why does this role fail to grant write access? { "indices": [{"names": "user-data", "privileges": ["write"]}] }
ARole must include "run_as" to grant write
B"privileges" cannot include "write"
CMissing cluster privileges causes failure
D"names" should be an array, not a string
Step-by-Step Solution
Solution:
  1. Step 1: Check the "names" field type

    "names" must be an array even if only one index is specified.
  2. Step 2: Confirm "privileges" and other keys

    "write" is a valid privilege; cluster privileges and "run_as" are not required for write.
  3. Final Answer:

    "names" should be an array, not a string -> Option D
  4. Quick Check:

    Index names must be arrays in role definitions [OK]
Quick Trick: Always use arrays for index names, even single entries [OK]
Common Mistakes:
MISTAKES
  • Using string instead of array for index names
  • Assuming cluster privileges needed for index write

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes