Challenge - 5 Problems
Elasticsearch Authentication Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this Elasticsearch authentication request?
Given the following Elasticsearch request using basic authentication, what will be the HTTP status code in the response if the credentials are correct?
Elasticsearch
GET /_security/_authenticate
Attempts:
2 left
💡 Hint
Successful authentication returns HTTP 200 OK.
✗ Incorrect
When the username and password are correct, Elasticsearch returns HTTP status 200 indicating successful authentication.
❓ Predict Output
intermediate2:00remaining
What error does this Elasticsearch request raise with missing authentication header?
What error will Elasticsearch return if you send a request to a secured cluster without any authentication header?
Elasticsearch
GET /_cluster/health
Attempts:
2 left
💡 Hint
Missing authentication usually results in 401 Unauthorized.
✗ Incorrect
Elasticsearch secured clusters require authentication. Without credentials, it returns 401 Unauthorized.
🧠 Conceptual
advanced2:00remaining
Which authentication method is supported natively by Elasticsearch for REST API?
Elasticsearch supports several authentication methods. Which one is supported natively for REST API calls without plugins?
Attempts:
2 left
💡 Hint
Elasticsearch supports basic authentication out of the box.
✗ Incorrect
Elasticsearch natively supports Basic Authentication using username and password for REST API calls. Other methods require plugins or external systems.
❓ Predict Output
advanced2:00remaining
What is the output of this API key authentication request?
Given this curl command using an API key for authentication, what will be the HTTP status code if the API key is invalid?
Elasticsearch
curl -H 'Authorization: ApiKey invalid_api_key' -X GET 'https://localhost:9200/_security/_authenticate'
Attempts:
2 left
💡 Hint
Invalid API keys cause 401 Unauthorized errors.
✗ Incorrect
If the API key is invalid, Elasticsearch returns 401 Unauthorized indicating authentication failure.
🚀 Application
expert2:00remaining
How many roles are assigned to the user after this authentication response?
Given this Elasticsearch authentication response JSON, how many roles does the authenticated user have?
Elasticsearch
{
"username": "admin",
"roles": ["superuser", "monitoring_user", "kibana_user"],
"full_name": "Admin User",
"email": "admin@example.com",
"metadata": {},
"enabled": true
}Attempts:
2 left
💡 Hint
Count the items in the roles array.
✗ Incorrect
The roles array contains three strings, so the user has 3 roles assigned.