-
Notifications
You must be signed in to change notification settings - Fork 415
Expand file tree
/
Copy pathswagger.json
More file actions
executable file
·465 lines (465 loc) · 17.6 KB
/
Copy pathswagger.json
File metadata and controls
executable file
·465 lines (465 loc) · 17.6 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
{
"consumes": ["application/json"],
"produces": ["application/json"],
"schemes": ["http", "https"],
"swagger": "2.0",
"info": {
"description": "ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.",
"title": "ORY Oathkeeper",
"contact": {
"name": "ORY",
"url": "https://www.ory.am",
"email": "hi@ory.am"
},
"version": "Latest"
},
"basePath": "/",
"paths": {
"/.well-known/jwks.json": {
"get": {
"description": "This endpoint returns cryptographic keys that are required to, for example, verify signatures of ID Tokens.",
"produces": ["application/json"],
"schemes": ["http", "https"],
"tags": ["api"],
"summary": "Lists Cryptographic Keys",
"operationId": "getWellKnownJSONWebKeys",
"responses": {
"200": {
"description": "jsonWebKeySet",
"schema": {
"$ref": "#/definitions/jsonWebKeySet"
}
},
"500": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
}
}
}
},
"/decisions": {
"get": {
"description": "\u003e This endpoint works with all HTTP Methods (GET, POST, PUT, ...) and matches every path prefixed with /decisions.\n\nThis endpoint mirrors the proxy capability of ORY Oathkeeper's proxy functionality but instead of forwarding the\nrequest to the upstream server, returns 200 (request should be allowed), 401 (unauthorized), or 403 (forbidden)\nstatus codes. This endpoint can be used to integrate with other API Proxies like Ambassador, Kong, Envoy, and many more.",
"schemes": ["http", "https"],
"tags": ["api"],
"summary": "Access Control Decision API",
"operationId": "decisions",
"responses": {
"200": {
"$ref": "#/responses/emptyResponse"
},
"401": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"403": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"404": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"500": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
}
}
}
},
"/health/alive": {
"get": {
"description": "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.",
"produces": ["application/json"],
"tags": ["api"],
"summary": "Check Alive Status",
"operationId": "isInstanceAlive",
"responses": {
"200": {
"description": "healthStatus",
"schema": {
"$ref": "#/definitions/healthStatus"
}
},
"500": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
}
}
}
},
"/health/ready": {
"get": {
"description": "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.",
"produces": ["application/json"],
"tags": ["api"],
"summary": "Check Readiness Status",
"operationId": "isInstanceReady",
"responses": {
"200": {
"description": "healthStatus",
"schema": {
"$ref": "#/definitions/healthStatus"
}
},
"503": {
"description": "healthNotReadyStatus",
"schema": {
"$ref": "#/definitions/healthNotReadyStatus"
}
}
}
}
},
"/rules": {
"get": {
"description": "This method returns an array of all rules that are stored in the backend. This is useful if you want to get a full\nview of what rules you have currently in place.",
"consumes": ["application/json"],
"produces": ["application/json"],
"schemes": ["http", "https"],
"tags": ["api"],
"summary": "List All Rules",
"operationId": "listRules",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "The maximum amount of rules returned.",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "The offset from where to start looking.",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/rules"
},
"500": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
}
}
}
},
"/rules/{id}": {
"get": {
"description": "Use this method to retrieve a rule from the storage. If it does not exist you will receive a 404 error.",
"consumes": ["application/json"],
"produces": ["application/json"],
"schemes": ["http", "https"],
"tags": ["api"],
"summary": "Retrieve a Rule",
"operationId": "getRule",
"parameters": [
{
"type": "string",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/rule"
},
"404": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
},
"500": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
}
}
}
},
"/version": {
"get": {
"description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.",
"produces": ["application/json"],
"tags": ["api"],
"summary": "Get Service Version",
"operationId": "getVersion",
"responses": {
"200": {
"description": "version",
"schema": {
"$ref": "#/definitions/version"
}
}
}
}
}
},
"definitions": {
"Upstream": {
"type": "object",
"properties": {
"preserve_host": {
"description": "PreserveHost, if false (the default), tells ORY Oathkeeper to set the upstream request's Host header to the\nhostname of the API's upstream's URL. Setting this flag to true instructs ORY Oathkeeper not to do so.",
"type": "boolean"
},
"strip_path": {
"description": "StripPath if set, replaces the provided path prefix when forwarding the requested URL to the upstream URL.",
"type": "string"
},
"url": {
"description": "URL is the URL the request will be proxied to.",
"type": "string"
}
}
},
"genericError": {
"description": "The standard error format",
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"details": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"message": {
"type": "string"
},
"reason": {
"type": "string"
},
"request": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"healthNotReadyStatus": {
"type": "object",
"title": "The not ready status of the service.",
"properties": {
"errors": {
"description": "Errors contains a list of errors that caused the not ready status.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"healthStatus": {
"type": "object",
"title": "The health status of the service.",
"properties": {
"status": {
"description": "Status always contains \"ok\".",
"type": "string"
}
}
},
"jsonWebKey": {
"type": "object",
"properties": {
"alg": {
"description": "The \"alg\" (algorithm) parameter identifies the algorithm intended for\nuse with the key. The values used should either be registered in the\nIANA \"JSON Web Signature and Encryption Algorithms\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name.",
"type": "string"
},
"crv": {
"type": "string"
},
"d": {
"type": "string"
},
"dp": {
"type": "string"
},
"dq": {
"type": "string"
},
"e": {
"type": "string"
},
"k": {
"type": "string"
},
"kid": {
"description": "The \"kid\" (key ID) parameter is used to match a specific key. This\nis used, for instance, to choose among a set of keys within a JWK Set\nduring key rollover. The structure of the \"kid\" value is\nunspecified. When \"kid\" values are used within a JWK Set, different\nkeys within the JWK Set SHOULD use distinct \"kid\" values. (One\nexample in which different keys might use the same \"kid\" value is if\nthey have different \"kty\" (key type) values but are considered to be\nequivalent alternatives by the application using them.) The \"kid\"\nvalue is a case-sensitive string.",
"type": "string"
},
"kty": {
"description": "The \"kty\" (key type) parameter identifies the cryptographic algorithm\nfamily used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\neither be registered in the IANA \"JSON Web Key Types\" registry\nestablished by [JWA] or be a value that contains a Collision-\nResistant Name. The \"kty\" value is a case-sensitive string.",
"type": "string"
},
"n": {
"type": "string"
},
"p": {
"type": "string"
},
"q": {
"type": "string"
},
"qi": {
"type": "string"
},
"use": {
"description": "The \"use\" (public key use) parameter identifies the intended use of\nthe public key. The \"use\" parameter is employed to indicate whether\na public key is used for encrypting data or verifying the signature\non data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).",
"type": "string"
},
"x": {
"type": "string"
},
"x5c": {
"description": "The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\nor more PKIX certificates [RFC5280]. The certificate chain is\nrepresented as a JSON array of certificate value strings. Each\nstring in the array is a base64-encoded (Section 4 of [RFC4648] --\nnot base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\nThe PKIX certificate containing the key value MUST be the first\ncertificate.",
"type": "array",
"items": {
"type": "string"
}
},
"y": {
"type": "string"
}
}
},
"jsonWebKeySet": {
"type": "object",
"properties": {
"keys": {
"description": "The value of the \"keys\" parameter is an array of JWK values. By\ndefault, the order of the JWK values within the array does not imply\nan order of preference among them, although applications of JWK Sets\ncan choose to assign a meaning to the order for their purposes, if\ndesired.",
"type": "array",
"items": {
"$ref": "#/definitions/jsonWebKey"
}
}
}
},
"rule": {
"type": "object",
"title": "swaggerRule is a single rule that will get checked on every HTTP request.",
"properties": {
"authenticators": {
"description": "Authenticators is a list of authentication handlers that will try and authenticate the provided credentials.\nAuthenticators are checked iteratively from index 0 to n and if the first authenticator to return a positive\nresult will be the one used.\n\nIf you want the rule to first check a specific authenticator before \"falling back\" to others, have that authenticator\nas the first item in the array.",
"type": "array",
"items": {
"$ref": "#/definitions/ruleHandler"
}
},
"authorizer": {
"$ref": "#/definitions/ruleHandler"
},
"description": {
"description": "Description is a human readable description of this rule.",
"type": "string"
},
"id": {
"description": "ID is the unique id of the rule. It can be at most 190 characters long, but the layout of the ID is up to you.\nYou will need this ID later on to update or delete the rule.",
"type": "string"
},
"match": {
"$ref": "#/definitions/ruleMatch"
},
"mutators": {
"description": "Mutators is a list of mutation handlers that transform the HTTP request. A common use case is generating a new set\nof credentials (e.g. JWT) which then will be forwarded to the upstream server.\n\nMutations are performed iteratively from index 0 to n and should all succeed in order for the HTTP request to be forwarded.",
"type": "array",
"items": {
"$ref": "#/definitions/ruleHandler"
}
},
"upstream": {
"$ref": "#/definitions/Upstream"
}
}
},
"ruleHandler": {
"type": "object",
"properties": {
"config": {
"description": "Config contains the configuration for the handler. Please read the user\nguide for a complete list of each handler's available settings."
},
"handler": {
"description": "Handler identifies the implementation which will be used to handle this specific request. Please read the user\nguide for a complete list of available handlers.",
"type": "string"
}
}
},
"ruleMatch": {
"type": "object",
"properties": {
"methods": {
"description": "An array of HTTP methods (e.g. GET, POST, PUT, DELETE, ...). When ORY Oathkeeper searches for rules\nto decide what to do with an incoming request to the proxy server, it compares the HTTP method of the incoming\nrequest with the HTTP methods of each rules. If a match is found, the rule is considered a partial match.\nIf the matchesUrl field is satisfied as well, the rule is considered a full match.",
"type": "array",
"items": {
"type": "string"
}
},
"url": {
"description": "This field represents the URL pattern this rule matches. When ORY Oathkeeper searches for rules\nto decide what to do with an incoming request to the proxy server, it compares the full request URL\n(e.g. https://mydomain.com/api/resource) without query parameters of the incoming\nrequest with this field. If a match is found, the rule is considered a partial match.\nIf the matchesMethods field is satisfied as well, the rule is considered a full match.\n\nYou can use regular expressions in this field to match more than one url. Regular expressions are encapsulated in\nbrackets \u003c and \u003e. The following example matches all paths of the domain `mydomain.com`: `https://mydomain.com/\u003c.*\u003e`.",
"type": "string"
}
}
},
"unexpectedError": {
"type": "string"
},
"version": {
"type": "object",
"properties": {
"version": {
"description": "Version is the service's version.",
"type": "string"
}
}
},
"UUID": { "type": "string", "format": "uuid4" }
},
"responses": {
"emptyResponse": {
"description": "An empty response"
},
"rule": {
"description": "A rule",
"schema": {
"$ref": "#/definitions/rule"
}
},
"rules": {
"description": "A list of rules",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/rule"
}
}
}
},
"x-forwarded-proto": "string",
"x-request-id": "string"
}