-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathgateleen_routing_schema_routing_rules
228 lines (228 loc) · 6.98 KB
/
gateleen_routing_schema_routing_rules
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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Routing rules",
"additionalProperties": {
"$ref": "#/definitions/Rule"
},
"properties": {},
"definitions": {
"Rule": {
"description": "Describe how and where to forward a request.",
"properties": {
"url": {
"description": "An absolute URL of the backend where the requests are forwarded.\nUse `$1`, `$2`, to insert the groups captured in the rule map index regexp.\nEither url or path must be specified, not both.",
"format": "uri",
"type": "string"
},
"path": {
"description": "A local or storage path where the request are forwarded.\nUse `$1`, `$2`, to insert the groups captured in the rule map index regexp.\nEither url or path must be specified, not both.",
"type": "string"
},
"storage": {
"description": "Specify that requests must be directly forwarded to the resource storage, not via HTTP.\nThe value specifies the storage to use. It is storage suffix appended to Address.storageAddress()+\"-\".\nTypically \"main\", \"add-0\", \"add-1\", ...",
"type": "string"
},
"description": {
"description": "Documents the rule.",
"type": "string"
},
"doc": {
"description": "Link or reference to feature/specification documentation",
"type": "string"
},
"methods": {
"description": "Restricts the HTTP methods concerned by this rule (`GET`, `PUT`, `POST`, `DELETE`).\nWhen absent, all methods are concerned.",
"type": "array",
"items": {
"type": "string"
}
},
"basicAuth": {
"description": "To authenticate against the backend.",
"$ref": "#/definitions/BasicAuth"
},
"oAuthId": {
"description": "The id of the OAuth configuration to use to authenticate against the backend",
"type": "string"
},
"proxyOptions": {
"description": "Custom proxy options for this rule (forwarding)",
"$ref": "#/definitions/ProxyOptions"
},
"profile": {
"description": "The user profile fields to forward to backend as `X-User-*` HTTP header. Has o effect for local/storage forwarding.",
"type": "array",
"items": {
"type": "string"
}
},
"timeout": {
"description": "The connection timeout in seconds when contacting the backend. Has no effect for local/storage forwarding.",
"type": "integer",
"default": 30
},
"keepAliveTimeout": {
"description": "The keep alive timeout for HTTP/1.1 connections.",
"type": "integer",
"default": 60
},
"connectionPoolSize": {
"description": "The maximum number of concurrent connections to the backend. Has no effect for local/storage forwarding.",
"type": "integer",
"default": 50
},
"maxWaitQueueSize": {
"description": "The maximum number of requests allowed in the wait queue.",
"type": "integer",
"default": -1
},
"keepAlive": {
"description": "Keeps the connection to the backend open.\nThis may improve performance but degrades the reliability in case of failure, requests can be lost.\nHas no effect for local/storage forwarding.",
"default": false,
"type": "boolean"
},
"logExpiry": {
"description": "The number of seconds to keep track of the response body in the request log. Has no effect for local/storage forwarding.",
"type": "integer",
"default": "4*3600"
},
"translateStatus": {
"description": "Mapping to transform backend HTTP status.",
"type": "object",
"additionalProperties": {
"type": "integer"
}
},
"staticHeaders": {
"description": "Headers to set or override in the request sent to backend.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"headers": {
"description": "Manipulate (set / remove / replace) request headers - option to reference other header vales",
"type": "array",
"items": {
"$ref": "#/definitions/HeaderFunction"
}
},
"headersFilter": {
"description": "Also filter requests based on header values (besides url and http methods). RegEx can be used to define a filter",
"type": "string",
"minLength": 1
},
"metricName": {
"description": "Activates metric collection (JMX and crush-metrics.log) under this name. The metricName has to be unique over all rules",
"type": "string",
"minLength": 1
},
"expandOnBackend": {
"description": "Should gateleen do the expansion or should it pass-through to the backend",
"type": "boolean"
},
"deltaOnBackend": {
"description": "Should gateleen do the delta handling or should it pass-through to the backend",
"type": "boolean"
},
"storageExpand": {
"description": "Should gateleen do the expansion or should it pass-through to the storage",
"type": "boolean"
}
},
"additionalProperties": false,
"not": {
"title": "Disallows use of deprecated 'staticHeaders' and new 'headers' at the same time. Also either one of 'basicAuth' or 'oAuthId' is allowed",
"description": "Disallows use of deprecated 'staticHeaders' and new 'headers' at the same time. Also either one of 'basicAuth' or 'oAuthId' is allowed",
"anyOf": [
{
"required": [
"staticHeaders",
"headers"
]
},
{
"required": [
"basicAuth",
"oAuthId"
]
}
]
}
},
"BasicAuth": {
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"username",
"password"
],
"additionalProperties": false
},
"ProxyOptions": {
"properties": {
"type": {
"type": "string",
"enum": [
"HTTP",
"SOCKS4",
"SOCKS5"
]
},
"host": {
"type": "string"
},
"port": {
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"username": {
"type": "string"
},
"password": {
"type": "string"
}
},
"required": [
"host",
"port"
],
"additionalProperties": false
},
"HeaderFunction": {
"properties": {
"header": {
"description": "the request-header name to manipulate (set, remove or conditional set)",
"type": "string",
"minLength": 1
},
"value": {
"description": "the value to be set. null and empty string means 'remove the header'. value can contain other header names between single angular brackets which resolves to their values accordingly",
"type": [
"null",
"string"
]
},
"mode": {
"description": "define a condition-mode. 'complete' sets the header value only if this header is not yet presen. 'overwrite' sets the header value only if the header is already present. Ignored if value is null or empty string",
"type": "string",
"enum": [
"complete",
"override"
]
}
},
"required": [
"header",
"value"
]
}
}
}