-
Notifications
You must be signed in to change notification settings - Fork 0
/
.env.example
52 lines (38 loc) · 2.44 KB
/
.env.example
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
PORT=
# --- DB connection details ---
DB_HOST=
DB_PORT=
DB_USERNAME=
DB_PASSWORD=
DB_NAME=
DB_SYNCHRONIZE=true
DB_SCHEMA:
# ----- Auth -----
# client id and secret as present is keycloak or ego for this service
AUTH_SERVER_CLIENT_ID=
AUTH_SERVER_CLIENT_SECRET=
# scopes as defined in EGO or KEYCLOAK eg. DICTIONARY.WRITE (For Keycloak DICTIONAY is the rsname i.e resource name and WRITE is the scope)
# AUTH_WRITE_SCOPES property can be empty or absent for AUTH_STRATEGY = NONE.
AUTH_WRITE_SCOPES=[]
AUTH_STRATEGY= # valid values -> EGO or KEYCLOAK or NONE
AUTH_SERVER_URL: # "https://ego.url" OR "http://localhost/realms/keycloak-realm". This property will be empty or absent for AUTH_STRATEGY = NONE
# SECURED_API can be used to specify which of the APIs need authentication.
# Can be empty or absent for AUTH_STRATEGY = NONE.
# If omitted for AUTH_STRATEGY != NONE then all apis will need authentication by default.
SECURED_API = ["CREATE", "FIND"]
AUTH_PUBLICKEY_CACHE = 1d
# ----- Entity Details -----
# list of valid entity types
ENTITY_LIST=["donor", "specimen", "sample"]
# request path for searching id. Param names should match column names in <ENTITY_TYPE>_SCHEMA. The order should match the order of columns in <ENTITY_TYPE>
REQUEST_ROUTE=/:column1/:column2/:column3
#List of DB sequences if any. Not mandatory, can be omitted.
DB_SEQUENCES=
# Repeat the below set for each entity type.
# Sequences in defaultValue can be given as "nextval('argo.specimen_seq')" or "0" or "'A'".
# The unique property under the columns array is not mandatory - default value for unique is false
# The index property (in the end) holds the columns for composite unique index creation. Note: This is an array of list of columns where each list constitutes a composite index.
<ENTITY_TYPE>_SCHEMA={"tablename": "tablename", "columns": [{"name": "entityId","type": "varchar", "defaultValue": "default-value or sequence call", "unique": true}, {"name": "column1", "type": "db-datatype", "defaultValue": "default-value or sequence call", "unique": false},{"name": "column2", "type": "db-datatype", "defaultValue": "default-value or sequence call"}], "index": [[column list for composite index 1], [column list for composite index 2]]}
# <ENTITY_TYPE>_SEARCH is the structure of the request/search-criteria/saved-entity. Should match column names in <ENTITY_TYPE>_SCHEMA.
# values against each of the keys should remain blank.
<ENTITY_TYPE>_SEARCH>={"column1":"", "column2":"", "column3": ""}