Commit 91891f1
committed
fix(async-watcher): forward auth metadata to GetConfig and Subscribe
AsyncConfigClient cannot use channel interceptors, so it injects auth
metadata per-call via self._metadata(). AsyncConfigWatcher was not
receiving this metadata, causing both the initial GetConfig snapshot
and the Subscribe streaming call to omit auth headers. Auth-enabled
servers rejected the Subscribe with UNAUTHENTICATED.
Added a metadata parameter to AsyncConfigWatcher.__init__ and thread
it through both _load_snapshot and _subscribe_loop. Updated
AsyncConfigClient.watch() to pass self._metadata(). Added a unit test
asserting that both gRPC calls receive the correct metadata tuples.
Co-Authored-By: Claude <noreply@anthropic.com>
Closes #481 parent e546392 commit 91891f1
3 files changed
Lines changed: 44 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
136 | 143 | | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| |||
193 | 201 | | |
194 | 202 | | |
195 | 203 | | |
| 204 | + | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
| |||
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
| 223 | + | |
214 | 224 | | |
215 | 225 | | |
216 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
0 commit comments