Commit f1c5bb1
committed
Round 14 fixes: align revoke key form with create path, wildcard short-circuit
- _retained_keys_for_rule emits bare resource names (matching the
create path's _all_resources_from_rules), not the
permission-file 'resource/resourceName::foo' form. The perms
configmap stores bare names from create; the old form meant
revoke's touched_keys/retained_keys computed against a key space
the configmap never used, so 'dropped' was always empty for
resourceName-qualified grants and the configmap never reflected
the revoke.
- Remove _permission_keys helper — no remaining callers after the
above simplification.
- If retained_keys contains '*', short-circuit the configmap filter
to preserve every current resource. A surviving rule with
resources:['*'] grants everything the configmap lists, so nothing
should be dropped even when specific revokes touched it.
- Update the 2 unit tests that asserted the old qualified-key form.1 parent 7d5a611 commit f1c5bb1
2 files changed
Lines changed: 18 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 213 | | |
220 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | 224 | | |
226 | | - | |
| 225 | + | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
841 | 840 | | |
842 | 841 | | |
843 | 842 | | |
844 | | - | |
845 | | - | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
846 | 849 | | |
847 | 850 | | |
848 | 851 | | |
| |||
945 | 948 | | |
946 | 949 | | |
947 | 950 | | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
| 951 | + | |
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
963 | | - | |
964 | | - | |
965 | | - | |
| 963 | + | |
966 | 964 | | |
967 | 965 | | |
968 | 966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
0 commit comments