forked from garetht/amanar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amanar_config_schema.json
335 lines (335 loc) · 15.6 KB
/
amanar_config_schema.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
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
{
"type": "object",
"required": [
"amanar_configuration"
],
"patternProperties": {
"^x-.*": {
"description": "Properties prefixed with x- will be allowed in the top level of this schema, but will not be used or checked. This allows for anchors to be inserted for the reuse of parts of the YAML file. This is analogous to and based on Docker Compose's Extension Fields (https://docs.docker.com/compose/compose-file/#extension-fields)."
}
},
"additionalProperties": false,
"properties": {
"amanar_configuration": {
"type": "array",
"items": {
"type": "object",
"oneOf": [
{
"required": [
"vault_address",
"vault_configuration"
]
},
{
"required": [
"constant"
]
}
],
"properties": {
"constant": {
"description": "Amanar is able to render constants, which are pieces of information that do not depend on Vault. This allows Amanar to be used to configure local static credentials in addition to Vault-derived ones.",
"type": "object",
"oneOf": [
{
"required": [
"template_path"
]
},
{
"required": [
"template"
]
}
],
"additionalProperties": false,
"properties": {
"template": {
"description": "A constant Go template string that will be rendered.",
"type": "string"
},
"template_path": {
"description": "A path to a Go template file that will be rendered.",
"type": "string"
}
}
},
"vault_address": {
"description": "The address to a particular vault. Vault addresses usually differ for different environments. For example, we may have one vault address for production and another for staging.",
"type": "string",
"format": "uri",
"minLength": 1
},
"vault_configuration": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"description": "A list of vault roles and paths and configuration options for output to data sources within a particular vault environment.",
"required": [
"configurables",
"vault_path",
"vault_role"
],
"properties": {
"vault_path": {
"description": "The path representing the datastore in the Vault. This is equivalent to $VAULT_PATH in the CLI command `vault read $VAULT_PATH/creds/$VAULT_ROLE`.",
"type": "string",
"minLength": 1
},
"vault_role": {
"description": "The role representing the permissions that are sought to the Vault datastore. This is equivalent to $VAULT_ROLE in the CLI command `vault read $VAULT_PATH/creds/$VAULT_ROLE`.",
"type": "string",
"minLength": 1
},
"configurables": {
"type": "object",
"additionalProperties": false,
"properties": {
"intellij_datasources": {
"type": "array",
"description": "Allows IntelliJ datasource usernames and passwords to be changed. Most useful for DataGrip and databases within IntelliJ Ultimate.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"database_uuid",
"datasource_file_path"
],
"properties": {
"datasource_file_path": {
"description": "The path to IntelliJ data sources file. The file is typically called dataSources.local.xml.",
"type": "string",
"minLength": 1
},
"database_uuid": {
"description": "The IntelliJ UUID for the database you want to update. You can find this by examining the dataSources.local.xml file.",
"type": "string",
"minLength": 1
}
}
}
},
"intellij_run_configurations": {
"type": "array",
"description": "Allows changes to database access credentials within IntelliJ run configurations.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"environment_variable",
"run_configurations_folder_path",
"database_host"
],
"properties": {
"run_configurations_folder_path": {
"description": "A directory containing all IntelliJ run configurations to be examined. Usually located in .idea/runConfigurations. Run configurations may need to be shared before becoming visible in this folder.",
"type": "string",
"minLength": 1
},
"environment_variable": {
"description": "The environment variable in the run configuration under which the database connection",
"type": "string",
"minLength": 1
},
"database_host": {
"description": "The username and password for the URL will only be updated if the host of URL in the environment variable matches this string.",
"type": "string",
"minLength": 1
}
}
}
},
"querious2_datasources": {
"type": "array",
"description": "Allows changes to database access credentials stored in a Querious 2 SQLite database.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"querious2_sqlite_path",
"database_uuid"
],
"properties": {
"querious2_sqlite_path": {
"description": "Path to the SQLite database in which Querious 2 stores its data. The file is typically called Connections.sqlite.",
"type": "string",
"minLength": 1
},
"database_uuid": {
"description": "The unique identifier for the Querious database to update. Can be found by looking in the SQLite database.",
"type": "string",
"minLength": 1
}
}
}
},
"sequel_pro_datasources": {
"type": "array",
"description": "Allows changes to database access credentials for Sequel Pro plists.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"sequel_pro_plist_path",
"database_uuid"
],
"properties": {
"sequel_pro_plist_path": {
"description": "Path to the plist in which Sequel Pro stores its data. The file is typically called Favorites.plist",
"type": "string",
"minLength": 1
},
"database_uuid": {
"description": "The unique identifier for the Sequel Pro database to update. Can be found by looking in the plist.",
"type": "string",
"minLength": 1
}
}
}
},
"sequel_ace_datasources": {
"type": "array",
"description": "Allows changes to database access credentials for Sequel Ace plists.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"sequel_ace_plist_path",
"database_uuid"
],
"properties": {
"sequel_ace_plist_path": {
"description": "Path to the plist in which Sequel Ace stores its data. The file is typically called Favorites.plist",
"type": "string",
"minLength": 1
},
"database_uuid": {
"description": "The unique identifier for the Sequel Ace database to update. Can be found by looking in the plist.",
"type": "string",
"minLength": 1
}
}
}
},
"postico_datasources": {
"type": "array",
"description": "Allows changes to database access credentials stored in a Postico SQLite database.",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"postico_sqlite_path",
"database_uuid"
],
"properties": {
"postico_sqlite_path": {
"description": "Path to the SQLite database in which Postico stores its data. The file is typically called ConnectionFavorites.db",
"type": "string",
"minLength": 1
},
"database_uuid": {
"description": "The unique identifier for the Postico database to update. Can be found by looking in the SQLite database.",
"type": "string",
"minLength": 1
}
}
}
},
"shell_datasources": {
"description": "Allows a file to be generated in a shell script that contains exports of environment variables containing the new credentials.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"username_variable",
"password_variable",
"filepath"
],
"properties": {
"filepath": {
"description": "The path the shell script should be generated to.",
"type": "string",
"minLength": 1
},
"username_variable": {
"description": "The name of the environment variable that should contain the username",
"type": "string",
"minLength": 1
},
"password_variable": {
"description": "The name of the environment variable that should contain the password",
"type": "string",
"minLength": 1
}
}
}
},
"json_datasources": {
"description": "Allows a JSON file to be generated containing usernames and passwords.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"identifier",
"filepath"
],
"properties": {
"filepath": {
"description": "The path the JSON file should be generated to.",
"type": "string",
"minLength": 1
},
"identifier": {
"description": "The name of this vault role and vault path pair to be used as an identifier for this JSON object.",
"type": "string",
"minLength": 1
}
}
}
},
"template_datasources": {
"description": "Fills credentials into a provided Go template string or template file and prints the result to stdout. The Credentials object is set as the dot context and its fields (.Username and .Password) are available. Unlike the other datasources, templates are generated anew each time and do not attempt to find previously existing keys to modify. Go templates are documented here: https://golang.org/pkg/text/template/",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"oneOf": [
{
"required": [
"template_path"
]
},
{
"required": [
"template"
]
}
],
"maxProperties": 1,
"properties": {
"template_path": {
"description": "The path to the Go template file that will be filled in with credentials.",
"type": "string",
"minLength": 1
},
"template": {
"description": "A Go template string that will be filled in with credentials.",
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
}