Commit 1c5531b
feat(storage): Add SigV4 authentication support for Elasticsearch/OpenSearch storage backends (#7611)
This PR enables Jaeger to use AWS Managed Elasticsearch/OpenSearch for
trace and metrics storage by adding SigV4 HTTP authentication support to
Elasticsearch and OpenSearch backends.
## Summary of changes
**Configuration**
- Add
`jaeger_storage.backends.<name>.<elasticsearch|opensearch>.auth_extension.authenticator`
to reference an OpenTelemetry HTTP authenticator extension by name
- Add
`jaeger_storage.metric_backends.<name>.<elasticsearch|opensearch>.auth_extension.authenticator`
for metric storage backends
**Elasticsearch/OpenSearch backends**
- Thread the resolved HTTP authenticator through the factory chain
(v1/v2 trace storage and metrics storage)
- Wrap the HTTP RoundTripper used by ES/OS clients with the extension's
RoundTripper (applies SigV4 signing when using `sigv4authextension` )
- Updated `GetHTTPRoundTripper()` to accept and apply the HTTP
authenticator
## Configuration example
```yaml
extensions:
sigv4auth:
region: us-east-1
service: es # or 'aoss' for OpenSearch Serverless
# credentials/assume-role configuration per the extension's documentation
service:
extensions: [sigv4auth]
jaeger_storage:
backends:
es-aws:
elasticsearch:
servers: ["https://my-domain.us-east-1.es.amazonaws.com/"]
auth_extension:
authenticator: sigv4auth
indices:
spans:
shards: 5
replicas: 1
metric_backends:
es-metrics:
elasticsearch:
servers: ["https://my-domain.us-east-1.es.amazonaws.com/"]
auth_extension:
authenticator: sigv4auth
```
## Implementation
- ES/OS backends now support optional HTTP authenticators via
`auth_extension.authenticator`
- The extension's RoundTripper wraps the base transport for SigV4
signing
- Supports trace and metrics storage for Elasticsearch 7.x/8.x and
OpenSearch
## Scope
- Adds authentication support to:
- Elasticsearch trace storage (v1 and v2)
- OpenSearch trace storage (v1 and v2)
- Elasticsearch metrics storage
- OpenSearch metrics storage
- Backward compatible - authentication is optional
## Related issue
Part of #7468
---------
Signed-off-by: SoumyaRaikwar <[email protected]>
Signed-off-by: Soumya Raikwar <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>1 parent fac4fea commit 1c5531b
File tree
16 files changed
+645
-116
lines changed- cmd/jaeger/internal/extension/jaegerstorage
- internal/storage
- elasticsearch/config
- integration
- metricstore/elasticsearch
- v1/elasticsearch
- v2/elasticsearch
16 files changed
+645
-116
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 54 | | |
73 | | - | |
74 | | - | |
| 55 | + | |
| 56 | + | |
75 | 57 | | |
76 | 58 | | |
77 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
Lines changed: 53 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| 196 | + | |
191 | 197 | | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
195 | | - | |
196 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
197 | 207 | | |
198 | 208 | | |
| 209 | + | |
199 | 210 | | |
| 211 | + | |
200 | 212 | | |
201 | 213 | | |
202 | 214 | | |
| |||
223 | 235 | | |
224 | 236 | | |
225 | 237 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | | - | |
239 | | - | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
243 | | - | |
| 245 | + | |
244 | 246 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
| 259 | + | |
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
261 | | - | |
262 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
263 | 270 | | |
264 | 271 | | |
| 272 | + | |
265 | 273 | | |
| 274 | + | |
266 | 275 | | |
267 | 276 | | |
268 | 277 | | |
| |||
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
308 | | - | |
309 | | - | |
| 317 | + | |
310 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
311 | 323 | | |
312 | | - | |
| 324 | + | |
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
| |||
318 | 330 | | |
319 | 331 | | |
320 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
0 commit comments