Skip to content

Commit e2ab9dc

Browse files
committed
Add KrakenD new schemas
Signed-off-by: Juan Cruz Viotti <[email protected]>
1 parent 70b68be commit e2ab9dc

File tree

106 files changed

+10600
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+10600
-31
lines changed

DEPENDENCIES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ manfred-mac-0-5 https://github.com/getmanfred/mac v0.5
2626
manfred-mac-0-4 https://github.com/getmanfred/mac v0.4
2727
manfred-mac-0-3 https://github.com/getmanfred/mac v0.3
2828
movielabs-omc-2-6 https://github.com/MovieLabs/OMC v2.6-release-1
29-
krakend https://github.com/krakend/krakend-schema f0017549d15c54445675077f4a18447d1320274e
29+
krakend https://github.com/krakend/krakend-schema 9193cfffbdce30aec18bf1f90a4cde499e9089f8
3030
octue-power-curve https://github.com/octue/power-curve-schema 1.0.0.alpha-1
3131
usnistgov-mgi-2022-08 https://github.com/usnistgov/mgi-json-schema e5e6aaf3f5eae0d15b88ecbd57f44cc28b035f11
3232
cloudevents-1-0-0 https://github.com/cloudevents/spec v1.0

vendor/krakend.mask

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ v2.7/krakend.json
99
v2.8/krakend.json
1010
v2.9/krakend.json
1111
v2.9/_root.json
12+
v2.10/krakend.json
13+
v2.10/_root.json

vendor/krakend/v2.10/async/amqp.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.krakend.io/schema/v2.10/async/amqp.json",
4+
"title": "Async AMQP Driver",
5+
"description": "The Async AMQP component enables the AMQP driver for the Async functionality.\n\nSee: https://www.krakend.io/docs/async/amqp/",
6+
"type": "object",
7+
"required": [
8+
"name",
9+
"host",
10+
"exchange"
11+
],
12+
"properties": {
13+
"auto_ack": {
14+
"$id": "#async/amqp/auto_ack",
15+
"title": "Auto ACK",
16+
"description": "When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACK. When auto ACK is not used, only successful backend responses do the ACK, and failing messages are requeued. Defaults to `false`.\n\nSee: https://www.krakend.io/docs/async/amqp/",
17+
"default": false,
18+
"type": "boolean"
19+
},
20+
"delete": {
21+
"$id": "#async/amqp/delete",
22+
"title": "Delete",
23+
"description": "When `true`, AMQP deletes the queue when there are no remaining connections. This option is **not recommended** in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.\n\nSee: https://www.krakend.io/docs/async/amqp/",
24+
"default": false,
25+
"type": "boolean"
26+
},
27+
"durable": {
28+
"$id": "#async/amqp/durable",
29+
"title": "Durable",
30+
"description": "Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. Most of the times `true` is recommended, but depends on the use case.\n\nSee: https://www.krakend.io/docs/async/amqp/",
31+
"default": false,
32+
"type": "boolean"
33+
},
34+
"exchange": {
35+
"$id": "#async/amqp/exchange",
36+
"title": "Exchange",
37+
"description": "The entity name where messages are retrieved (it will be created, or it must have a **topic** type if already exists).\n\nSee: https://www.krakend.io/docs/async/amqp/",
38+
"examples": [
39+
"some-exchange"
40+
],
41+
"type": "string"
42+
},
43+
"exclusive": {
44+
"$id": "#async/amqp/exclusive",
45+
"title": "Exclusive",
46+
"description": "When `true`, AMQP will allow **a single KrakenD client** to access the queue. This option is **not recommended** in environments where the gateway needs high availability and you have several instances running.\n\nSee: https://www.krakend.io/docs/async/amqp/",
47+
"default": false,
48+
"type": "boolean"
49+
},
50+
"host": {
51+
"$id": "#async/amqp/host",
52+
"title": "Host",
53+
"description": "The connection string, ends in slash. E.g: `amqp://user:password@host:5672/`.\n\nSee: https://www.krakend.io/docs/async/amqp/",
54+
"type": "string"
55+
},
56+
"name": {
57+
"$id": "#async/amqp/name",
58+
"title": "Name",
59+
"description": "The queue name.\n\nSee: https://www.krakend.io/docs/async/amqp/",
60+
"type": "string"
61+
},
62+
"no_local": {
63+
"$id": "#async/amqp/no_local",
64+
"title": "No local",
65+
"description": "The no_local flag is not supported by RabbitMQ.\n\nSee: https://www.krakend.io/docs/async/amqp/",
66+
"type": "boolean"
67+
},
68+
"no_wait": {
69+
"$id": "#async/amqp/no_wait",
70+
"title": "No wait",
71+
"description": "When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.\n\nSee: https://www.krakend.io/docs/async/amqp/",
72+
"type": "boolean"
73+
},
74+
"prefetch_count": {
75+
"$id": "#async/amqp/prefetch_count",
76+
"title": "Prefetch count",
77+
"description": "The number of messages you want to prefetch prior to consume them.\n\nSee: https://www.krakend.io/docs/async/amqp/",
78+
"default": 10,
79+
"type": "integer"
80+
},
81+
"prefetch_size": {
82+
"$id": "#async/amqp/prefetch_size",
83+
"title": "Prefetch size",
84+
"description": "The number of bytes you want to use to prefetch messages.\n\nSee: https://www.krakend.io/docs/async/amqp/",
85+
"default": 0,
86+
"type": "integer"
87+
}
88+
},
89+
"patternProperties": {
90+
"^[@$_#]": {}
91+
},
92+
"additionalProperties": false
93+
}

vendor/krakend/v2.10/async_agent.json

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.krakend.io/schema/v2.10/async_agent.json",
4+
"title": "Async Agents",
5+
"description": "Async agents are routines listening to queues or PubSub systems that react to new events and push data to your backends. Through async agents, you can start a lot of consumers to process your events autonomously.\n\nSee: https://www.krakend.io/docs/async/",
6+
"type": "array",
7+
"items": {
8+
"type": "object",
9+
"required": [
10+
"name",
11+
"consumer",
12+
"backend",
13+
"extra_config"
14+
],
15+
"properties": {
16+
"backend": {
17+
"title": "Backend definition",
18+
"description": "The [backend definition](https://www.krakend.io/docs/backends/) (as you might have in any endpoint) indicating where the event data is sent. It is a full backend object definition, with all its possible options, transformations, filters, validations, etc.",
19+
"type": "array",
20+
"items": {
21+
"$ref": "backend.json"
22+
}
23+
},
24+
"connection": {
25+
"$id": "#async_agent/connection",
26+
"title": "Connection",
27+
"description": "A key defining all the connection settings between the agent and your messaging system.\n\nSee: https://www.krakend.io/docs/async/",
28+
"type": "object",
29+
"properties": {
30+
"backoff_strategy": {
31+
"title": "Backoff strategy",
32+
"description": "When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the `max_retries`. The backoff strategy defines the delay in seconds in between consecutive failed retries.\n\nSee: https://www.krakend.io/docs/async/",
33+
"default": "fallback",
34+
"enum": [
35+
"linear",
36+
"linear-jitter",
37+
"exponential",
38+
"exponential-jitter",
39+
"fallback"
40+
]
41+
},
42+
"health_interval": {
43+
"title": "Health interval",
44+
"description": "The time between pings checking that the agent is connected to the queue and alive. Regardless of the health interval, if an agent fails, KrakenD will restart it again immediately as defined by `max_retries`and `backoff_strategy`.\n\nSee: https://www.krakend.io/docs/async/",
45+
"default": "1s",
46+
"$ref": "timeunits.json#/$defs/timeunit"
47+
},
48+
"max_retries": {
49+
"title": "Max retries",
50+
"description": "The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. Use 0 for unlimited retries.\n\nSee: https://www.krakend.io/docs/async/",
51+
"default": 0,
52+
"type": "integer"
53+
}
54+
}
55+
},
56+
"consumer": {
57+
"$id": "#async_agent/consumer",
58+
"title": "Consumer",
59+
"description": "Defines all the settings for each agent consuming messages.\n\nSee: https://www.krakend.io/docs/async/",
60+
"required": [
61+
"topic"
62+
],
63+
"properties": {
64+
"max_rate": {
65+
"title": "Max Rate",
66+
"description": "The maximum number of messages you allow each worker to consume per second. Use any of `0` or `-1` for unlimited speed.\n\nSee: https://www.krakend.io/docs/async/",
67+
"default": 0,
68+
"type": "number"
69+
},
70+
"timeout": {
71+
"title": "Timeout",
72+
"description": "The maximum time the agent will wait to process an event sent to the backend. If the backend fails to process it, the message is reinserted for later consumption. Defaults to the timeout in the root level, or to `2s` if no value is declared.\n\nSee: https://www.krakend.io/docs/async/",
73+
"$ref": "timeunits.json#/$defs/timeunit"
74+
},
75+
"topic": {
76+
"title": "Topic",
77+
"description": "The topic name you want to consume. The syntax depends on the driver. Examples for AMQP: `*`, `mytopic`, `lazy.#`, `*`, `foo.*`.\n\nSee: https://www.krakend.io/docs/async/",
78+
"type": "string"
79+
},
80+
"workers": {
81+
"title": "Workers",
82+
"description": "The number of workers (consuming processes) you want to start simultaneously for this agent.\n\nSee: https://www.krakend.io/docs/async/",
83+
"default": 1,
84+
"type": "integer"
85+
}
86+
}
87+
},
88+
"encoding": {
89+
"$id": "#backend/encoding",
90+
"title": "Backend Encoding",
91+
"description": "Informs KrakenD how to parse the responses of your services.\n\nSee: https://www.krakend.io/docs/backends/supported-encodings/",
92+
"default": "json",
93+
"enum": [
94+
"json",
95+
"safejson",
96+
"xml",
97+
"rss",
98+
"string",
99+
"no-op"
100+
]
101+
},
102+
"extra_config": {
103+
"description": "Defines the driver that connects to your queue or PubSub system. In addition, you can place other middlewares to modify the request (message) or the response, apply logic or any other endpoint middleware, but adding the driver is mandatory.\n\nSee: https://www.krakend.io/docs/async/",
104+
"required": [
105+
"async/amqp"
106+
],
107+
"properties": {
108+
"async/amqp": {
109+
"title": "Async Agent extra configuration",
110+
"description": "See the configuration for async/amqp",
111+
"$ref": "async/amqp.json"
112+
}
113+
}
114+
},
115+
"name": {
116+
"$id": "#async_agent/name",
117+
"title": "Name",
118+
"description": "A unique name for this agent. KrakenD shows it in the health endpoint and logs and metrics. KrakenD does not check collision names, so make sure each agent has a different name.\n\nSee: https://www.krakend.io/docs/async/",
119+
"type": "string"
120+
}
121+
},
122+
"patternProperties": {
123+
"^[@$_#]": {}
124+
},
125+
"additionalProperties": false
126+
}
127+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.krakend.io/schema/v2.10/auth/api-keys.json",
4+
"title": "API-key Authentication",
5+
"description": "Enterprise only. Enables a Role-Based Access Control (RBAC) mechanism by reading the `Authorization` header of incoming requests.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
6+
"type": "object",
7+
"required": [
8+
"keys"
9+
],
10+
"properties": {
11+
"hash": {
12+
"$id": "#auth/api-keys/hash",
13+
"title": "Hash",
14+
"description": "The hashing function used to store the value of the key. When you use `plain` the API key is written as it will passed by the user. The rest of the hashes require you to save the API key after applying the desired function.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
15+
"default": "plain",
16+
"enum": [
17+
"plain",
18+
"fnv128",
19+
"sha256",
20+
"sha1"
21+
]
22+
},
23+
"identifier": {
24+
"$id": "#auth/api-keys/identifier",
25+
"title": "Identifier",
26+
"description": "The header name or the query string name that contains the API key. Defaults to `key` when using the `query_string` strategy and to `Authorization` when using the `header` strategy. The identifier set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
27+
"examples": [
28+
"Authorization",
29+
"X-Key"
30+
],
31+
"default": "Authorization",
32+
"type": "string"
33+
},
34+
"keys": {
35+
"$id": "#auth/api-keys/keys",
36+
"title": "API Keys",
37+
"description": "A list of objects defining each API Key.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
38+
"type": "array",
39+
"items": {
40+
"type": "object",
41+
"properties": {
42+
"key": {
43+
"title": "API Key",
44+
"description": "The secret key used by the client to access the resources. Don't have a key? Execute in a terminal `uuidgen` to generate a random one.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
45+
"type": "string"
46+
},
47+
"roles": {
48+
"title": "Roles",
49+
"description": "All the roles this user has. See roles as all the identifying labels that belong to this client.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
50+
"type": "array",
51+
"items": {
52+
"type": "string"
53+
}
54+
}
55+
},
56+
"patternProperties": {
57+
"^[@$_#]": {}
58+
},
59+
"additionalProperties": false
60+
}
61+
},
62+
"propagate_role": {
63+
"title": "Propagate role as header",
64+
"description": "The name of a header that will propagate to the backend containing the matching role. The backend receives no header when the string is empty, or the attribute is not declared. Otherwise, the backend receives the declared header name containing **the first matching role of the user**. The header value will be `ANY` when the endpoint does not require roles. For instance, if an API key has roles `[A, B]`, and the endpoint demands roles `[B, C]`, the backend will receive a header with the value `B`.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
65+
"examples": [
66+
"X-Krakend-Role"
67+
],
68+
"default": "",
69+
"type": "string"
70+
},
71+
"salt": {
72+
"$id": "#auth/api-keys/salt",
73+
"title": "Salt",
74+
"description": "A salt string for the desired hashing function. When provided, the API key is concatenated after the salt string and both hashed together.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
75+
"examples": [
76+
"mySalt"
77+
],
78+
"default": "",
79+
"type": "string"
80+
},
81+
"strategy": {
82+
"$id": "#auth/api-keys/strategy",
83+
"title": "Strategy",
84+
"description": "Specifies where to expect the user API key, whether inside a header or as part of the query string. The strategy set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
85+
"default": "header",
86+
"enum": [
87+
"header",
88+
"query_string"
89+
]
90+
}
91+
},
92+
"patternProperties": {
93+
"^[@$_#]": {}
94+
},
95+
"additionalProperties": false
96+
}

vendor/krakend/v2.10/auth/basic.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://www.krakend.io/schema/v2.10/auth/basic.json",
4+
"description": "Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/",
5+
"type": "object",
6+
"properties": {
7+
"htpasswd_path": {
8+
"title": "Path to htpasswd file",
9+
"description": "Absolute Path to the `htpasswd` filename (recommended) or relative `./` to the workdir (less secure).\n\nSee: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/",
10+
"examples": [
11+
"/path/to/.htpasswd"
12+
],
13+
"type": "string"
14+
},
15+
"users": {
16+
"title": "Additional users",
17+
"description": "**Additional** users to the `htpasswd` file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/",
18+
"examples": [
19+
{
20+
"admin": "$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...",
21+
"user2": "$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..."
22+
}
23+
],
24+
"type": "object",
25+
"patternProperties": {
26+
"(.*)": {
27+
"type": "string"
28+
}
29+
},
30+
"additionalProperties": false
31+
}
32+
},
33+
"patternProperties": {
34+
"^[@$_#]": {}
35+
},
36+
"additionalProperties": false
37+
}

0 commit comments

Comments
 (0)