Bird
Raised Fist0

How can you programmatically revoke all API keys created by a specific user using Elasticsearch API?

hard🚀 Application Q9 of Q15
Elasticsearch - Security
How can you programmatically revoke all API keys created by a specific user using Elasticsearch API?
ADelete the user account to revoke all keys automatically
BManually delete each API key by its ID one by one
CUse the create API key endpoint with an empty body to revoke keys
DCall the invalidate API key endpoint with a query filtering by "username"
Step-by-Step Solution
Solution:
  1. Step 1: Understand API key invalidation options

    Elasticsearch allows invalidating keys by filters like username.
  2. Step 2: Evaluate options

    Call the invalidate API key endpoint with a query filtering by "username" correctly uses the invalidate endpoint with a filter; others are incorrect or inefficient.
  3. Final Answer:

    Call the invalidate API key endpoint with a query filtering by "username" -> Option D
  4. Quick Check:

    Use filter by username to revoke all keys [OK]
Quick Trick: Use invalidate API with username filter to revoke keys [OK]
Common Mistakes:
MISTAKES
  • Thinking deleting user revokes keys automatically
  • Using create API key endpoint to revoke keys
  • Manually deleting keys is inefficient

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes