Commit b5d2821
committed
Address code review feedback
Fixed issues from code review:
- MEDIUM: Reject explicit primaryUpstreamProvider when no embedded auth
server is configured. The early-return direct-IdP branch in
validateAuthzUpstreamAvailable now checks for a non-empty explicit
name first and returns SpecValidationError with
ConditionReasonAuthzUpstreamUnknown when set — closing the silent
misconfiguration where the converter would forward an unresolvable
name into Cedar config at runtime.
- MEDIUM: Update the converter block comment so it accurately describes
both rejection paths (mismatch with declared upstreams AND explicit
name without an embedded AS), keeping the comment synchronized with
the validator's behavior per the go-style.md rule.
- MEDIUM: Replace the misleading "is normalized via ResolveUpstreamName"
converter test with a case that actually exercises normalization
(upstream Name:"" resolving to "default", user pinning to "default").
Removes redundancy with the single-upstream-honored case and matches
the test's claimed assertion.
- MEDIUM: Add validator test case for explicit primaryUpstreamProvider
with no embedded auth server, locking the new rejection in.1 parent 84b062d commit b5d2821
4 files changed
Lines changed: 81 additions & 12 deletions
File tree
- cmd/thv-operator
- controllers
- pkg/vmcpconfig
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
586 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
587 | 632 | | |
588 | 633 | | |
589 | 634 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3700 | 3700 | | |
3701 | 3701 | | |
3702 | 3702 | | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
3703 | 3719 | | |
3704 | 3720 | | |
3705 | 3721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2021 | 2021 | | |
2022 | 2022 | | |
2023 | 2023 | | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
2028 | 2032 | | |
2029 | 2033 | | |
2030 | 2034 | | |
2031 | | - | |
| 2035 | + | |
2032 | 2036 | | |
2033 | 2037 | | |
2034 | | - | |
2035 | | - | |
| 2038 | + | |
| 2039 | + | |
2036 | 2040 | | |
2037 | 2041 | | |
2038 | 2042 | | |
2039 | | - | |
2040 | | - | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
2041 | 2047 | | |
2042 | 2048 | | |
2043 | 2049 | | |
| |||
0 commit comments