aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-REST/src/main/java/org/openecomp/policy/rest/XACMLRestProperties.java
blob: bc991aafb827ff7fab4cd5847b3e301b13d5ef92 (plain)
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
/*-
 * ============LICENSE_START=======================================================
 * ECOMP-REST
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

package org.openecomp.policy.rest;

import com.att.research.xacml.util.XACMLProperties;

/**
 * These are XACML Properties that are relevant to the RESTful API interface for
 * the PDP, PAP and AC interfaces.
 * 
 *
 */
public class XACMLRestProperties extends XACMLProperties {
	/**
	 * A unique identifier for the PDP servlet instance. Usually set to the URL
	 * it is running as in the J2EE container.
	 * 
	 * Eg. http://localhost:8080/pdp/
	 */
	public static final String PROP_PDP_ID = "xacml.rest.pdp.id";
	/**
	 * A PDP servlet's configuration directory. Holds the pip and policy
	 * configuration data as well as the local policy cache.
	 * 
	 * Eg: /opt/app/xacml/config
	 */
	public static final String PROP_PDP_CONFIG = "xacml.rest.pdp.config";
	// Resilience feature-
	public static final String PROP_PDP_WEBAPPS = "xacml.rest.pdp.webapps";
	//Closed Loop JSON table
	public static final String PROP_ADMIN_CLOSEDLOOP = "xacml.rest.admin.closedLoopJSON";
	/**
	 * Set this property to true or false if the PDP servlet should register
	 * itself upon startup with the PAP servlet.
	 */
	public static final String PROP_PDP_REGISTER = "xacml.rest.pdp.register";
	/**
	 * Number of seconds the PDP will sleep while retrying registration with the
	 * PAP. This value must be greater or equal to 5.
	 */
	public static final String PROP_PDP_REGISTER_SLEEP = "xacml.rest.pdp.register.sleep";
	/**
	 * Number of retry attempts at registration with the PAP. A value of -1
	 * indicates infinite retries.
	 */
	public static final String PROP_PDP_REGISTER_RETRIES = "xacml.rest.pdp.register.retries";
	/**
	 * Max content length accepted for an incoming POST XML/JSON request.
	 * Default is 32767 bytes.
	 */
	public static final String PROP_PDP_MAX_CONTENT = "xacml.rest.pdp.maxcontent";
	/**
	 * Custom HTTP header used by PDP to send the value of the PROP_PDP_ID
	 */
	public static final String PROP_PDP_HTTP_HEADER_ID = "X-XACML-PDP-ID";
	/**
	 * Custom HHTP header used by PDP to send its heartbeat value.
	 */
	public static final String PROP_PDP_HTTP_HEADER_HB = "X-XACML-PDP-HB";
	/*
	 * Custom HTTP header used by PDP to send the value of the
	 * X-XACML-PDP-JMX-PORT
	 */
	public static final String PROP_PDP_HTTP_HEADER_JMX_PORT = "X-XACML-PDP-JMX-PORT";
	/**
	 * The URL of the PAP servlet. Used by PDP servlet's to communicate. Because
	 * administrators can set whatever context they want to run the PAP servlet,
	 * it isn't easy to determine a return URL for the PAP servlet. This is
	 * especially true upon initialization.
	 */
	public static final String PROP_PAP_URL = "xacml.rest.pap.url";
	/**
	 * A comma divided list of urls pointing to avaiable PAP urls.
	 * If one or more fail, the other servers in the list can
	 * handle the requests.
	 */
	public static final String PROP_PAP_URLS = "xacml.rest.pap.urls";
	public static final String PROP_PAP_FAILED_URLS = "xacml.rest.pap.failedUrls";
	public static final String PROP_PAP_SUCCEEDED_URLS = "xacml.rest.pap.succeededUrls";
	//public static final String PROP_PAP_FAILED_URL_TIME = "xacml.rest.pap.failedUrlTime";
	
	/**
	 * Upon startup, have the PAP servlet send latest configuration information
	 * to all the PDP nodes it knows about.
	 */
	public static final String PROP_PAP_INITIATE_PDP_CONFIG = "xacml.rest.pap.initiate.pdp";
	/**
	 * The interval the PAP servlet uses to send heartbeat requests to the PDP
	 * nodes.
	 */
	public static final String PROP_PAP_HEARTBEAT_INTERVAL = "xacml.rest.pap.heartbeat.interval";
	/**
	 * Timeout value used by the PAP servlet when trying to check the heartbeat
	 * of a PDP node.
	 */
	public static final String PROP_PAP_HEARTBEAT_TIMEOUT = "xacml.rest.pap.heartbeat.timeout";
	/*
	 * This is the domain you can setup for your organization, it should be a URI.
	 * Eg. com:sample:foo
	 */
	public static final String PROP_PAP_DOMAIN = "xacml.rest.pap.domain";
	
	/*
	 * Local path to where user workspaces exist. The user workspace contains temporary files, the
	 * user's clone of the GIT repository, anything specific to the user, etc.
	 */
	public static final String PROP_PAP_WORKSPACE = "xacml.rest.pap.workspace";
	
	/*
	 * Local path to  where the GIT repository exists.
	 * 
	 * Eg. /opt/app/xacml/repository
	 */
	public static final String PROP_PAP_REPOSITORY = "xacml.rest.pap.repository";
	
	/*
	 * Database driver property
	 */
	public static final String PROP_PAP_DB_DRIVER = "javax.persistence.jdbc.driver";
	
	/*
	 * Database url
	 */
	public static final String PROP_PAP_DB_URL = "javax.persistence.jdbc.url";
	
	/*
	 * Database user
	 */
	public static final String PROP_PAP_DB_USER = "javax.persistence.jdbc.user";
	
	/*
	 * Database password
	 */
	public static final String PROP_PAP_DB_PASSWORD = "javax.persistence.jdbc.password";
	
	/*
	 * Time in ms which a Policy DB transaction will wait to get the transaction lock object
	 */
	public static final String PROP_PAP_TRANS_WAIT = "xacml.rest.pap.transaction.waitms";
	
	/*
	 * Policy DB transaction timeout in ms after it has obtained the transaction lock object
	 */
	public static final String PROP_PAP_TRANS_TIMEOUT = "xacml.rest.pap.transaction.timeoutms";
	
	/*
	 * Policy Audit transaction timeout in ms after it has obtained the transaction lock object
	 */
	public static final String PROP_PAP_AUDIT_TIMEOUT = "xacml.rest.pap.audit.timeoutms";
	
	/*
	 * Value determines direction of audit.  Value=true will synch the file system to contents of the DB.  
	 * Value=false will synch the DB to the contents of the file system.
	 */	
	public static final String PROP_PAP_AUDIT_FLAG = "xacml.rest.pap.filesystem.audit";
	
	/*
	 * Value for enable/disable of audit functionality
	 */		
	public static final String PROP_PAP_RUN_AUDIT_FLAG = "xacml.rest.pap.run.audit.flag";
	
	/*
	 * Controls how long the timeout will be when a pap sends a notification to another pap
	 */
	public static final String PROP_PAP_NOTIFY_TIMEOUT = "xacml.rest.pap.notify.timeoutms";
	/*
	 *  Value for Enable/Disable of AutoPush Flag. 
	 */
	public static final String PROP_PAP_PUSH_FLAG = "xacml.rest.pap.autopush.flag";
	
	/*
	 *  Properties file for the AutoPush Functionality. 
	 */
	public static final String PROP_PAP_PUSH_FILE = "xacml.rest.pap.autopush.file";
	
	/*
	 * Local path to where the GIT repository exists.
	 * 
	 * Eg. /opt/app/xacml/repository
	 */
	public static final String PROP_ADMIN_REPOSITORY = "xacml.rest.admin.repository";
	/*
	 * Local path to where user workspaces exist. The user workspace contains
	 * temporary files, the user's clone of the GIT repository, anything
	 * specific to the user, etc.
	 */
	public static final String PROP_ADMIN_WORKSPACE = "xacml.rest.admin.workspace";
	/*
	 * This is the domain you can setup for your organization, it should be a
	 * URI.
	 * 
	 * Eg. com:sample:foo
	 */
	public static final String PROP_ADMIN_DOMAIN = "xacml.rest.admin.domain";
	/**
	 * PROP_ADMIN_USER_NAME is simply a name for the logged in user.
	 * 
	 * AC authentication is out the scope of the web application itself. It is
	 * up to the developer to setup authentication as they please in the J2EE
	 * container used to run the web application. Whatever authentication
	 * mechanism they use, they should then set the attribute into the
	 * HttpSession object. The Admin Console will be able to read that value
	 * (default to "guest") in.
	 * 
	 * ((HttpServletRequest)
	 * request).getSession().setAttribute("xacml.rest.admin.user.name",
	 * "Homer");
	 * 
	 */
	public static final String PROP_ADMIN_USER_NAME = "xacml.rest.admin.user.name";
	/**
	 * 
	 * PROP_ADMIN_USER_ID is an id for the logged in user.
	 * 
	 * Eg. hs1234
	 *
	 * @see #PROP_ADMIN_USER_NAME for more information.
	 */
	public static final String PROP_ADMIN_USER_ID = "xacml.rest.admin.user.id";
	/**
	 * 
	 * PROP_ADMIN_USER_EMAIL is a user's email address.
	 * 
	 * @see #PROP_ADMIN_USER_NAME for more information.
	 */
	public static final String PROP_ADMIN_USER_EMAIL = "xacml.rest.admin.user.email";
	/**
	 * Directory path containing sub-directories where the Subscriber servlet
	 * puts files sent through data feeds.
	 */
	public static final String PROP_SUBSCRIBER_INCOMING = "xacml.subscriber.incoming";
	/**
	 * The specific data feed name for the Subscriber servlet to register for.
	 */
	public static final String PROP_SUBSCRIBER_FEED = "xacml.subscriber.feed";
	/**
	 * Value for the log time frame that is to be stored in the database any
	 * logs after this time frame will be removed.
	 */
	public static final String PROP_LOG_TIMEFRAME = "xacml.log.timeframe";
	/**
	 * Value for the DB connections used to store the log files.
	 */
	public static final String PROP_LOG_DB_DRIVER = "xacml.log.db.driver";
	public static final String PROP_LOG_DB_URL = "xacml.log.db.url";
	public static final String PROP_LOG_DB_USER = "xacml.log.db.user";
	public static final String PROP_LOG_DB_PASSWORD = "xacml.log.db.password";
	/*
	 * Value for JMX port for the PDP
	 */
	public static final String PROP_PDP_JMX_PORT = "xacml.jmx.port";

	/*
	 * Value for refresh rate
	 */
	public static final String PROP_REFRESH_RATE = "xacml.refresh.rate";

	// added for Security between Policy Components.
	// 6/26
	/*
	 * PROP_PAP_USERID is the PAP Unique User ID
	 */
	public static final String PROP_PAP_USERID = "xacml.rest.pap.userid";
	/*
	 * PROP_PAP_PASS is the PAP password
	 */
	public static final String PROP_PAP_PASS = "xacml.rest.pap.password";
	/*
	 * PROP_PAP_PASS is the PAP password
	 */
	public static final String PROP_CONFIG_URL = "xacml.rest.config.url";	
	/*
	 * PROP_PDP_USERID is the PDP Unique User ID
	 */
	public static final String PROP_PDP_USERID = "xacml.rest.pdp.userid";
	/*
	 * PROP_PDP_PASS is the PDP password
	 */
	public static final String PROP_PDP_PASS = "xacml.rest.pdp.password";
	/*
	 * PROP_PDP_IDFILE is the PDP Authentication File
	 */
	public static final String PROP_PDP_IDFILE = "xacml.rest.pdp.idfile";
	/*
	 * PROP_PEP_IDFILE is the Client Authentication File
	 */
	public static final String PROP_PEP_IDFILE = "xacml.rest.pep.idfile";
	/*
	 * webapps Location of the PAP-REST server
	 */
	public static final String PROP_PAP_WEBAPPS= "xacml.rest.config.webapps";
	/*
	 * Value for Notification Option
	 */
	public static final String PROP_NOTIFICATION_TYPE = "xacml.notification.type";
	
	/*
	 * Value for Notification Servers
	 */
	public static final String PROP_NOTIFICATION_UEB_CLUSTER = "xacml.ueb.cluster";	
	/*
	 * Value for Notification Delay
	 */
	public static final String PROP_NOTIFICATION_DELAY= "xacml.rest.notification.delay";
	/*
	 * Closedloop Fault Policy Template Version
	 */
	public static final String TemplateVersion_Fault= "xacml.rest.closedLoopFault";
	/*
	 * Closedloop PM Policy Template Version
	 */
	public static final String TemplateVersion_PM= "xacml.rest.closedLoopPM";
	/*
	 * Value for model properties file
	 */
	public static final String PROP_ADMIN_MICROSERVICE = "xacml.rest.admin.microServiceModel";	
	/*
	 * MicroService Policy Template Version
	 */
	public static final String TemplateVersion_MS= "xacml.rest.microServices";
	/*
	 * GOC Policy Template Version
	 */
	public static final String TemplateVersion_GOC= "xacml.rest.gocPolicy";
	/*
	 * Firewall Policy Template Version
	 */
	public static final String TemplateVersion_FW= "xacml.rest.firewallPolicy";
	/*
	 *  Size of SelectList for Users in MS
	 *  
	*/
	public static final String PROP_USER_SELECTLIST_WINDOW_SIZE= "xacml.user.column.count";
	/*
	 * Audit function in pap admin to Update userinfo table to syncronize with Roles table 
	 */
	public static final String PROP_ROLES_USERINFO_AUDIT= "xacml.audit.userInfo";
	/*
	 * test Environment LoginId
	 */
	public static final String PROP_TEST_ENVIRONMENT_LOGINID= "xacml.testEnvironment.loginId";
	/*
	 *  Size of of the page length for sqlcontainer
	 *  
	*/
	public static final String PROP_SQLCONTAINER_PAGE_LENGTH= "xacml.sqlcontainer.page.length";
	/*
	 *  add values used to connect to restful api
	 *  
	*/
	public static final String PROP_RESTFUL_INTERFACE= "xacm.restful.interface.file";
	/*
	 *  add pattern to identify what values are designed as required
	 *  
	*/
	public static final String PROP_XCORE_REQUIRED_PATTERN= "xacm.xcor.required.pattern";
	/*
	 *  Time before a cache value is evicted
	 *  
	*/
	public static final String PROP_CACHE_LIVE_TIME= "xacm.cache.live.time";
	/*
	 *  Highest value allowed in priority
	 *  
	*/
	public static final String PROP_PRIORITY_COUNT= "xacml.max.priority.count";
	/*
	 * The name of the PAP.  Must be unique across the system
	 */
	public static final String PAP_RESOURCE_NAME="xacml.rest.pap.resource.name";
	/*
	 * The name of the site in which the PAP resides
	 */
	public static final String PAP_SITE_NAME="site_name";
	/*
	 * The node type of the PAP - really a no-op since it's value is pap
	 */
	public static final String PAP_NODE_TYPE="node_type";
	/*
	 * A list of the groups of resources/nodes on which the PAP is dependent. The members of a 
	 * group are comma-separated and the groups are separated with semicolons.
	 */
	public static final String PAP_DEPENDENCY_GROUPS="dependency_groups";
	/*
	 * The (optional) period of time in seconds between executions of the integrity audit.
	 * Value < 0 : Audit does not run (default value if property is not present = -1)
	 * Value = 0 : Audit runs continuously
	 * Value > 0 : The period of time in seconds between execution of the audit on a particular node
	 */
	public static final String PAP_INTEGRITY_AUDIT_PERIOD_SECONDS = "integrity_audit_period_seconds";
	/*
	 * The name of the Admin.  Must be unique across the system
	 */
	public static final String ADMIN_RESOURCE_NAME="xacml.rest.admin.resource.name";
	/*
	 * The name of the PDP.  Must be unique across the system
	 */
	public static final String PDP_RESOURCE_NAME="xacml.rest.pdp.resource.name";
	/*
	 * Audit function in pap admin to Update userinfo table to syncronize with Roles table 
	 */
	public static final String PROP_AUTOMATIC_POLICYPUSH= "xacml.automatic.push";
	/*
	 * Add Limit for Ecomp Portal Dashboard tab data
	 */
	public static final String PROP_ECOMP_LOGLIMIT = "xacml.ecomp.dashboard.logTableLimit";
	public static final String PROP_ECOMP_SYSTEMALERTLIMIT = "xacml.ecomp.dashboard.systemAlertTableLimit";
	/*
	 * Diff of the policies for the Firewall Feature. 
	 */
	public static final String PROP_FW_GETURL = "FW_GETURL";
	public static final String PROP_FW_AUTHOURL = "FW_AUTHOURL";
	public static final String PROP_FW_PROXY = "FW_PROXY";
	public static final String PROP_FW_PORT = "FW_PORT";
	
	/*
	 * The number of Risk Levels allowed
	 */
	public static final String ADMIN_RISK_LEVEL_COUNT="xacml.risk.level.count";
	/*
	 * The maxium Level displayed on the UI for Micro Services
	 */
	public static final String PROP_MODEL_LEVEL = "xacml.model.level";
	
}