Commit ff2fc59
committed
Expose SPIFFE client-auth registration through the operator CRDs
The SPIFFE client-authentication runtime model (trust domains + static
workload-to-client associations) already exists in pkg/authserver, but
was only reachable by hand-authoring an auth-server RunConfig file --
there was no way to declare it through VirtualMCPServer or
MCPExternalAuthConfig.
Add SPIFFETrustDomains and InboundGrants.SPIFFEClientAuth to the shared
EmbeddedAuthServerConfig CRD type, with CEL admission validation for
everything derivable from the object's own spec (paired configuration,
no duplicate names/trust domains/client IDs/principal patterns, full
cross-referencing between domains and clients, method-subset
enforcement, principal/trust-domain consistency, and client-ID
hygiene). Wire the new fields through to authserver.RunConfig via the
same converter pattern used for DelegateClients/TrustedIssuers, and
extend the existing reconcile-time revalidation
(validateDelegateClientsAndTrustedIssuers) to cover SPIFFE trust
domains too.
Cross-field checks that need reconcile-time-derived values
(AllowedAudiences, ScopesSupported -- neither is CRD-exposed) are left
to that reconcile-time path rather than a premature admission-time Go
check: an earlier attempt at that check passed nil for both, which the
runtime validator treats as "validate against nothing" rather than
"skip", silently rejecting any resources or custom scopes entry.
A syntactically valid SPIFFE config is admitted by CEL but still fails
reconciliation with a terminal error until RunConfig's
"not yet enforced" placeholder gate is lifted by a future PR -- no
live SVID verification exists yet, so this is expected, not a
regression.
Signed-off-by: Jakub Hrozek <jakub@stacklok.com>1 parent ae26bc4 commit ff2fc59
11 files changed
Lines changed: 3384 additions & 14 deletions
File tree
- cmd/thv-operator
- api/v1beta1
- pkg/controllerutil
- test-integration/mcp-external-auth
- deploy/charts/operator-crds
- files/crds
- templates
- docs/operator
Lines changed: 235 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
782 | 835 | | |
783 | 836 | | |
784 | 837 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
313 | 380 | | |
314 | 381 | | |
315 | 382 | | |
| |||
827 | 894 | | |
828 | 895 | | |
829 | 896 | | |
830 | | - | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
831 | 900 | | |
832 | 901 | | |
833 | 902 | | |
| |||
912 | 981 | | |
913 | 982 | | |
914 | 983 | | |
| 984 | + | |
915 | 985 | | |
916 | 986 | | |
917 | 987 | | |
| |||
1032 | 1102 | | |
1033 | 1103 | | |
1034 | 1104 | | |
1035 | | - | |
| 1105 | + | |
| 1106 | + | |
1036 | 1107 | | |
1037 | 1108 | | |
1038 | 1109 | | |
| |||
1043 | 1114 | | |
1044 | 1115 | | |
1045 | 1116 | | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1049 | 1121 | | |
1050 | 1122 | | |
1051 | 1123 | | |
| |||
0 commit comments