forked from 3scale/APIcast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapicast-policy.json
50 lines (50 loc) · 1.88 KB
/
apicast-policy.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
{
"$schema": "http://apicast.io/policy-v1/schema#manifest#",
"name": "3scale auth caching",
"summary": "Controls how to cache authorizations returned by the 3scale backend.",
"description":
["Configures a cache for the authentication calls against the 3scale ",
"backend. This policy supports four kinds of caching: \n",
" - Strict: it only caches authorized calls. Denied and failed calls ",
"invalidate the cache entry.\n",
" - Resilient: caches authorized and denied calls. Failed calls do not ",
"invalidate the cache. This allows APIcast to authorize and deny calls ",
"according to the result of the last request made even when backend is ",
"down.\n",
"- Allow: caches authorized and denied calls. When backend is ",
"unavailable, it will cache an authorization. In practice, this means ",
"that when backend is down _any_ request will be authorized unless last ",
"call to backend for that request returned 'deny' (status code = 4xx). ",
"Make sure to understand the implications of this Caching mode before ",
"using it. \n",
"- None: disables caching."],
"version": "builtin",
"configuration": {
"type": "object",
"properties": {
"caching_type": {
"description": "Caching mode",
"type": "string",
"oneOf": [
{
"enum": ["strict"],
"title": "Strict: cache only authorized calls."
},
{
"enum": ["resilient"],
"title": "Resilient: authorize according to last request when backend is down."
},
{
"enum": ["allow"],
"title": "Allow: when backend is down, allow everything unless seen before and denied."
},
{
"enum": ["none"],
"title": "None: disable caching."
}
],
"default": "none"
}
}
}
}