Commit 21b1f7b
fix(credentials): use the host's credential helper for a namespaced key (#1457)
* fix(credentials): use the host's credential helper for a namespaced key
DynamicStore picked the backing store by an exact credHelpers lookup, so a
namespaced key such as example.com/team/app never matched the helper
configured for example.com. Put then failed with plaintext puts disabled,
or wrote the secret in cleartext to config.json with them enabled. Walk up
the key's path to the nearest configured helper instead.
Fixes #1453
Signed-off-by: Eljees <3.14hell@gmail.com>
* docs(credentials): describe helper selection for namespaced keys
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Signed-off-by: Eljees <3.14hell@gmail.com>
* fix(credentials): treat an inherited helper's Get error as a miss
A helper found by walking up to a parent namespace was never configured for the key it is probed with. A helper that reports an unknown server URL with its own message would otherwise fail the first iteration of the namespace walk instead of letting it reach the host.
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Signed-off-by: Eljees <3.14hell@gmail.com>
---------
Signed-off-by: Eljees <3.14hell@gmail.com>
Co-authored-by: Terry Howe <terrylhowe@gmail.com>1 parent cab9028 commit 21b1f7b
2 files changed
Lines changed: 110 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| |||
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| |||
231 | 237 | | |
232 | 238 | | |
233 | 239 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
239 | 262 | | |
240 | 263 | | |
241 | 264 | | |
242 | | - | |
| 265 | + | |
243 | 266 | | |
244 | 267 | | |
245 | | - | |
| 268 | + | |
246 | 269 | | |
247 | 270 | | |
248 | 271 | | |
249 | 272 | | |
250 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
251 | 277 | | |
252 | 278 | | |
253 | 279 | | |
| |||
257 | 283 | | |
258 | 284 | | |
259 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
260 | 303 | | |
261 | 304 | | |
262 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
632 | 662 | | |
633 | 663 | | |
634 | 664 | | |
635 | 665 | | |
636 | 666 | | |
637 | 667 | | |
638 | 668 | | |
639 | | - | |
| 669 | + | |
640 | 670 | | |
641 | 671 | | |
642 | 672 | | |
| |||
682 | 712 | | |
683 | 713 | | |
684 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
685 | 720 | | |
686 | 721 | | |
687 | 722 | | |
| |||
690 | 725 | | |
691 | 726 | | |
692 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
693 | 731 | | |
694 | 732 | | |
695 | 733 | | |
| |||
1129 | 1167 | | |
1130 | 1168 | | |
1131 | 1169 | | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
0 commit comments