-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathapicast-policy.json
More file actions
120 lines (120 loc) · 3.4 KB
/
apicast-policy.json
File metadata and controls
120 lines (120 loc) · 3.4 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
{
"$schema": "http://apicast.io/policy-v1.1/schema",
"name": "Logging",
"summary": "Controls logging.",
"description": [
"Controls logging. It allows to enable and disable access logs per ",
"service. Also it allows to have a custom access logs format per service"
],
"version": "builtin",
"configuration": {
"definitions": {
"value_type": {
"type": "string",
"oneOf": [
{
"enum": [
"plain"
],
"title": "Evaluate as plain text."
},
{
"enum": [
"liquid"
],
"title": "Evaluate as liquid."
}
]
}
},
"type": "object",
"properties": {
"enable_access_logs": {
"description": "Whether to enable access logs for the service",
"type": "boolean"
},
"custom_logging": {
"title": "Custom logging format",
"description": "A string variable that uses liquid templating to render a custom access log entry. All Nginx variables can be used plus per service entries",
"type": "string"
},
"enable_json_logs": {
"description": "To enable logs in json format. Custom logging format will be disabled",
"type": "boolean"
},
"json_object_config": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"description": "Key for the the json object",
"type": "string"
},
"value": {
"description": "String to get request information",
"type": "string"
},
"value_type": {
"description": "How to evaluate 'value' field",
"$ref": "#/definitions/value_type"
}
}
}
},
"condition": {
"type": "object",
"properties": {
"operations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"op": {
"description": "Match operation to compare match field with the provided value",
"type": "string",
"enum": [
"==",
"!=",
"matches"
]
},
"match": {
"description": "String to get request information to match",
"type": "string"
},
"match_type": {
"description": "How to evaluate 'match' value",
"$ref": "#/definitions/value_type"
},
"value": {
"description": "Value to compare the retrieved match",
"type": "string"
},
"value_type": {
"description": "How to evaluate 'value' field",
"$ref": "#/definitions/value_type"
}
},
"required": [
"op",
"match",
"match_type",
"value",
"value_type"
]
}
},
"combine_op": {
"type": "string",
"enum": [
"and",
"or"
],
"default": "and"
}
}
}
}
}
}