forked from open-amt-cloud-toolkit/open-amt-cloud-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kong.yaml
158 lines (138 loc) · 3.33 KB
/
kong.yaml
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
#*********************************************************************
# Copyright (c) Intel Corporation 2018-2019
# SPDX-License-Identifier: Apache-2.0
#*********************************************************************
# Metadata fields start with an underscore (_)
# Fields that do not start with an underscore represent Kong entities and attributes
# _format_version is mandatory,
# it specifies the minimum version of Kong that supports the format
_format_version: "2.1"
# _transform is optional, defaulting to true.
# It specifies whether schema transformations should be applied when importing this file
# as a rule of thumb, leave this setting to true if you are importing credentials
# with plain passwords, which need to be encrypted/hashed before storing on the database.
# On the other hand, if you are reimporting a database with passwords already encrypted/hashed,
# set it to false.
_transform: true
# Each Kong entity (core entity or custom entity introduced by a plugin)
# can be listed in the top-level as an array of objects:
services:
- name: mps-rest
host: mpsrouter
port: 8003
tags:
- mps
routes:
- name: mps-login-route
strip_path: true
paths:
- /mps/login
- name: mps-relay-route
strip_path: true
paths:
- /mps/ws
- name: mps-route
strip_path: true
paths:
- /mps
- name: rps-rest
host: rps
port: 8081
tags:
- rps
routes:
- name: rps-route
strip_path: true
paths:
- /rps
- name: rps-ws
host: rps
port: 8080
tags:
- rps
routes:
- name: rps-activate-route
strip_path: true
paths:
- /activate
- name: vault-api
host: vault
port: 8200
tags:
- vault
routes:
- name: vault-route
strip_path: true
paths:
- /vault
- name: mosquitto-ws
host: mosquitto
port: 9001
tags:
- mosquitto
routes:
- name: mosquitto-route
strip_path: true
paths:
- /mosquitto
- name: web
host: webui
port: 80
tags:
- web
routes:
- name: web-route
paths:
- /
plugins:
- name: cors
- name: jwt
route: rps-route
config:
claims_to_verify:
- exp
- name: jwt
route: mps-route
config:
claims_to_verify:
- exp
consumers:
- username: admin
jwt_secrets:
- consumer: admin
key: 9EmRJTbIiIb4bIeSsmgcWIjrR6HyETqc #sample key
secret: ""
# routes:
# - name: another-route
# # Relationships can also be specified between top-level entities,
# # either by name or by id
# service: example-service
# hosts: ["hello.com"]
# consumers:
# - username: example-user
# # Custom entities from plugin can also be specified
# # If they specify a foreign-key relationshp, they can also be nested
# keyauth_credentials:
# - key: my-key
# plugins:
# - name: rate-limiting
# _comment: "these are default rate-limits for user example-user"
# config:
# policy: local
# second: 5
# hour: 10000
# When an entity has multiple foreign-key relationships
# (e.g. a plugin matching on both consumer and service)
# it must be specified as a top-level entity, and not through
# nesting.
# plugins:
# - name: rate-limiting
# consumer: example-user
# service: another-service
# _comment: "example-user is extra limited when using another-service"
# config:
# hour: 2
# # tags are for your organization only and have no meaning for Kong:
# tags:
# - extra_limits
# - my_tag