-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.json
77 lines (77 loc) · 2.27 KB
/
config.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
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
{
"service":{
"name": "microservice-user-profile",
"port": 8080,
"paths": ["/profiles"],
"virtual_host": "microservice-user-profile.service.consul",
"weight": 10,
"slots": 100
},
"gatewayUrl": "http://kong:8000",
"gatewayAdminUrl": "http://kong:8001",
"version": "v1.0.1-beta",
"security":{
"keysDir": "/run/secrets",
"jwt":{
"description": "JWT security middleware",
"tokenUrl": "http://kong:8000/jwt/signin"
},
"saml":{
"certFile": "/run/secrets/service.cert",
"keyFile": "/run/secrets/service.key",
"identityProviderUrl": "http://kong:8000/saml/idp",
"userServiceUrl": "http://kong:8000/users",
"registrationServiceUrl": "http://kong:8000/users/register",
"rootURL": "http://localhost:8000/profiles"
},
"oauth2":{
"description": "OAuth2 security middleware",
"tokenUrl": "https://kong:8000/oauth2/token",
"authorizeUrl": "https://kong:8000/oauth2/authorize"
},
"acl": {
"policies":[{
"id": "read-swagger",
"description": "Allows to service swagger.",
"resources": ["/swagger<.+>"],
"actions": ["api:read"],
"effect": "allow",
"subjects": ["<.+>"]
},{
"id": "profile-allow-admin-access",
"description": "Allows access to everything to an admin user",
"resources": ["<.+>"],
"actions": ["api:read","api:write"],
"effect": "allow",
"subjects": ["<.+>"],
"conditions": {
"roles": {
"type": "RolesCondition",
"options": {
"values": ["admin"]
}
}
}
},{
"id": "profile-allow-user-access",
"description": "Allows user to access its profile",
"resources": ["/profiles/me"],
"actions": ["api:read","api:write"],
"effect": "allow",
"subjects": ["<.+>"]
}]
}
},
"database":{
"dbName": "mongodb",
"dbInfo": {
"credentials": "/full/path/to/aws/credentials",
"endpoint": "http://localhost:9000",
"awsRegion": "us-east-1",
"host": "mongo:27017",
"database": "user-profiles",
"user": "restapi",
"pass": "restapi"
}
}
}