-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.schema.yaml
225 lines (225 loc) · 5.53 KB
/
settings.schema.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
$schema: https://json-schema.org/draft-07/schema#
$defs:
Authentication:
additionalProperties: false
properties:
allowed_domains:
default:
- localhost
- 127.0.0.1
- 0.0.0.0
description: Allowed domains for redirecting after authentication
items:
type: string
title: Allowed Domains
type: array
jwt_private_key:
description: Private key for JWT. Use 'openssl genrsa -out private.pem 2048'
to generate keys
format: password
title: Jwt Private Key
type: string
writeOnly: true
jwt_public_key:
description: Public key for JWT. Use 'openssl rsa -in private.pem -pubout
-out public.pem' to generate keys
title: Jwt Public Key
type: string
session_secret_key:
description: Secret key for sessions. Use 'openssl rand -hex 32' to generate
keys
format: password
title: Session Secret Key
type: string
writeOnly: true
required:
- jwt_private_key
- jwt_public_key
- session_secret_key
title: Authentication
type: object
Environment:
enum:
- development
- production
- testing
title: Environment
type: string
InNoHassleAccounts:
additionalProperties: false
description: Use production InNoHassle-Accounts API for authentication in local
development
properties:
api_url:
description: API URL for InNoHassle-Accounts
title: Api Url
type: string
api_jwt_token:
description: JWT token for accessing the Accounts API as a service
format: password
title: Api Jwt Token
type: string
writeOnly: true
required:
- api_url
- api_jwt_token
title: InNoHassleAccounts
type: object
InnopolisSSO:
additionalProperties: false
description: Innopolis SSO settings (only for production)
properties:
client_id:
description: Client ID for Innopolis SSO
title: Client Id
type: string
client_secret:
description: Client secret for Innopolis SSO
format: password
title: Client Secret
type: string
writeOnly: true
redirect_uri:
description: Redirect URI for Innopolis SSO
title: Redirect Uri
type: string
resource_id:
anyOf:
- type: string
- type: 'null'
default: null
description: Resource ID for Innopolis SSO (optional); Used for Sports API
access
title: Resource Id
required:
- client_id
- client_secret
- redirect_uri
title: InnopolisSSO
type: object
Mongo:
additionalProperties: false
properties:
uri:
description: MongoDB database connection URI
format: password
title: Uri
type: string
writeOnly: true
required:
- uri
title: Mongo
type: object
SMTP:
additionalProperties: false
properties:
host:
description: SMTP server host
title: Host
type: string
port:
default: 587
description: SMTP server port
title: Port
type: integer
username:
description: SMTP server username
title: Username
type: string
password:
description: SMTP server password
format: password
title: Password
type: string
writeOnly: true
required:
- host
- username
- password
title: SMTP
type: object
Telegram:
additionalProperties: false
properties:
bot_username:
description: Bot username for Telegram
title: Bot Username
type: string
bot_token:
description: Bot token for Telegram
format: password
title: Bot Token
type: string
writeOnly: true
required:
- bot_username
- bot_token
title: Telegram
type: object
additionalProperties: false
description: Settings for the application. Get settings from `settings.yaml` file.
properties:
app_root_path:
default: ''
description: Prefix for the API path (e.g. '/api/v0')
title: App Root Path
type: string
environment:
$ref: '#/$defs/Environment'
default: development
description: App environment
mongo:
$ref: '#/$defs/Mongo'
description: MongoDB settings
web_url:
description: Web URL for the frontend part of InNoHassle-Accounts
title: Web Url
type: string
cors_allow_origins:
default:
- https://innohassle.ru
- https://pre.innohassle.ru
- http://localhost:3000
description: 'Allowed origins for CORS: from which domains requests to the API
are allowed'
items:
type: string
title: Cors Allow Origins
type: array
auth:
$ref: '#/$defs/Authentication'
description: Authentication settings
innopolis_sso:
anyOf:
- $ref: '#/$defs/InnopolisSSO'
- type: 'null'
default: null
description: Innopolis SSO settings (only for production)
telegram:
anyOf:
- $ref: '#/$defs/Telegram'
- type: 'null'
default: null
description: Telegram settings
innohassle_accounts:
anyOf:
- $ref: '#/$defs/InNoHassleAccounts'
- type: 'null'
default: null
description: InNoHassle-Accounts settings
smtp:
anyOf:
- $ref: '#/$defs/SMTP'
- type: 'null'
default: null
description: SMTP settings
$schema:
description: Path to the schema file
title: Schema
type: string
required:
- mongo
- web_url
- auth
title: Settings
type: object