Commit e92da63
committed
fix(deploy): use JSON patch instead of merge patch for OIDC AuthPolicy
Merge patch (--type=merge) cannot reliably delete "when" arrays or replace
"selector" with "expression" inside CRD objects. The live AuthPolicy showed
both the base policy's when clause (restricting to sk-oai-*) AND the OIDC
expression coexisting, causing X-MaaS-Username to be empty for OIDC tokens
→ 500 AUTH_FAILURE refId 003.
Switch to JSON patch (--type=json) with op=replace on /spec/rules. This
atomically replaces the entire rules block — no field merging, no stale
when-clauses. Remove when:null and selector:null from the OIDC template
since they are no longer needed.
Signed-off-by: Wen Liang <liangwen12year@gmail.com>1 parent 93d76db commit e92da63
2 files changed
Lines changed: 29 additions & 28 deletions
Lines changed: 8 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
86 | 81 | | |
87 | | - | |
88 | 82 | | |
89 | | - | |
90 | 83 | | |
91 | 84 | | |
92 | 85 | | |
93 | 86 | | |
94 | 87 | | |
95 | 88 | | |
96 | | - | |
97 | | - | |
98 | 89 | | |
99 | | - | |
100 | 90 | | |
101 | | - | |
102 | 91 | | |
103 | 92 | | |
104 | 93 | | |
105 | 94 | | |
106 | 95 | | |
107 | 96 | | |
108 | 97 | | |
109 | | - | |
| 98 | + | |
110 | 99 | | |
111 | 100 | | |
112 | | - | |
113 | | - | |
114 | 101 | | |
115 | 102 | | |
116 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
1495 | | - | |
1496 | | - | |
1497 | | - | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
1498 | 1498 | | |
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1506 | 1520 | | |
1507 | 1521 | | |
1508 | 1522 | | |
| |||
0 commit comments