You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add API Key Authentication Support for Elasticsearch Storage (#7402)
<!--
!! Please DELETE this comment before posting.
We appreciate your contribution to the Jaeger project! ππ
-->
## Which problem is this PR solving?
part of
- #7225
## Description of the changes
- Adds API key authentication support to Elasticsearch storage backend
alongside existing basic and bearer token authentication.
- It is part of the planned work to add support for API authentication,
as discussed in
#7230 (comment)
### Changes
- Added new authentication method -` APIKeyAuthentication` struct to
support API key-based auth alongside existing basic/bearer token methods
- Dual source support - API keys can be loaded from files OR extracted
from request context
- Hot reloading - File-based API keys automatically reload at
configurable intervals (default 10s, 0 disables)
- New command flags - Added` --es.api-key-file`,
`--es.api-key-allow-from-context`, `--es.api-key-reload-interval`
- Flexible config - Optional `APIKeyAuthentication` struct with file
path, context flag, and reload interval
- New context module - Created `apikey-context.go `with` GetAPIKey()
`and `ContextWithAPIKey()` functions
- Conditional logic - Health check disabled when` AllowFromContext=true`
AND `FilePath=""` for both bearer tokens and API keys
## How was this change tested?
- make test-ci
- make lint
## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
- for `jaeger`: `make lint test`
- for `jaeger-ui`: `npm run lint` and `npm run test`
---------
Signed-off-by: danish9039 <[email protected]>
0 commit comments