Commit 74c4164
committed
Round 7 revoke fixes: wildcard in split path, whitespace dedup, stale kubectl annotation
- _parse_permission_rules: dedup by stripped key so 'pods ' and 'pods'
don't both end up in the configmap.
- _split_rule_after_revoke: apply '*' wildcard to the cell filter inside
both URL and resource branches — previously the match phase accepted
a revoke with apiGroups:['*'] / resources:['*'] but the per-cell loop
did 'ag not in mr_apis' without wildcard handling, so the rule was
re-emitted unchanged (silent no-op on existing specific rules).
- _revoke_rbac minimal-apply: drop kubectl.kubernetes.io/last-applied-
configuration from the preserved annotations — stale snapshot confuses
kubectl's 3-way merge on subsequent applies.
- Docstring on _atomic_rule_after_revoke: note normalized-rules contract.
- Quote '--verb=*' in integration test so the shell doesn't glob-expand
against the test's cwd.
- 5 new unit tests: whitespace dedup, revoke-side '*' against specific
existing cells, atomic no-resources path, URL-gate ordering, URL-path
output ordering determinism across input permutations.1 parent 7c7aa29 commit 74c4164
2 files changed
Lines changed: 72 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
786 | | - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
787 | 794 | | |
788 | 795 | | |
789 | 796 | | |
| |||
827 | 834 | | |
828 | 835 | | |
829 | 836 | | |
| 837 | + | |
830 | 838 | | |
831 | 839 | | |
832 | | - | |
| 840 | + | |
833 | 841 | | |
834 | 842 | | |
835 | 843 | | |
| |||
860 | 868 | | |
861 | 869 | | |
862 | 870 | | |
| 871 | + | |
| 872 | + | |
863 | 873 | | |
864 | 874 | | |
865 | 875 | | |
866 | 876 | | |
867 | 877 | | |
868 | 878 | | |
869 | | - | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
870 | 882 | | |
871 | 883 | | |
872 | 884 | | |
| |||
912 | 924 | | |
913 | 925 | | |
914 | 926 | | |
| 927 | + | |
915 | 928 | | |
916 | 929 | | |
917 | 930 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
379 | 431 | | |
380 | 432 | | |
381 | 433 | | |
| |||
945 | 997 | | |
946 | 998 | | |
947 | 999 | | |
948 | | - | |
| 1000 | + | |
949 | 1001 | | |
950 | 1002 | | |
951 | 1003 | | |
| |||
0 commit comments