-
Notifications
You must be signed in to change notification settings - Fork 285
Expand file tree
/
Copy pathdocs.go
More file actions
10342 lines (10337 loc) · 474 KB
/
Copy pathdocs.go
File metadata and controls
10342 lines (10337 loc) · 474 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
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
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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
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
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
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
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by swaggo/swag. DO NOT EDIT.
package server
import "github.com/swaggo/swag/v2"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"components": {
"schemas": {
"audit.Config": {
"description": "DEPRECATED: Middleware configuration.\nAuditConfig contains the audit logging configuration",
"properties": {
"component": {
"description": "Component is the component name to use in audit events.\n+optional",
"type": "string"
},
"detectApplicationErrors": {
"description": "DetectApplicationErrors controls whether the audit middleware inspects\nJSON-RPC response bodies for application-level errors when the HTTP\nstatus code indicates success (2xx). When enabled, a small prefix of\nthe response body is buffered to detect JSON-RPC error fields,\nindependent of the IncludeResponseData setting.\n+kubebuilder:default=true\n+optional",
"type": "boolean"
},
"enabled": {
"description": "Enabled controls whether audit logging is enabled.\nWhen true, enables audit logging with the configured options.\n+kubebuilder:default=false\n+optional",
"type": "boolean"
},
"eventTypes": {
"description": "EventTypes specifies which event types to audit. If empty, all events are audited.\n+optional",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"excludeEventTypes": {
"description": "ExcludeEventTypes specifies which event types to exclude from auditing.\nThis takes precedence over EventTypes.\n+optional",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"includeRequestData": {
"description": "IncludeRequestData determines whether to include request data in audit logs.\n+kubebuilder:default=false\n+optional",
"type": "boolean"
},
"includeResponseData": {
"description": "IncludeResponseData determines whether to include response data in audit logs.\n+kubebuilder:default=false\n+optional",
"type": "boolean"
},
"logFile": {
"description": "LogFile specifies the file path for audit logs. If empty, logs to stdout.\n+optional",
"type": "string"
},
"maxDataSize": {
"description": "MaxDataSize limits the size of request/response data included in audit logs (in bytes).\n+kubebuilder:default=1024\n+optional",
"type": "integer"
},
"maxDelegationDepth": {
"description": "MaxDelegationDepth caps how many nested RFC 8693 \"act\" entries are\nrecorded in an audit event's delegation chain. Deeper chains are\ntruncated (marked with truncated=true). Defaults to 10 when unset.\n+kubebuilder:validation:Minimum=1\n+kubebuilder:default=10\n+optional",
"type": "integer"
}
},
"type": "object"
},
"auth.TokenValidatorConfig": {
"description": "DEPRECATED: Middleware configuration.\nOIDCConfig contains OIDC configuration",
"properties": {
"allowPrivateIP": {
"description": "AllowPrivateIP allows JWKS/OIDC endpoints on private IP addresses",
"type": "boolean"
},
"audience": {
"description": "Audience is the expected audience for the token",
"type": "string"
},
"authTokenFile": {
"description": "AuthTokenFile is the path to file containing bearer token for authentication",
"type": "string"
},
"cacertPath": {
"description": "CACertPath is the path to the CA certificate bundle for HTTPS requests",
"type": "string"
},
"clientID": {
"description": "ClientID is the OIDC client ID",
"type": "string"
},
"clientSecret": {
"description": "ClientSecret is the optional OIDC client secret for introspection",
"type": "string"
},
"insecureAllowHTTP": {
"description": "InsecureAllowHTTP allows HTTP (non-HTTPS) OIDC issuers for development/testing\nWARNING: This is insecure and should NEVER be used in production",
"type": "boolean"
},
"introspectionURL": {
"description": "IntrospectionURL is the optional introspection endpoint for validating tokens",
"type": "string"
},
"issuer": {
"description": "Issuer is the OIDC issuer URL (e.g., https://accounts.google.com)",
"type": "string"
},
"jwksurl": {
"description": "JWKSURL is the URL to fetch the JWKS from",
"type": "string"
},
"resourceURL": {
"description": "ResourceURL is the explicit resource URL for OAuth discovery (RFC 9728)",
"type": "string"
},
"scopes": {
"description": "Scopes is the list of OAuth scopes to advertise in the well-known endpoint (RFC 9728)\nIf empty, defaults to [\"openid\"]",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"authserver.CIMDRunConfig": {
"description": "CIMD controls client_id metadata document support. When enabled, the\nembedded authorization server accepts HTTPS URLs as client_id values\nand resolves them via the CIMD protocol instead of requiring DCR.",
"properties": {
"cache_fallback_ttl": {
"description": "CacheFallbackTTL is the fixed TTL applied to every cached CIMD document.\nCache-Control header parsing is not yet implemented; all entries use this value.\nFormat: Go duration string (e.g. \"5m\", \"10m\", \"1h\").\nDefaults to 5 minutes when Enabled is true and this field is omitted.",
"example": "5m",
"type": "string"
},
"cache_max_size": {
"description": "CacheMaxSize is the maximum number of CIMD documents held in the LRU cache.\nDefaults to 256 when Enabled is true and this field is zero.",
"type": "integer"
},
"enabled": {
"description": "Enabled activates CIMD client lookup when true.",
"type": "boolean"
}
},
"type": "object"
},
"authserver.DCRUpstreamConfig": {
"description": "DCRConfig enables RFC 7591 Dynamic Client Registration against the\nupstream authorization server. When set, the client credentials are\nobtained at runtime rather than being pre-provisioned via ClientID /\nClientSecretFile / ClientSecretEnvVar, and ClientID must be left empty.\nMutually exclusive with ClientID.",
"properties": {
"discovery_url": {
"description": "DiscoveryURL is the exact RFC 8414 / OIDC Discovery document URL to\nfetch at runtime. The resolver issues a single GET against this URL\n(no well-known-path fallback) and reads registration_endpoint,\nauthorization_endpoint, token_endpoint,\ntoken_endpoint_auth_methods_supported, and scopes_supported from the\nresponse. Per RFC 8414 §3.3, the document's \"issuer\" field must\nexactly match the upstream issuer configured on the parent\nrun-config.\n\nUse this field when the upstream publishes discovery metadata at a\npath that differs from the issuer-derived well-known paths — for\nexample a multi-tenant IdP whose metadata lives at\nhttps://idp.example.com/tenants/acme/.well-known/openid-configuration.\n\nMutually exclusive with RegistrationEndpoint.",
"type": "string"
},
"initial_access_token_env_var": {
"description": "InitialAccessTokenEnvVar is the name of an environment variable\ncontaining the RFC 7591 initial access token. Mutually exclusive with\nInitialAccessTokenFile.",
"type": "string"
},
"initial_access_token_file": {
"description": "InitialAccessTokenFile is the path to a file containing the RFC 7591\ninitial access token presented to the registration endpoint. Mutually\nexclusive with InitialAccessTokenEnvVar. Both may be omitted for open\nregistration endpoints.",
"type": "string"
},
"registration_endpoint": {
"description": "RegistrationEndpoint is the RFC 7591 registration endpoint URL used\ndirectly, bypassing discovery. Because no discovery is performed,\nserver-capability fields (token_endpoint_auth_methods_supported,\nscopes_supported) are unavailable on this code path; the caller is\nexpected to also supply AuthorizationEndpoint, TokenEndpoint, and an\nexplicit Scopes list on the parent OAuth2UpstreamRunConfig. Auth\nmethod falls back to the resolver's default (client_secret_basic).\n\nMutually exclusive with DiscoveryURL.",
"type": "string"
},
"software_id": {
"description": "SoftwareID is the RFC 7591 \"software_id\" registration metadata value,\nidentifying the client software independent of any particular\nregistration instance.",
"type": "string"
},
"software_statement": {
"description": "SoftwareStatement is the RFC 7591 \"software_statement\" JWT asserting\nmetadata about the client software, signed by a party the authorization\nserver trusts.",
"type": "string"
}
},
"type": "object"
},
"authserver.DelegateClientRunConfig": {
"properties": {
"audiences": {
"description": "Audiences are the RFC 8707 resource values this client may request a\ntoken for. Required, and must be a subset of RunConfig.AllowedAudiences:\na declared client must not receive every allowed audience just because\nthis was left empty.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"client_id": {
"description": "ClientID is the OAuth client_id this client presents at the token endpoint.",
"type": "string"
},
"client_secret_env_var": {
"description": "ClientSecretEnvVar is the name of an environment variable containing\nthe client secret. One of ClientSecretFile or ClientSecretEnvVar is\nrequired.",
"type": "string"
},
"client_secret_file": {
"description": "ClientSecretFile is the path to a file containing the client secret.\nIf both this and ClientSecretEnvVar are set, the file takes precedence.",
"type": "string"
},
"scopes": {
"description": "Scopes are the OAuth scopes this client may request. Required, and\nmust be a subset of RunConfig.ScopesSupported: a declared client must\nnot receive every supported scope just because this was left empty.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
}
},
"type": "object"
},
"authserver.IdentityFromTokenRunConfig": {
"description": "IdentityFromToken extracts user identity (subject, name, email) directly from the\nOAuth2 token-endpoint response body using gjson dot-notation paths. When set, the\nembedded auth server skips the userinfo HTTP call entirely. Mirrors the CRD type\n(cmd/thv-operator/api/v1beta1.IdentityFromTokenConfig) — the authoritative\ntrust-model and uniqueness documentation lives there.",
"properties": {
"email_path": {
"description": "EmailPath is the dot-notation path to the email address field.",
"type": "string"
},
"name_path": {
"description": "NamePath is the dot-notation path to the display name field.",
"type": "string"
},
"subject_path": {
"description": "SubjectPath is the dot-notation path to the subject (user ID) field.\nRequired when IdentityFromToken is set.",
"type": "string"
}
},
"type": "object"
},
"authserver.InboundGrantsRunConfig": {
"description": "InboundGrants declares canonical inbound grant configuration, including\nSPIFFE client authentication. See InboundGrantsRunConfig.",
"properties": {
"spiffe_client_auth": {
"description": "SPIFFEClientAuth associates SPIFFE principal patterns with explicit OAuth\nclient identities and permissions. See SPIFFEClientAuthRunConfig.",
"items": {
"$ref": "#/components/schemas/authserver.SPIFFEClientAuthRunConfig"
},
"type": "array",
"uniqueItems": false
}
},
"type": "object"
},
"authserver.OAuth2UpstreamRunConfig": {
"description": "OAuth2Config contains OAuth 2.0-specific configuration.\nRequired when Type is \"oauth2\", must be nil when Type is \"oidc\".",
"properties": {
"additional_authorization_params": {
"additionalProperties": {
"type": "string"
},
"description": "AdditionalAuthorizationParams are extra query parameters to include in\nauthorization requests. Useful for provider-specific parameters like\nGoogle's access_type=offline.",
"type": "object"
},
"allow_private_ips": {
"description": "AllowPrivateIPs permits the upstream provider's HTTP client to connect to\nprivate IP ranges (RFC-1918, link-local). When DCRConfig is set, this\nalso gates the DCR discovery and registration calls made on this\nupstream's behalf (see pkg/authserver/runner/dcr_adapter.go), so a\nsingle flag covers the whole upstream rather than needing a separate\nDCR-specific setting. Use only when the upstream is hosted inside the\nsame cluster and has no public endpoint. HTTP-scheme restrictions are\nunchanged — HTTPS is still required for non-localhost hosts. Defaults\nto false.",
"type": "boolean"
},
"authorization_endpoint": {
"description": "AuthorizationEndpoint is the URL for the OAuth authorization endpoint.",
"type": "string"
},
"ca_file_path": {
"description": "CAFilePath is the path to a PEM CA bundle added to the system roots.",
"type": "string"
},
"client_id": {
"description": "ClientID is the OAuth 2.0 client identifier registered with the upstream IDP.\nMutually exclusive with DCRConfig: when DCRConfig is set, ClientID is obtained\nat runtime via RFC 7591 Dynamic Client Registration and must be left empty.",
"type": "string"
},
"client_secret_env_var": {
"description": "ClientSecretEnvVar is the name of an environment variable containing the client secret.\nMutually exclusive with ClientSecretFile. Optional for public clients using PKCE.",
"type": "string"
},
"client_secret_file": {
"description": "ClientSecretFile is the path to a file containing the OAuth 2.0 client secret.\nMutually exclusive with ClientSecretEnvVar. Optional for public clients using PKCE.",
"type": "string"
},
"dcr_config": {
"$ref": "#/components/schemas/authserver.DCRUpstreamConfig"
},
"identity_from_token": {
"$ref": "#/components/schemas/authserver.IdentityFromTokenRunConfig"
},
"insecure_allow_http": {
"description": "InsecureAllowHTTP permits plain-HTTP authorization and token endpoint URLs\nfor this upstream. Only for in-cluster development environments (e.g. an\nOAuth2 provider served over HTTP in a kind cluster) where TLS is not\navailable. Never set this in production.",
"type": "boolean"
},
"redirect_uri": {
"description": "RedirectURI is the callback URL where the upstream IDP will redirect after authentication.\nWhen not specified, defaults to ` + "`" + `{issuer}/oauth/callback` + "`" + `.",
"type": "string"
},
"scopes": {
"description": "Scopes are the OAuth scopes to request from the upstream IDP.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"token_endpoint": {
"description": "TokenEndpoint is the URL for the OAuth token endpoint.",
"type": "string"
},
"token_response_mapping": {
"$ref": "#/components/schemas/authserver.TokenResponseMappingRunConfig"
},
"userinfo": {
"$ref": "#/components/schemas/authserver.UserInfoRunConfig"
}
},
"type": "object"
},
"authserver.OIDCUpstreamRunConfig": {
"description": "OIDCConfig contains OIDC-specific configuration.\nRequired when Type is \"oidc\", must be nil when Type is \"oauth2\".",
"properties": {
"additional_authorization_params": {
"additionalProperties": {
"type": "string"
},
"description": "AdditionalAuthorizationParams are extra query parameters to include in\nauthorization requests. Useful for provider-specific parameters like\nGoogle's access_type=offline.",
"type": "object"
},
"allow_private_ips": {
"description": "AllowPrivateIPs permits the OIDC discovery and token HTTP clients to\nconnect to private IP ranges (RFC-1918, link-local). Use only when the\nupstream is hosted inside the same cluster and has no public endpoint.\nHTTP-scheme restrictions are unchanged — HTTPS is still required for\nnon-localhost hosts. Defaults to false.",
"type": "boolean"
},
"ca_file_path": {
"description": "CAFilePath is the path to a PEM CA bundle added to the system roots.",
"type": "string"
},
"client_id": {
"description": "ClientID is the OAuth 2.0 client identifier registered with the upstream IDP.",
"type": "string"
},
"client_secret_env_var": {
"description": "ClientSecretEnvVar is the name of an environment variable containing the client secret.\nMutually exclusive with ClientSecretFile. Optional for public clients using PKCE.",
"type": "string"
},
"client_secret_file": {
"description": "ClientSecretFile is the path to a file containing the OAuth 2.0 client secret.\nMutually exclusive with ClientSecretEnvVar. Optional for public clients using PKCE.",
"type": "string"
},
"insecure_allow_http": {
"description": "InsecureAllowHTTP permits a plain-HTTP issuer URL and HTTP discovery\nendpoints for this upstream. Only for in-cluster development environments\n(e.g. Dex served over HTTP in a kind cluster) where TLS is not available.\nNever set this in production.",
"type": "boolean"
},
"issuer_url": {
"description": "IssuerURL is the OIDC issuer URL for automatic endpoint discovery.\nMust be a valid HTTPS URL.",
"type": "string"
},
"redirect_uri": {
"description": "RedirectURI is the callback URL where the upstream IDP will redirect after authentication.\nWhen not specified, defaults to ` + "`" + `{issuer}/oauth/callback` + "`" + `.",
"type": "string"
},
"scopes": {
"description": "Scopes are the OAuth scopes to request from the upstream IDP.\nIf not specified, defaults to [\"openid\", \"offline_access\"].\nWhen using AdditionalAuthorizationParams with provider-specific refresh\ntoken mechanisms (e.g., Google's access_type=offline), set explicit scopes\nto avoid sending both offline_access and the provider-specific parameter.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"subject_claim": {
"description": "SubjectClaim names the validated ID-token claim to use as the upstream\nsubject. Defaults to \"sub\" when empty. Set for IdPs where \"sub\" isn't\nstable per user (e.g. Entra/Azure AD's \"oid\"). See upstream.OIDCConfig.",
"type": "string"
},
"userinfo_override": {
"$ref": "#/components/schemas/authserver.UserInfoRunConfig"
}
},
"type": "object"
},
"authserver.RunConfig": {
"description": "EmbeddedAuthServerConfig contains configuration for the embedded OAuth2/OIDC authorization server.\nWhen set, the proxy runner will start an embedded auth server that delegates to upstream IDPs.\nThis is the serializable RunConfig; secrets are referenced by file paths or env var names.",
"properties": {
"allow_confidential_client_registration": {
"description": "AllowConfidentialClientRegistration permits Dynamic Client Registration\nof confidential clients: when true, /oauth/register accepts\ntoken_endpoint_auth_method values client_secret_basic and\nclient_secret_post in addition to \"none\" (still the default on\nomission) and mints a client_secret returned exactly once. Confidential\nclients are restricted to https non-loopback redirect URIs, and\nregistrations idle for more than DefaultDCRClientTTL (30 days) are\nevicted and must re-register. This gates registration only: disabling\nit does not revoke or reject already-minted secrets at the token\nendpoint.\n\nSecurity: /oauth/register is unauthenticated, so this issues client\nsecrets to any caller. Combining it with InsecureAllowHTTP is rejected\nby Validate.",
"type": "boolean"
},
"allow_private_key_jwt_registration": {
"description": "AllowPrivateKeyJWTRegistration permits Dynamic Client Registration of\nclients using private_key_jwt authentication. This is independent of\nAllowConfidentialClientRegistration and defaults to false. Registration\nbehavior is controlled independently by the DCR handler and discovery\nmetadata.\n\nSecurity: /oauth/register is unauthenticated. Unlike\nAllowConfidentialClientRegistration, this is NOT rejected when combined\nwith InsecureAllowHTTP: registration never returns a secret for a\nprivate_key_jwt client, so there is nothing for cleartext HTTP to\nexpose.",
"type": "boolean"
},
"allowed_audiences": {
"description": "AllowedAudiences is the list of valid resource URIs that tokens can be issued for.\nPer RFC 8707, the \"resource\" parameter in authorization and token requests is\nvalidated against this list. Required for MCP compliance.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"authorization_endpoint_base_url": {
"description": "AuthorizationEndpointBaseURL overrides the base URL used for the authorization_endpoint\nin the OAuth discovery document. When set, the discovery document will advertise\n` + "`" + `{authorization_endpoint_base_url}/oauth/authorize` + "`" + ` instead of ` + "`" + `{issuer}/oauth/authorize` + "`" + `.\nAll other endpoints remain derived from the issuer.",
"type": "string"
},
"baseline_client_scopes": {
"description": "BaselineClientScopes is a baseline set of OAuth 2.0 scopes unioned into every\nDCR registration. All values must appear in ScopesSupported; the auth server\nrejects this RunConfig at startup otherwise. Empty means current behavior is\npreserved (registered scope = client-requested, or the intersection of\nDefaultScopes with ScopesSupported if the client requested none).\nWhen ScopesSupported is empty, the subset check uses registration.DefaultScopes\n(the same set applyDefaults would substitute at startup) — so\nBaselineClientScopes containing standard OIDC scopes works without enumerating\nScopesSupported explicitly.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"cimd": {
"$ref": "#/components/schemas/authserver.CIMDRunConfig"
},
"delegate_clients": {
"description": "DelegateClients declares confidential OAuth clients to register at\nauthorization-server startup, including clients intended for RFC 8693\ntoken exchange.\n\nIndependent of AllowConfidentialClientRegistration: declaring a client\nhere does not require or enable self-service confidential DCR, and\nsetting that flag does not declare or enable any client here. They\ngovern different endpoints — this field is static configuration the\noperator controls directly, while the flag is admission policy for the\nunauthenticated /oauth/register endpoint.\n\nSee DelegateClientRunConfig for the per-client field reference.",
"items": {
"$ref": "#/components/schemas/authserver.DelegateClientRunConfig"
},
"type": "array",
"uniqueItems": false
},
"delegation_token_lifespan": {
"description": "DelegationTokenLifespan is the maximum lifetime for delegated tokens issued\nvia RFC 8693 token exchange. Specified as a Go duration string (e.g., \"15m\").\nIf empty, defaults to 15 minutes.",
"type": "string"
},
"disable_upstream_token_injection": {
"description": "DisableUpstreamTokenInjection prevents the upstream swap middleware from being added.\nWhen true, the embedded auth server handles OAuth flows for clients, but instead of\ninjecting upstream IdP tokens the proxy strips the client's credential headers\n(Authorization, Cookie, Proxy-Authorization) after the JWT is validated — the\nbackend receives an unauthenticated request. Incompatible with token exchange\nand AWS STS, which would re-add credentials after the strip.",
"type": "boolean"
},
"force_confidential_redirect_uris": {
"description": "ForceConfidentialRedirectURIs lists redirect URIs that must be registered\nas confidential clients regardless of the token_endpoint_auth_method the\nDCR request declares. A registration whose redirect_uris contains an\nEXACT match for one of these entries is issued a real client_secret and\nreported back as token_endpoint_auth_method \"client_secret_post\", even\nif the request said \"none\" or omitted the field.\n\nThis exists for MCP clients (Perplexity is the known case) that declare\nthemselves public (token_endpoint_auth_method: \"none\") per RFC 7591 but\nthen refuse to proceed because the response carries no client_secret —\na self-contradictory request no conformant server can satisfy as\nwritten. RFC 7591 §3.2.1 permits the server to substitute metadata, so\nthis takes such a client at its word that it wants a secret.\n\nExact matching is deliberate: it is not a way to obtain a usable\ncredential for another client. An attacker who registers with someone\nelse's callback URI is issued a secret for a client whose authorization\ncodes are delivered to that someone else's redirect endpoint, not to\nthe attacker — the secret is useless without also controlling the\ncallback.\n\nRequires AllowConfidentialClientRegistration; every entry must be a\nvalid https non-loopback URI (Validate rejects loopback entries — the\nsame restriction AllowConfidentialClientRegistration itself enforces\nexists so secrets do not land in distributed native apps, and this\noverride must not bypass it). Remove an entry once the client is fixed\nto handle \"none\" registrations correctly.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"hmac_secret_files": {
"description": "HMACSecretFiles contains file paths to HMAC secrets for signing authorization codes\nand refresh tokens (opaque tokens).\nFirst file is the current secret (must be at least 32 bytes), subsequent files\nare for rotation/verification of existing tokens.\nIf empty, an ephemeral secret will be auto-generated (development only).",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"inbound_grants": {
"$ref": "#/components/schemas/authserver.InboundGrantsRunConfig"
},
"insecure_allow_confidential_over_loopback_http": {
"description": "InsecureAllowConfidentialOverLoopbackHTTP opts in to confidential clients\nwhen Issuer is a plain-HTTP loopback URL. Without this flag, that\ncombination is rejected: a loopback http:// issuer is normally fine for\nlocal development (the traffic never leaves the machine), but client\nsecrets would otherwise travel over cleartext. Defaults to false. Has no\neffect when there are no confidential clients or Issuer is https.\n\nApplies identically to delegate clients and DCR-registered clients. The\nKubernetes CRD requires the explicit opt-in for a delegate client with an\nHTTP issuer; the shared transport validator enforces that its host is\nloopback — see EmbeddedAuthServerConfig's doc comment.\n\nprivate_key_jwt registration has no equivalent flag or transport\nrestriction: unlike confidential registration, it never returns a\nclient_secret (or any other secret) in the DCR response, so there is\nnothing here for cleartext HTTP to expose.",
"type": "boolean"
},
"insecure_allow_http": {
"description": "InsecureAllowHTTP permits an http:// issuer URL for non-localhost hosts.\nOnly set this for in-cluster Kubernetes deployments on a trusted network.\nProduction deployments reachable outside the cluster MUST use https://.",
"type": "boolean"
},
"issuer": {
"description": "Issuer is the issuer identifier for this authorization server.\nThis will be included in the \"iss\" claim of issued tokens.\nMust be a valid HTTPS URL (or HTTP for localhost) without query, fragment, or trailing slash.",
"type": "string"
},
"schema_version": {
"description": "SchemaVersion is the version of the RunConfig schema.",
"type": "string"
},
"scopes_supported": {
"description": "ScopesSupported lists the OAuth 2.0 scope values advertised in discovery documents.\nIf empty, defaults to registration.DefaultScopes ([\"openid\", \"profile\", \"email\", \"offline_access\"]).",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"signing_key_config": {
"$ref": "#/components/schemas/authserver.SigningKeyRunConfig"
},
"spiffe_trust_domains": {
"description": "SPIFFETrustDomains declares SPIFFE trust roots. Each declaration must be\nreferenced by an InboundGrants.SPIFFEClientAuth entry.",
"items": {
"$ref": "#/components/schemas/authserver.SPIFFETrustDomainRunConfig"
},
"type": "array",
"uniqueItems": false
},
"storage": {
"$ref": "#/components/schemas/storage.RunConfig"
},
"token_lifespans": {
"$ref": "#/components/schemas/authserver.TokenLifespanRunConfig"
},
"trusted_issuers": {
"description": "TrustedIssuers lists external OIDC issuers whose tokens are accepted as\nRFC 8693 subject tokens or RFC 7523 JWT-bearer assertions. Issuers with\njwtBearerGrant enabled may be used for the JWT-bearer grant without an\nRFC 8693 delegation policy. Empty (the default) means only self-issued\nsubject tokens are accepted.\n\nSee tokenexchange.TrustedIssuer for the per-issuer field reference, and\ndocs/arch/17-token-exchange-delegation.md for the trust model, consent\nsignals, and operator-facing constraints (audience/scope bounding,\nsubject namespace qualification, required client binding) that aren't\nvisible from the config shape alone.",
"items": {
"$ref": "#/components/schemas/tokenexchange.TrustedIssuer"
},
"type": "array",
"uniqueItems": false
},
"upstreams": {
"description": "Upstreams configures connections to upstream Identity Providers for\ninteractive authorization. It may be empty only when DelegateClients or a\nTrustedIssuer with JWTBearerGrant enables token-only operation.\nMultiple upstreams are supported for sequential authorization chains.",
"items": {
"$ref": "#/components/schemas/authserver.UpstreamRunConfig"
},
"type": "array",
"uniqueItems": false
}
},
"type": "object"
},
"authserver.SPIFFEBundleEndpointSourceRunConfig": {
"properties": {
"profile": {
"description": "Profile selects how the endpoint's TLS connection is authenticated:\nSPIFFEBundleEndpointProfileHTTPSWeb (Web PKI) or\nSPIFFEBundleEndpointProfileHTTPSSPIFFE (a separately distributed\nX.509-SVID root). Required, since the future bundle loader cannot\notherwise know which trust anchor to use for the initial connection.",
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"authserver.SPIFFEBundleSourceRunConfig": {
"description": "BundleSource declares exactly one future trust-bundle source. It is\nvalidated for shape only; fetching or loading a bundle from it is a\nlater step.",
"properties": {
"endpoint": {
"$ref": "#/components/schemas/authserver.SPIFFEBundleEndpointSourceRunConfig"
},
"type": {
"type": "string"
},
"workload_api": {
"$ref": "#/components/schemas/authserver.SPIFFEWorkloadAPIBundleSourceRunConfig"
}
},
"type": "object"
},
"authserver.SPIFFEClientAuthRunConfig": {
"properties": {
"audiences": {
"description": "Audiences are RFC 8693 token audiences this association may request.\nThis is an independent request dimension from Resources: it is not\nbounded by allowed_audiences (which is an RFC 8707 resource-URI list)\nand may contain non-URI logical audience identifiers.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"client_id": {
"description": "ClientID is the explicit OAuth client_id. It is never derived from a\nSPIFFE ID.",
"type": "string"
},
"grant_types": {
"description": "GrantTypes are the OAuth grant types this association may use. Client\nauthentication does not by itself confer any grant.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"methods": {
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"principal_pattern": {
"description": "PrincipalPattern is a concrete SPIFFE ID or a terminal /* pattern within\nthe declared trust domain.",
"type": "string"
},
"resources": {
"description": "Resources are RFC 8707 resource indicators this association may\nrequest. Must be a subset of the server's allowed_audiences allowlist\n(RunConfig.AllowedAudiences) — the same RFC 8707 resource-URI list\nDelegateClientRunConfig.Audiences is validated against. Distinct from\nAudiences: a resource permission does not imply the same value is also\na permitted token audience, or vice versa.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"scopes": {
"description": "Scopes are OAuth scopes granted to this association. They must be a\nsubset of the server's effective supported scopes.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"trust_domain_ref": {
"description": "TrustDomainRef identifies the SPIFFE trust-domain declaration governing\nthis association policy.",
"type": "string"
}
},
"type": "object"
},
"authserver.SPIFFETrustDomainRunConfig": {
"properties": {
"bundle_source": {
"$ref": "#/components/schemas/authserver.SPIFFEBundleSourceRunConfig"
},
"methods": {
"description": "Methods explicitly enables the supported credential types for this trust\ndomain. No authentication method is enabled when the list is empty.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"name": {
"description": "Name uniquely identifies this declaration and is referenced by\nInboundGrants.SPIFFEClientAuth entries.",
"type": "string"
},
"trust_domain": {
"description": "TrustDomain is the SPIFFE trust domain accepted by this declaration.",
"type": "string"
}
},
"type": "object"
},
"authserver.SPIFFEWorkloadAPIBundleSourceRunConfig": {
"type": "object"
},
"authserver.SigningKeyRunConfig": {
"description": "SigningKeyConfig configures the signing key provider for JWT operations.\nIf nil or empty, an ephemeral signing key will be auto-generated (development only).",
"properties": {
"fallback_key_files": {
"description": "FallbackKeyFiles are filenames of additional keys for verification (relative to KeyDir).\nThese keys are included in the JWKS endpoint for token verification but are NOT\nused for signing new tokens. Useful for key rotation.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"key_dir": {
"description": "KeyDir is the directory containing PEM-encoded private key files.\nAll key filenames are relative to this directory.\nIn Kubernetes, this is typically a mounted Secret volume.",
"type": "string"
},
"signing_key_file": {
"description": "SigningKeyFile is the filename of the primary signing key (relative to KeyDir).\nThis key is used for signing new tokens.",
"type": "string"
}
},
"type": "object"
},
"authserver.TokenLifespanRunConfig": {
"description": "TokenLifespans configures the duration that various tokens are valid.\nIf nil, defaults are applied (access: 1h, refresh: 7d, authCode: 10m).",
"properties": {
"access_token_lifespan": {
"description": "AccessTokenLifespan is the duration that access tokens are valid.\nIf empty, defaults to 1 hour.",
"type": "string"
},
"auth_code_lifespan": {
"description": "AuthCodeLifespan is the duration that authorization codes are valid.\nIf empty, defaults to 10 minutes.",
"type": "string"
},
"refresh_token_lifespan": {
"description": "RefreshTokenLifespan is the duration that refresh tokens are valid.\nIf empty, defaults to 7 days (168h).",
"type": "string"
}
},
"type": "object"
},
"authserver.TokenResponseMappingRunConfig": {
"description": "TokenResponseMapping configures custom field extraction from non-standard token responses.\nWhen set, the token exchange bypasses golang.org/x/oauth2 and extracts fields using\nthe configured dot-notation paths.",
"properties": {
"access_token_path": {
"description": "AccessTokenPath is the dot-notation path to the access token (required).",
"type": "string"
},
"expires_in_path": {
"description": "ExpiresInPath is the dot-notation path to the expires_in value. Defaults to \"expires_in\".",
"type": "string"
},
"refresh_token_path": {
"description": "RefreshTokenPath is the dot-notation path to the refresh token. Defaults to \"refresh_token\".",
"type": "string"
},
"scope_path": {
"description": "ScopePath is the dot-notation path to the scope. Defaults to \"scope\".",
"type": "string"
}
},
"type": "object"
},
"authserver.UpstreamRunConfig": {
"properties": {
"name": {
"description": "Name uniquely identifies this upstream.\nUsed for routing decisions and session binding in multi-upstream scenarios.\nIf empty when only one upstream is configured, defaults to \"default\".",
"type": "string"
},
"oauth2_config": {
"$ref": "#/components/schemas/authserver.OAuth2UpstreamRunConfig"
},
"oidc_config": {
"$ref": "#/components/schemas/authserver.OIDCUpstreamRunConfig"
},
"type": {
"description": "Type specifies the provider type: \"oidc\" or \"oauth2\".",
"type": "string"
}
},
"type": "object"
},
"authserver.UserInfoFieldMappingRunConfig": {
"description": "FieldMapping contains custom field mapping configuration for non-standard providers.\nIf nil, standard OIDC field names are used (\"sub\", \"name\", \"email\").",
"properties": {
"email_fields": {
"description": "EmailFields is an ordered list of field names to try for the email address.\nThe first non-empty value found will be used.\nDefault: [\"email\"]",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"name_fields": {
"description": "NameFields is an ordered list of field names to try for the display name.\nThe first non-empty value found will be used.\nDefault: [\"name\"]",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"subject_fields": {
"description": "SubjectFields is an ordered list of field names to try for the user ID.\nThe first non-empty value found will be used.\nDefault: [\"sub\"]",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
}
},
"type": "object"
},
"authserver.UserInfoRunConfig": {
"description": "UserInfo contains configuration for fetching user information.\nOptional: when nil, the upstream OAuth2 provider derives a deterministic\nsubject by SHA-256-hashing the access token (with a \"tk-\" prefix) instead\nof calling a userinfo endpoint. OIDC providers always derive Subject from\nthe ID token and are unaffected.",
"properties": {
"additional_headers": {
"additionalProperties": {
"type": "string"
},
"description": "AdditionalHeaders contains extra headers to include in the userinfo request.\nUseful for providers that require specific headers (e.g., GitHub's Accept header).",
"type": "object"
},
"endpoint_url": {
"description": "EndpointURL is the URL of the userinfo endpoint.",
"type": "string"
},
"field_mapping": {
"$ref": "#/components/schemas/authserver.UserInfoFieldMappingRunConfig"
},
"http_method": {
"description": "HTTPMethod is the HTTP method to use for the userinfo request.\nIf not specified, defaults to GET.",
"type": "string"
}
},
"type": "object"
},
"core.Workload": {
"properties": {
"created_at": {
"description": "CreatedAt is the timestamp when the workload was created.",
"type": "string"
},
"group": {
"description": "Group is the name of the group this workload belongs to, if any.",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Labels are the container labels (excluding standard ToolHive labels)",
"type": "object"
},
"name": {
"description": "Name is the name of the workload.\nIt is used as a unique identifier.",
"type": "string"
},
"package": {
"description": "Package specifies the Workload Package used to create this Workload.",
"type": "string"
},
"port": {
"description": "Port is the port on which the workload is exposed.\nThis is embedded in the URL.",
"type": "integer"
},
"proxy_mode": {
"description": "ProxyMode is the proxy mode that clients should use to connect.\nFor stdio transports, this will be the proxy mode (sse or streamable-http).\nFor direct transports (sse/streamable-http), this will be the same as TransportType.",
"type": "string"
},
"remote": {
"description": "Remote indicates whether this is a remote workload (true) or a container workload (false).",
"type": "boolean"
},
"started_at": {
"description": "StartedAt is when the container was last started (changes on restart)",
"type": "string"
},
"status": {
"description": "Status is the current status of the workload.",
"enum": [
"running",
"stopped",
"error",
"starting",
"stopping",
"unhealthy",
"removing",
"unknown",
"unauthenticated",
"auth_retrying",
"policy_stopped"
],
"type": "string"
},
"status_context": {
"description": "StatusContext provides additional context about the workload's status.\nThe exact meaning is determined by the status and the underlying runtime.",
"type": "string"
},
"tools": {
"description": "ToolsFilter is the filter on tools applied to the workload.",
"items": {
"type": "string"
},
"type": "array",
"uniqueItems": false
},
"transport_type": {
"description": "TransportType is the type of transport used for this workload.",
"enum": [
"stdio",
"sse",
"streamable-http",
"inspector"
],
"type": "string"
},
"url": {
"description": "URL is the URL of the workload exposed by the ToolHive proxy.",
"type": "string"
}
},
"type": "object"
},
"github_com_stacklok_toolhive_pkg_auth_awssts.Config": {
"description": "AWSStsConfig contains AWS STS token exchange configuration for accessing AWS services",
"properties": {
"fallback_role_arn": {
"description": "FallbackRoleArn is the IAM role ARN to assume when no role mapping matches.",
"type": "string"
},
"region": {
"description": "Region is the AWS region for STS and SigV4 signing.",
"type": "string"
},
"role_claim": {
"description": "RoleClaim is the JWT claim to use for role mapping (default: \"groups\").",
"type": "string"
},
"role_mappings": {
"description": "RoleMappings maps JWT claim values to IAM roles with priority.",
"items": {
"$ref": "#/components/schemas/github_com_stacklok_toolhive_pkg_auth_awssts.RoleMapping"
},
"type": "array",
"uniqueItems": false
},
"service": {
"description": "Service is the AWS service name for SigV4 signing (default: \"aws-mcp\").",
"type": "string"
},
"session_duration": {
"description": "SessionDuration is the duration in seconds for assumed role credentials (default: 3600).",
"type": "integer"
},
"session_name_claim": {
"description": "SessionNameClaim is the JWT claim to use for role session name (default: \"sub\").",
"type": "string"
},
"subject_provider_name": {
"description": "SubjectProviderName identifies which upstream provider's access token to use\nfor STS AssumeRoleWithWebIdentity. Used by vMCP only. When empty, the bearer\ntoken from the incoming HTTP request is used.",
"type": "string"
}
},
"type": "object"
},
"github_com_stacklok_toolhive_pkg_auth_awssts.RoleMapping": {
"properties": {
"claim": {
"description": "Claim is the simple claim value to match (e.g., group name).\nInternally compiles to a CEL expression: \"\u003cclaim_value\u003e\" in claims[\"\u003crole_claim\u003e\"]\nMutually exclusive with Matcher.",
"type": "string"
},
"matcher": {
"description": "Matcher is a CEL expression for complex matching against JWT claims.\nThe expression has access to a \"claims\" variable containing all JWT claims.\nExamples:\n - \"admins\" in claims[\"groups\"]\n - claims[\"sub\"] == \"user123\" \u0026\u0026 !(\"act\" in claims)\nMutually exclusive with Claim.",
"type": "string"
},
"priority": {
"description": "Priority determines selection order (lower number = higher priority).\nWhen multiple mappings match, the one with the lowest priority is selected.\nWhen nil (omitted), the mapping has the lowest possible priority, and\nconfiguration order acts as tie-breaker via stable sort.",
"type": "integer"
},
"role_arn": {
"description": "RoleArn is the IAM role ARN to assume when this mapping matches.",
"type": "string"
}
},
"type": "object"
},
"github_com_stacklok_toolhive_pkg_auth_upstreamswap.Config": {
"description": "UpstreamSwapConfig contains configuration for upstream token swap middleware.\nWhen set along with EmbeddedAuthServerConfig, this middleware exchanges ToolHive JWTs\nfor upstream IdP tokens before forwarding requests to the MCP server.",
"properties": {
"custom_header_name": {
"description": "CustomHeaderName is the header name when HeaderStrategy is \"custom\".",
"type": "string"
},
"header_strategy": {
"description": "HeaderStrategy determines how to inject the token: \"replace\" (default) or \"custom\".",
"type": "string"
},
"provider_name": {
"description": "ProviderName identifies which upstream provider's tokens to retrieve for injection.\nThis is required and must match a configured upstream provider name.",
"type": "string"
}
},
"type": "object"
},
"github_com_stacklok_toolhive_pkg_authz.Config": {
"description": "DEPRECATED: Middleware configuration.\nAuthzConfig contains the authorization configuration",
"properties": {
"type": {
"description": "Type is the type of authorization configuration (e.g., \"cedarv1\").",
"type": "string"
},
"version": {
"description": "Version is the version of the configuration format.",
"type": "string"
}
},
"type": "object"
},
"github_com_stacklok_toolhive_pkg_client.ClientApp": {
"description": "ClientType is the type of MCP client",
"enum": [
"roo-code",
"cline",
"cursor",
"vscode-insider",
"vscode",
"claude-code",
"windsurf",
"windsurf-jetbrains",
"amp-cli",
"lm-studio",
"goose",
"trae",
"continue",
"opencode",
"kiro",
"antigravity",
"zed",
"gemini-cli",
"vscode-server",
"mistral-vibe",
"codex",
"kimi-cli",
"factory",
"copilot-cli",
"qoder"
],
"type": "string",
"x-enum-varnames": [
"RooCode",
"Cline",
"Cursor",
"VSCodeInsider",
"VSCode",
"ClaudeCode",
"Windsurf",
"WindsurfJetBrains",
"AmpCli",
"LMStudio",
"Goose",
"Trae",
"Continue",
"OpenCode",
"Kiro",
"Antigravity",
"Zed",
"GeminiCli",
"VSCodeServer",
"MistralVibe",
"Codex",
"KimiCli",
"Factory",
"CopilotCli",
"Qoder"
]
},
"github_com_stacklok_toolhive_pkg_client.ClientAppStatus": {
"properties": {
"client_type": {
"$ref": "#/components/schemas/github_com_stacklok_toolhive_pkg_client.ClientApp"
},
"installed": {
"description": "Installed indicates whether the client is installed on the system",
"type": "boolean"
},
"registered": {
"description": "Registered indicates whether the client is registered in the ToolHive configuration",
"type": "boolean"
},
"supports_plugins": {
"description": "SupportsPlugins indicates whether ToolHive can install plugins for this client",
"type": "boolean"
},
"supports_skills": {
"description": "SupportsSkills indicates whether ToolHive can install skills for this client",
"type": "boolean"
}
},