Bird
Raised Fist0

Identify the error in this role definition snippet for field-level security: {"field_security": {"fields": "title,author"}}

medium📝 Debug Q6 of Q15
Elasticsearch - Security
Identify the error in this role definition snippet for field-level security: {"field_security": {"fields": "title,author"}}
AField-level security does not use the 'fields' key
BThe key should be 'fields_security' instead of 'field_security'
CThere is no error; this is valid syntax
DFields should be an array, not a comma-separated string
Step-by-Step Solution
Solution:
  1. Step 1: Check field-level security syntax

    The 'fields' value must be an array of strings, not a single string.
  2. Step 2: Verify keys and values

    The key 'field_security' is correct; only the value type is wrong.
  3. Final Answer:

    Fields should be an array, not a comma-separated string -> Option D
  4. Quick Check:

    Fields must be array, not string [OK]
Quick Trick: Use array for fields, not string [OK]
Common Mistakes:
MISTAKES
  • Using string instead of array for fields
  • Changing correct key names
  • Assuming syntax is valid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes