[http metricbeat module] Enhance the http metricbeat module to support HTTP Digest Authentication
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 370
Description
**Describe the enhancement:**
The current http metricbeat module does not have support for [HTTP Digest Authentication](https://man7.org/linux/man-pages/man1/curl.1.html#:~:text=will%20be%20used.-,%2D%2Ddigest,-(HTTP)%20Enables%20HTTP). HTTP Digest Authentication is designed to be more secure than traditional digest authentication schemes. Many products expose their metrics on endpoints that use digest authentication, which can't be accessed using the current http metricbeat module.
**Describe a specific use case for the enhancement or feature:**
To create an [integration package for MongoDB Atlas](https://github.com/elastic/integrations/issues/3744) we need to access endpoints that require [HTTP Digest Authentication](https://www.mongodb.com/docs/atlas/reference/api/process-measurements/#:~:text=HTTP%20Digest%20Authentication).
For example if we try to access following endpoint [GET https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/processes/{HOST}:{PORT}/measurements](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/returnMeasurementsOfOneDiskForOneMongodbProcess:~:text=One%20MongoDB%20Process-,Returns,-measurements%20of%20the) we get following error.
`{
"error": 401,
"reason": "Unauthorized",
"detail": "You are not authorized for this resource."
}`
To accesses this endpoint we can perform following curl command.
`curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Content-Type: application/json" \
--include \
--request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{GROUP-ID}/processes/{HOST}:{PORT}/measurements?granularity=PT1M&period=PT1M&pretty=true"`
Contributor guide
Assessment
This issue has not been assessed yet.