-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
179 lines (154 loc) · 4.31 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
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
var config = {};
// Protected Resource configuration
//--------------------------------------------------
// Configures the address of the component that is being proxied and the address of the proxy itself.
config.resource = {
original: {
/**
* Host that is being proxied.
*/
host: 'localhost',
/**
* Port where the proxied server is listening.
*/
port: 10026
},
broker: {
concat: false,//Concatenate response (true) or merge attributes (false)
host: 'http://192.168.1.8',
/**
* Port where the proxy is listening to redirect requests.
*/
port: 1026,
portSSL: 1027,
/**
* Administration port for the proxy.
*/
adminPort: 22211
}
};
/**
* Defines the configuration for the Device Registry, where all the information about devices and configuration
* groups will be stored. There are currently just two types of registries allowed:
*
* - 'memory': transient memory-based repository for testing purposes. All the information in the repository is
* wiped out when the process is restarted.
*
* - 'mongodb': persistent MongoDB storage repository. All the details for the MongoDB configuration will be read
* from the 'mongoDb' configuration property.
*/
config.EntityRegistry = {
type: 'mongodb'
};
config.mongodb = {
host: 'mongo',
// port: '27017',
port: '',
db: 'iotbroker'
//replicaSet: ''
};
config.ssl = {
/**
* This flag activates the HTTPS protocol in the server. The endpoint always listen to the indicated port
* independently of the chosen protocol.
*/
active: true,
/**
* Key file to use for codifying the HTTPS requests. Only mandatory when the flag active is true.
*/
keyFile: '/iotbroker/certificados/server/key.pem',
/**
* SSL Certificate to present to the clients. Only mandatory when the flag active is true.
*/
certFile: '/iotbroker/certificados/server/cert.pem',
ca: '',
requestCert: false,
rejectUnauthorized: false
}
config.iotAgentSSL= {
active: false,
keyFile: '/iotbroker/certificados/server/key.pem',
certFile: '/iotbroker/certificados/server/cert.pem',
//ca: '',
rejectUnauthorized: false
},
config.authentication = {
enable: false,
module: 'figuardian',
retries: 3,
cacheTTLs: {
users: 5,
},
options: {
protocol: 'http://',
host: 'localhost',
port: 80,
path: '/orion/token.php'
}
};
/*
config.authentication = {
enable: true,
roles: false,
module: 'keystone',
user: 'caio',
password: 'caio',
domainName: 'figuardian',
retries: 3,
cacheTTLs: {
users: 1000,
projectIds: 1000,
roles: 60,
validation: 120
},
options: {
protocol: 'http://',
host: 'localhost',
port: 5000,
path: '/v3/role_assignments',
authPath: '/v3/auth/tokens'
}
};
*/
/**
* Configuration to remove entities which is expired.
* This duration is defined in the Registration Context
*/
config.expiration = {
enable: false,
interval: 30000
}
/**
* If this flag is activated, whenever the pepProxy is not able to redirect a request, instead of returning a 501 error
* (that is the default functionality) the PEP Proxy process will exit with a -2 code.
*/
config.dieOnRedirectError = false;
/**
* Configures the maximum number of clients that can be simultaneously queued while waiting for the PEP to
* authenticate itself against Keystone (due to an expired token).
*/
config.maxQueuedClients = 1000;
/*
Para inserir algum plugin
config.middlewares = {
require: 'lib/plugins/Module',
functions: [
'execute'
]
};
*/
config.figuardian = {
url: 'http://localhost/orion/figuardian.php',
ssl: {
active: false,
keyFile: '/iotbroker/certificados/figuardian/key.pem',
certFile: '/iotbroker/certificados/figuardian/cert.pem',
ca: '/iotbroker/certificados/figuardian/cert.pem',
rejectUnauthorized: true
}
};
/**
* Default log level. Can be one of: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL'
*/
config.logLevel = 'DEBUG';
module.exports = config;