0
0
Elasticsearchquery~20 mins

Authentication basics in Elasticsearch - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Elasticsearch Authentication Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2: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
A403
B401
C200
D500
Attempts:
2 left
💡 Hint
Successful authentication returns HTTP 200 OK.
Predict Output
intermediate
2: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
A401 Unauthorized
B200 OK
C403 Forbidden
D404 Not Found
Attempts:
2 left
💡 Hint
Missing authentication usually results in 401 Unauthorized.
🧠 Conceptual
advanced
2: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?
ABasic Authentication with username and password
BOAuth 2.0 Bearer Tokens
CSAML Single Sign-On
DAPI Key with JWT signature
Attempts:
2 left
💡 Hint
Elasticsearch supports basic authentication out of the box.
Predict Output
advanced
2: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'
A400 Bad Request
B200 OK
C403 Forbidden
D401 Unauthorized
Attempts:
2 left
💡 Hint
Invalid API keys cause 401 Unauthorized errors.
🚀 Application
expert
2: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
}
A4
B3
C1
D0
Attempts:
2 left
💡 Hint
Count the items in the roles array.