-
-
Notifications
You must be signed in to change notification settings - Fork 362
/
config.schema.json
1894 lines (1894 loc) · 69.1 KB
/
config.schema.json
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
{
"$id": "https://github.com/ory/oathkeeper/schema/config.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ORY Oathkeeper Configuration",
"type": "object",
"definitions": {
"serverTimeout": {
"title": "HTTP Timeouts",
"description": "Control the HTTP timeouts.",
"type": "object",
"additionalProperties": false,
"properties": {
"read": {
"title": "HTTP Read Timeout",
"type": "string",
"default": "5s",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$",
"description": "The maximum duration for reading the entire request, including the body.",
"examples": ["5s", "5m", "5h"]
},
"write": {
"title": "HTTP Write Timeout",
"type": "string",
"default": "120s",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$",
"description": "The maximum duration before timing out writes of the response. Increase this parameter to prevent unexpected closing a client connection if an upstream request is responding slowly.",
"examples": ["5s", "5m", "5h"]
},
"idle": {
"title": "HTTP Idle Timeout",
"type": "string",
"default": "120s",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$",
"description": " The maximum amount of time to wait for any action of a request session, reading data or writing the response.",
"examples": ["5s", "5m", "5h"]
}
}
},
"retry": {
"type": "object",
"additionalProperties": false,
"properties": {
"give_up_after": {
"type": "string",
"default": "1s",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$"
},
"max_delay": {
"type": "string",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$",
"default": "100ms"
}
}
},
"tlsxSource": {
"type": "object",
"additionalProperties": false,
"properties": {
"path": {
"title": "Path to PEM-encoded Fle",
"type": "string",
"examples": ["path/to/file.pem"]
},
"base64": {
"title": "Base64 Encoded Inline",
"description": "The base64 string of the PEM-encoded file content. Can be generated using for example `base64 -i path/to/file.pem`.",
"type": "string",
"examples": [
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tXG5NSUlEWlRDQ0FrMmdBd0lCQWdJRVY1eE90REFOQmdr..."
]
}
}
},
"tlsx": {
"title": "HTTPS",
"description": "Configure HTTP over TLS (HTTPS). All options can also be set using environment variables by replacing dots (`.`) with underscores (`_`) and uppercasing the key. For example, `some.prefix.tls.key.path` becomes `export SOME_PREFIX_TLS_KEY_PATH`. If all keys are left undefined, TLS will be disabled.",
"type": "object",
"additionalProperties": false,
"properties": {
"key": {
"title": "Private Key (PEM)",
"allOf": [
{
"$ref": "#/definitions/tlsxSource"
}
]
},
"cert": {
"title": "TLS Certificate (PEM)",
"allOf": [
{
"$ref": "#/definitions/tlsxSource"
}
]
}
}
},
"cors": {
"title": "Cross Origin Resource Sharing (CORS)",
"description": "Configure [Cross Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) using the following options.",
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"default": false,
"title": "Enable CORS",
"description": "If set to true, CORS will be enabled and preflight-requests (OPTION) will be answered."
},
"allowed_origins": {
"title": "Allowed Origins",
"description": "A list of origins a cross-domain request can be executed from. If the special * value is present in the list, all origins will be allowed. An origin may contain a wildcard (*) to replace 0 or more characters (i.e.: http://*.domain.com). Usage of wildcards implies a small performance penality. Only one wildcard can be used per origin.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"default": ["*"],
"uniqueItems": true,
"examples": [
[
"https://example.com",
"https://*.example.com",
"https://*.foo.example.com"
]
]
},
"allowed_methods": {
"type": "array",
"title": "Allowed HTTP Methods",
"description": "A list of methods the client is allowed to use with cross-domain requests.",
"items": {
"type": "string",
"enum": [
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"CONNECT",
"TRACE",
"PATCH"
]
},
"uniqueItems": true,
"default": ["GET", "POST", "PUT", "PATCH", "DELETE"]
},
"allowed_headers": {
"description": "A list of non simple headers the client is allowed to use with cross-domain requests.",
"title": "Allowed Request HTTP Headers",
"type": "array",
"items": {
"type": "string"
},
"minLength": 1,
"uniqueItems": true,
"default": ["Authorization", "Content-Type"]
},
"exposed_headers": {
"description": "Indicates which headers are safe to expose to the API of a CORS API specification",
"title": "Allowed Response HTTP Headers",
"type": "array",
"items": {
"type": "string"
},
"minLength": 1,
"uniqueItems": true,
"default": ["Content-Type"]
},
"allow_credentials": {
"type": "boolean",
"title": "Allow HTTP Credentials",
"default": false,
"description": "Indicates whether the request can include user credentials like cookies, HTTP authentication or client side SSL certificates."
},
"max_age": {
"type": "integer",
"default": 0,
"title": "Maximum Age",
"description": "Indicates how long (in seconds) the results of a preflight request can be cached. The default is 0 which stands for no max age."
},
"debug": {
"type": "boolean",
"default": false,
"title": "Enable Debugging",
"description": "Set to true to debug server side CORS issues."
}
},
"additionalProperties": false
},
"handlerSwitch": {
"title": "Enabled",
"type": "boolean",
"default": false,
"examples": [true],
"description": "En-/disables this component."
},
"scopeStrategy": {
"title": "Scope Strategy",
"type": "string",
"enum": ["hierarchic", "exact", "wildcard", "none"],
"default": "none",
"description": "Sets the strategy validation algorithm."
},
"configErrorsRedirect": {
"type": "object",
"title": "HTTP Redirect Error Handler",
"description": "This section is optional when the error handler is disabled.",
"additionalProperties": false,
"required": ["to"],
"properties": {
"to": {
"title": "Redirect to",
"description": "Set the redirect target. Can either be a http/https URL, or a relative URL.",
"type": "string",
"format": "uri-reference",
"examples": [
"http://my-app.com/dashboard",
"https://my-app.com/dashboard",
"/dashboard"
]
},
"code": {
"title": "HTTP Redirect Status Code",
"description": "Defines the HTTP Redirect status code which can bei 301 (Moved Permanently) or 302 (Found).",
"type": "integer",
"enum": [301, 302],
"default": 302
},
"return_to_query_param": {
"title": "URL query parameter",
"description": "Adds the original URL the request tried to access to the query parameter.",
"type": "string",
"pattern": "^[A-Za-z0-9,._~-]*$",
"default": ""
},
"when": {
"$ref": "#/definitions/configErrorsWhen"
}
}
},
"configErrorsWhen": {
"title": "Error Handler Conditions",
"description": "Conditions set under which circumstances an error handler should be responsible for handling the request. If no conditions are given, the error handler will be responsible for all requests. Sections error and request are combined using AND.",
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"error": {
"title": "Error Type Conditions",
"description": "Defines which error this error handler should listen to. The list uses OR (e.g. when the error is not_found OR unauthorized). If left empty, all errors will be handled by this error handler.",
"type": "array",
"additionalItems": false,
"items": {
"type": "string",
"enum": [
"unauthorized",
"forbidden",
"internal_server_error",
"not_found"
]
}
},
"request": {
"title": "HTTP Request Conditions",
"description": "Defines which HTTP Request conditions must be met for this error handler to be executed. If left empty, all HTTP requests will match. All subkeys (e.g. cidr, header.accept, header.content_type) are handled as AND.",
"type": "object",
"additionalProperties": false,
"properties": {
"cidr": {
"title": "Client IP CIDR Mask",
"description": "Defines one or more CIDR masks to match the client IP (remote address and X-Forwarded-For) against. If empty, all IPs will be matched. If more than one value, OR will be applied (e.g. 129.168.1.0/24 OR 188.177.0.0/16.",
"type": "array",
"additionalItems": false,
"items": {
"type": "string"
}
},
"header": {
"title": "HTTP Request Header Conditions",
"description": "Defines conditions the HTTP Request Header must full fill for this handler to match the request. Subkeys are matched with AND. If, for example, both content_type and accept are set, both requirements must be matched for the handler to be responsible.",
"type": "object",
"additionalProperties": false,
"properties": {
"content_type": {
"type": "array",
"title": "HTTP Request Header Content Type Condition",
"description": "Defines the HTTP Header Content-Type condition. If left empty, all content types match. If more than one element is defined, at least one has to match.",
"additionalItems": false,
"item": {
"type": "string"
}
},
"accept": {
"type": "array",
"title": "HTTP Request Header Accept Condition",
"description": "Defines the HTTP Header Accept condition. If left empty, all accept values match. If more than one element is defined, at least one has to match.",
"additionalItems": false,
"item": {
"type": "string"
}
}
}
}
}
}
}
}
},
"configErrorsJSON": {
"type": "object",
"title": "JSON Error Handler",
"description": "This section is optional when the error handler is disabled.",
"additionalProperties": false,
"properties": {
"verbose": {
"type": "boolean"
},
"when": {
"$ref": "#/definitions/configErrorsWhen"
}
}
},
"configErrorsWWWAuthenticate": {
"type": "object",
"title": "WWW-Authenticate Error Handler",
"description": "This section is optional when the error handler is disabled.",
"additionalProperties": false,
"properties": {
"realm": {
"type": "string",
"title": "The WWW-Authenticate Realm",
"description": "This is a message that will be displayed by the browser. Most browsers show a message like \"The website says: `,<realm>`\". Using a real message is thus more appropriate than a Realm identifier.",
"default": "Please authenticate."
},
"when": {
"$ref": "#/definitions/configErrorsWhen"
}
}
},
"configAuthenticatorsAnonymous": {
"type": "object",
"title": "Anonymous Authenticator Configuration",
"description": "This section is optional when the authenticator is disabled.",
"properties": {
"subject": {
"type": "string",
"title": "Anonymous Subject",
"examples": ["guest", "anon", "unknown"],
"default": "anonymous",
"description": "Sets the anonymous username."
}
},
"additionalProperties": false
},
"configAuthenticatorsCookieSession": {
"type": "object",
"title": "Cookie Session Authenticator Configuration",
"description": "This section is optional when the authenticator is disabled.",
"properties": {
"check_session_url": {
"title": "Session Check URL",
"type": "string",
"format": "uri",
"description": "The origin to proxy requests to. If the response is a 200 with body `{ \"subject\": \"...\", \"extra\": {} }`. The request will pass the subject through successfully, otherwise it will be marked as unauthorized.\n\n>If this authenticator is enabled, this value is required.",
"examples": ["https://session-store-host"]
},
"only": {
"type": "array",
"items": {
"type": "string",
"additionalItems": false
},
"title": "Only Cookies",
"description": "A list of possible cookies to look for on incoming requests, and will fallthrough to the next authenticator if none of the passed cookies are set on the request."
},
"preserve_query": {
"title": "Preserve Query",
"type": "boolean",
"default": true,
"description": "When unset or set to true, any query parameters specified in `check_session_url` will be preserved instead of overwriting them with the query parameters from the original request"
},
"preserve_path": {
"title": "Preserve Path",
"type": "boolean",
"description": "When set to true, any path specified in `check_session_url` will be preserved instead of overwriting the path with the path from the original request."
},
"preserve_host": {
"title": "Preserve Host",
"type": "boolean",
"description": "When set to true the HTTP Header X-Forwarded-Host will be set to the original HTTP host."
},
"force_method": {
"title": "Force HTTP Method",
"type": "string",
"description": "When set uses the given HTTP method instead of the request HTTP method.",
"examples": ["GET", "POST"]
},
"forward_http_headers": {
"title": "Set Forward HTTP Headers",
"type": "array",
"description": "Set HTTP Headers allowed forwarding to upstream.",
"additionalProperties": {
"type": "string"
}
},
"additional_headers": {
"title": "Set Additional HTTP Headers",
"type": "object",
"description": "Set additional HTTP Headers for the Session Check URL.",
"additionalProperties": {
"type": "string"
}
},
"extra_from": {
"title": "Extra JSON Path",
"description": "The `extra` field in the ORY Oathkeeper authentication session is set using this JSON Path. Defaults to `extra`, and could be `@this` (for the root element), `foo.bar` (for key foo.bar), or any other valid GJSON path. See [GSJON Syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) for reference.",
"type": "string",
"default": "extra"
},
"subject_from": {
"title": "Subject JSON Path",
"description": "The `subject` field in the ORY Oathkeeper authentication session is set using this JSON Path. Defaults to `subject`. See [GSJON Syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) for reference.",
"type": "string",
"default": "subject"
}
},
"required": ["check_session_url"],
"additionalProperties": false
},
"configAuthenticatorsBearerToken": {
"type": "object",
"title": "Bearer Token Authenticator Configuration",
"description": "This section is optional when the authenticator is disabled.",
"properties": {
"check_session_url": {
"title": "Token Check URL",
"type": "string",
"format": "uri",
"description": "The origin to proxy requests to. If the response is a 200 with body `{ \"subject\": \"...\", \"extra\": {} }`. The request will pass the subject through successfully, otherwise it will be marked as unauthorized.\n\n>If this authenticator is enabled, this value is required.",
"examples": ["https://session-store-host"]
},
"token_from": {
"title": "Token From",
"description": "The location of the token.\n If not configured, the token will be received from a default location - 'Authorization' header.\n One and only one location (header or query) must be specified.",
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"header": {
"title": "Header",
"type": "string",
"description": "The header (case insensitive) that must contain a token for request authentication.\n It can't be set along with query_parameter or cookie."
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"query_parameter": {
"title": "Query Parameter",
"type": "string",
"description": "The query parameter (case sensitive) that must contain a token for request authentication.\n It can't be set along with header or cookie."
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"cookie": {
"title": "Cookie",
"type": "string",
"description": "The cookie (case sensitive) that must contain a token for request authentication.\n It can't be set along with header or query_parameter."
}
}
}
]
},
"prefix": {
"title": "Token Prefix",
"type": "string",
"description": "The token is considered only if it starts with this string."
},
"preserve_query": {
"title": "Preserve Query",
"type": "boolean",
"default": true,
"description": "When unset or set to true, any query parameters specified in `check_session_url` will be preserved instead of overwriting them with the query parameters from the original request"
},
"preserve_path": {
"title": "Preserve Path",
"type": "boolean",
"description": "When set to true, any path specified in `check_session_url` will be preserved instead of overwriting the path with the path from the original request"
},
"preserve_host": {
"title": "Preserve Host",
"type": "boolean",
"description": "When set to true the HTTP Header X-Forwarded-Host will be set to the original HTTP host."
},
"force_method": {
"title": "Force HTTP Method",
"type": "string",
"description": "When set uses the given HTTP method instead of the request HTTP method.",
"examples": ["GET", "POST"]
},
"forward_http_headers": {
"title": "Set Forward HTTP Headers",
"type": "array",
"description": "Set HTTP Headers allowed forwarding to upstream.",
"additionalProperties": {
"type": "string"
}
},
"additional_headers": {
"title": "Set Additional HTTP Headers",
"type": "object",
"description": "Set additional HTTP Headers for the Session Check URL.",
"additionalProperties": {
"type": "string"
}
},
"extra_from": {
"title": "Extra JSON Path",
"description": "The `extra` field in the ORY Oathkeeper authentication session is set using this JSON Path. Defaults to `extra`, and could be `@this` (for the root element), `foo.bar` (for key foo.bar), or any other valid GJSON path. See [GSJON Syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) for reference.",
"type": "string",
"default": "extra"
},
"subject_from": {
"title": "Subject JSON Path",
"description": "The `subject` field in the ORY Oathkeeper authentication session is set using this JSON Path. Defaults to `subject`. See [GSJON Syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) for reference.",
"type": "string",
"default": "sub"
}
},
"required": ["check_session_url"],
"additionalProperties": false
},
"configAuthenticatorsJwt": {
"type": "object",
"title": "JWT Authenticator Configuration",
"description": "This section is optional when the authenticator is disabled.",
"required": ["jwks_urls"],
"properties": {
"required_scope": {
"type": "array",
"title": "Required Token Scope",
"description": "An array of OAuth 2.0 scopes that are required when accessing an endpoint protected by this handler.\n If the token used in the Authorization header did not request that specific scope, the request is denied.",
"items": {
"type": "string"
}
},
"target_audience": {
"title": "Intended Audience",
"type": "array",
"description": "An array of audiences that are required when accessing an endpoint protected by this handler.\n If the token used in the Authorization header is not intended for any of the requested audiences, the request is denied.",
"items": {
"type": "string"
}
},
"trusted_issuers": {
"type": "array",
"items": {
"type": "string"
}
},
"allowed_algorithms": {
"type": "array",
"items": {
"type": "string"
}
},
"jwks_urls": {
"title": "JSON Web Key URLs",
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"description": "URLs where ORY Oathkeeper can retrieve JSON Web Keys from for validating the JSON Web Token. Usually something like \"https://my-keys.com/.well-known/jwks.json\". The response of that endpoint must return a JSON Web Key Set (JWKS).\n\n>If this authenticator is enabled, this value is required.",
"examples": [
[
"https://my-website.com/.well-known/jwks.json",
"https://my-other-website.com/.well-known/jwks.json",
"file://path/to/local/jwks.json"
]
]
},
"jwks_max_wait": {
"title": "Max await interval for the JWK fetch",
"type": "string",
"description": "The configuration which sets the max wait threshold when fetching new JWKs",
"default": "1s",
"examples": ["100ms", "1s"]
},
"jwks_ttl": {
"title": "JWK cache TTL configuration",
"type": "string",
"description": "The time interval for which fetched JWKs are cached",
"default": "30s",
"examples": ["30m", "6h"]
},
"scope_strategy": {
"$ref": "#/definitions/scopeStrategy"
},
"token_from": {
"title": "Token From",
"description": "The location of the token.\n If not configured, the token will be received from a default location - 'Authorization' header.\n One and only one location (header or query) must be specified.",
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"header": {
"title": "Header",
"type": "string",
"description": "The header (case insensitive) that must contain a token for request authentication.\n It can't be set along with query_parameter or cookie."
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"query_parameter": {
"title": "Query Parameter",
"type": "string",
"description": "The query parameter (case sensitive) that must contain a token for request authentication.\n It can't be set along with header or cookie."
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"cookie": {
"title": "Cookie",
"type": "string",
"description": "The cookie (case sensitive) that must contain a token for request authentication.\n It can't be set along with header or query_parameter."
}
}
}
]
}
},
"additionalProperties": false
},
"configAuthenticatorsOauth2ClientCredentials": {
"type": "object",
"title": "OAuth 2.0 Client Credentials Authenticator Configuration",
"description": "This section is optional when the authenticator is disabled.",
"properties": {
"token_url": {
"type": "string",
"description": "The OAuth 2.0 Token Endpoint that will be used to validate the client credentials.\n\n>If this authenticator is enabled, this value is required.",
"format": "uri",
"examples": ["https://my-website.com/oauth2/token"]
},
"required_scope": {
"type": "array",
"title": "Request Permissions (Token Scope)",
"description": "Scopes is an array of OAuth 2.0 scopes that are required when accessing an endpoint protected by this rule.\n If the token used in the Authorization header did not request that specific scope, the request is denied.",
"items": {
"type": "string"
}
},
"retry": {
"$ref": "#/definitions/retry"
},
"cache": {
"additionalProperties": false,
"type": "object",
"properties": {
"enabled": {
"$ref": "#/definitions/handlerSwitch"
},
"ttl": {
"type": "string",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$",
"title": "Cache Time to Live",
"description": "Can override the default behaviour of using the token exp time, and specify a set time to live for the token in the cache. If the token exp time is lower than the set value the token exp time will be used instead.",
"examples": ["5s"]
},
"max_tokens": {
"type": "integer",
"default": 1000,
"title": "Maximum Cached Tokens",
"description": "Max number of tokens to cache."
}
}
}
},
"required": ["token_url"],
"additionalProperties": false
},
"configAuthenticatorsOauth2Introspection": {
"type": "object",
"title": "OAuth 2.0 Introspection Authenticator Configuration",
"description": "This section is optional when the authenticator is disabled.",
"properties": {
"introspection_url": {
"type": "string",
"format": "uri",
"examples": ["https://my-website.com/oauth2/introspection"],
"title": "OAuth 2.0 Introspection URL",
"description": "The OAuth 2.0 Token Introspection endpoint URL.\n\n>If this authenticator is enabled, this value is required."
},
"scope_strategy": {
"$ref": "#/definitions/scopeStrategy"
},
"pre_authorization": {
"title": "Pre-Authorization",
"description": "Enable pre-authorization in cases where the OAuth 2.0 Token Introspection endpoint is protected by OAuth 2.0 Bearer Tokens that can be retrieved using the OAuth 2.0 Client Credentials grant.",
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"title": "Enabled",
"type": "boolean",
"default": false
},
"client_id": {
"type": "string",
"title": "OAuth 2.0 Client ID",
"description": "The OAuth 2.0 Client ID to be used for the OAuth 2.0 Client Credentials Grant.\n\n>If pre-authorization is enabled, this value is required."
},
"client_secret": {
"type": "string",
"title": "OAuth 2.0 Client Secret",
"description": "The OAuth 2.0 Client Secret to be used for the OAuth 2.0 Client Credentials Grant.\n\n>If pre-authorization is enabled, this value is required."
},
"token_url": {
"type": "string",
"format": "uri",
"title": "OAuth 2.0 Token URL",
"description": "The OAuth 2.0 Token Endpoint where the OAuth 2.0 Client Credentials Grant will be performed.\n\n>If pre-authorization is enabled, this value is required."
},
"audience": {
"type": "string",
"title": "OAuth 2.0 Audience",
"description": "The OAuth 2.0 Audience to be requested during the OAuth 2.0 Client Credentials Grant.",
"examples": ["http://www.example.com", "services:my-app"]
},
"scope": {
"type": "array",
"items": {
"type": "string"
},
"title": "OAuth 2.0 Scope",
"description": "The OAuth 2.0 Scope to be requested during the OAuth 2.0 Client Credentials Grant.",
"examples": [["foo", "bar"]]
}
},
"oneOf": [
{
"properties": {
"enabled": {
"const": false
}
}
},
{
"required": ["client_id", "client_secret", "token_url"],
"properties": {
"enabled": {
"const": true
},
"client_id": {
"type": "string",
"title": "OAuth 2.0 Client ID",
"description": "The OAuth 2.0 Client ID to be used for the OAuth 2.0 Client Credentials Grant.\n\n>If pre-authorization is enabled, this value is required."
},
"client_secret": {
"type": "string",
"title": "OAuth 2.0 Client Secret",
"description": "The OAuth 2.0 Client Secret to be used for the OAuth 2.0 Client Credentials Grant.\n\n>If pre-authorization is enabled, this value is required."
},
"token_url": {
"type": "string",
"format": "uri",
"title": "OAuth 2.0 Token URL",
"description": "The OAuth 2.0 Token Endpoint where the OAuth 2.0 Client Credentials Grant will be performed.\n\n>If pre-authorization is enabled, this value is required."
},
"scope": {
"type": "array",
"items": {
"type": "string"
},
"title": "OAuth 2.0 Scope",
"description": "The OAuth 2.0 Scope to be requested during the OAuth 2.0 Client Credentials Grant.",
"examples": [["foo", "bar"]]
}
}
}
]
},
"required_scope": {
"title": "Required Scope",
"description": "An array of OAuth 2.0 scopes that are required when accessing an endpoint protected by this handler.\n If the token used in the Authorization header did not request that specific scope, the request is denied.",
"type": "array",
"items": {
"type": "string"
}
},
"target_audience": {
"title": "Target Audience",
"description": "An array of audiences that are required when accessing an endpoint protected by this handler.\n If the token used in the Authorization header is not intended for any of the requested audiences, the request is denied.",
"type": "array",
"items": {
"type": "string"
}
},
"trusted_issuers": {
"title": "Trusted Issuers",
"description": "The token must have been issued by one of the issuers listed in this array.",
"type": "array",
"items": {
"type": "string"
}
},
"prefix": {
"title": "Token Prefix",
"type": "string",
"description": "The token is considered only if it starts with this string."
},
"preserve_host": {
"title": "Preserve Host",
"type": "boolean",
"description": "When set to true the HTTP Header X-Forwarded-Host will be set to the original HTTP host.",
"default": false
},
"introspection_request_headers": {
"title": "Introspection Request Headers",
"description": "Additional headers to be added to the introspection request.",
"type": "object"
},
"token_from": {
"title": "Token From",
"description": "The location of the token.\n If not configured, the token will be received from a default location - 'Authorization' header.\n One and only one location (header or query) must be specified.",
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"header": {
"title": "Header",
"type": "string",
"description": "The header (case insensitive) that must contain a token for request authentication.\n It can't be set along with query_parameter or cookie."
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"query_parameter": {
"title": "Query Parameter",
"type": "string",
"description": "The query parameter (case sensitive) that must contain a token for request authentication.\n It can't be set along with header or cookie."
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"cookie": {
"title": "Cookie",
"type": "string",
"description": "The cookie (case sensitive) that must contain a token for request authentication.\n It can't be set along with header or query_parameter."
}
}
}
]
},
"retry": {
"$ref": "#/definitions/retry"
},
"cache": {
"additionalProperties": false,
"type": "object",
"properties": {
"enabled": {
"$ref": "#/definitions/handlerSwitch"
},
"ttl": {
"type": "string",
"pattern": "^[0-9]+(ns|us|ms|s|m|h)$",
"title": "Cache Time to Live",
"description": "Can override the default behaviour of using the token exp time, and specify a set time to live for the token in the cache.",
"examples": ["5s"]
},
"max_cost": {
"type": "integer",
"default": 100000000,
"title": "Max Cost",
"description": "Max cost to cache."
}
}
}
},
"required": ["introspection_url"],
"additionalProperties": false
},
"configAuthorizersKetoEngineAcpOry": {
"type": "object",
"title": "ORY Keto Access Control Policy Authorizer Configuration",
"description": "This section is optional when the authorizer is disabled.",
"properties": {
"base_url": {
"title": "Base URL",
"type": "string",
"format": "uri",
"description": "The base URL of ORY Keto.\n\n>If this authorizer is enabled, this value is required.",
"examples": ["http://my-keto/"]
},
"required_action": {
"type": "string"
},
"required_resource": {
"type": "string"
},
"subject": {
"type": "string"
},
"flavor": {
"type": "string"
}
},
"required": ["base_url", "required_action", "required_resource"],
"additionalProperties": false
},
"configAuthorizersRemote": {
"type": "object",
"title": "Remote Configuration",
"description": "This section is optional when the authorizer is disabled.",
"properties": {
"remote": {
"title": "Remote Authorizer URL",
"type": "string",
"format": "uri",
"description": "The URL of the remote authorizer. The remote authorizer is expected to return either 200 OK or 403 Forbidden to allow/deny access.\n\n>If this authorizer is enabled, this value is required.",
"examples": ["https://host/path"]
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"forward_response_headers_to_upstream": {
"description": "A list of non simple headers the remote is allowed to return to mutate requests.",
"title": "Allowed Remote HTTP Headers for his Responses",
"type": "array",
"items": {
"type": "string"
},
"minLength": 0,
"uniqueItems": true,
"default": []
},
"retry": {
"$ref": "#/definitions/retry"
}
},
"required": ["remote"],
"additionalProperties": false
},
"configAuthorizersRemoteJSON": {
"type": "object",
"title": "Remote JSON Configuration",
"description": "This section is optional when the authorizer is disabled.",
"properties": {
"remote": {
"title": "Remote Authorizer URL",
"type": "string",
"format": "uri",
"description": "The URL of the remote authorizer. The remote authorizer is expected to return either 200 OK or 403 Forbidden to allow/deny access.\n\n>If this authorizer is enabled, this value is required.",
"examples": ["https://host/path"]
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"payload": {
"title": "JSON Payload",