forked from WaverleyLabs/SDPcontroller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
78 lines (61 loc) · 2.28 KB
/
config.js
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
module.exports = {
// print debug statements
'debug': false,
'serverPort': 5000,
'maxConnections': 100,
// milliseconds, 0 indicates no timeout
// this is controller's way of noticing a lost connection
'socketTimeout': 30000,
// false indicates the server should disconnect
// after a successful credential update
'keepClientsConnected': true,
// allow legacy access request type
// Legacy access request means the SPA packet specifies
// the port to open along with detailed NAT instructions
// if applicable. This mode is not secure because the
// client can be NAT'ed to anywhere it requests if NAT
// is enabled.
'allowLegacyAccessRequests': false,
// can create these using ./setup/create-certs.sh
'serverCert': './path/server.crt',
'serverKey': './path/server.key',
// to be prompted for a password, set this field
// to a null string using '' (that's 2 single quotes
// with no spaces between)
'serverKeyPassword': 'password',
'serverKeyPasswordRequired': true,
// can create these using ./setup/create-certs.sh
'caCert': './path/ca.crt',
'caKey': './path/ca.key',
// to be prompted for a password, delete this field or
// set it to a null string using '' (that's 2 single
// quotes with no spaces between)
'caKeyPassword': 'password',
'caKeyPasswordRequired': true,
// how many days new certificates should be good for
'daysToExpiration': 31,
// SPA encryption key length in bytes, range is 64 to 256
'encryptionKeyLen': 256,
// SPA HMAC key length in bytes, range is 4 to 128
'hmacKeyLen': 128,
// database options
'dbHost': 'localhost',
'dbUser': 'sdp_controller',
'dbPasswordRequired': true,
// to be prompted for a password, delete this field or
// set it to a null string using '' (that's 2 single
// quotes with no spaces between)
'dbPassword': 'password',
'dbName': 'sdp',
// if any of these are exceeded, the controller
// disconnects from the client
'maxDataTransmitTries': 3,
'maxCredentialMakerTries': 3,
'maxBadMessages': 3,
// retry interval (milliseconds) for database failures
'databaseRetryInterval': 5000,
'databaseMaxRetries': 5,
// interval (milliseconds) to check database for changes
// that require sending updates to gateways
'databaseMonitorInterval': 3000,
};