You can export object security rules for use in another environment. You use the exportFGSObjSecRules script to export the file.
The exportFGSObjSecRules script exports object security rules to a JavaScript Object Notation (JSON) file so that the JSON file can be imported on another monitor instance.
monitor_root\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy
| Parameters | Description | Comments |
|---|---|---|
| export_filename.json | The fully qualified path of the JSON file to which you are exporting the fine-grained object security rules (for example, c:/fgsRules.json or "/tmp/exportRules.json"). | |
| -model modelID | The name of the monitoring model for export. | If not specified, the fine-grained object
security rules for all models are exported. This parameter is required if -mc is specified. |
| -objtype objtype | An optional attribute to indicate the type of
object, which can be one of the following types:
|
If no object is specified, all object security types are exported. |
| -mc MCID | The monitoring context for fine-grained object security rules to be exported. | If not specified, the fine-grained object security rules for all monitoring contexts associated with the model are exported. |
| -obj obj_ID | An attribute that specifies the ID of the object,
which can be one of the following:
|
This attribute can be used if the -objtype attribute is specified with an object type of Metric, Measure, or Dimension. |
| -userid username | The user ID associated with the fine-grained object security rules to be exported. | This parameter can be used with -model and -mc.
This parameter cannot be used with -userdn, -groupid, or -groupdn. |
| -userdn userdn | The user distinguished name (DN) associated with the fine-grained object security rules to be exported. | This parameter can be used with -model and -mc.
This parameter cannot be used with -userid, -groupid, or -groupdn. |
| -groupid group | The group ID associated with the fine-grained object security rules to be exported. | This parameter can be used with -model and -mc.
This parameter cannot be used with -userid, -userdn, or -groupdn. |
| -groupdn groupdn | The group distinguished name (DN) associated with the fine-grained object security rules to be exported. | This parameter can be used with -model and -mc.
This parameter cannot be used with -userid, -userdn, or -groupid. |
| -conntype type | Use SOAP for the connection type. | |
| -includegroups | A flag to indicate whether groups associated with the userid or userdn should be included in the export. | No value is specified with the -includegroups parameter. Use -includegroups if you want the groups to be exported. |
| -host host_name | The name of the host where IBM® Business Monitor is installed. This can be localhost. | |
| -port port_number | The SOAP connector port of WebSphere® Application Server. Using the WebSphere Application Server administrative console, you can find the SOAP_CONNECTOR_ADDRESS by clicking . |
Note that, even on a Windows system, you must use a forward slash (/) for the path to the file.
profile_root\bin> wsadmin -wsadmin_classpath
"..\..\..\plugins\com.ibm.wbimonitor.lifecycle.spi.jar;
..\..\..\plugins\com.ibm.wbimonitor.repository.jar" -lang jython -f
"..\..\..\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy"
"export_filename.json" -model modelId -objtype type
-mc MCID -obj object -userid username
-userdn userdn -groupid group -groupdn groupdn
-includegroups -conntype SOAP -host host_name -port port_number
app_dev_root_WTE\runtimes\bi_v7\bin> wsadmin -wsadmin_classpath
"..\plugins\com.ibm.wbimonitor.lifecycle.spi.jar;
..\plugins\com.ibm.wbimonitor.repository.jar" -lang jython -f
"..\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy"
"export_filename.json" -model modelId -objtype type
-mc MCID -obj object -userid username
-userdn userdn -groupid group -groupdn groupdn
-includegroups -conntype SOAP -host host_name -port port_number
integration_dev_root_WTE\runtimes\bi_v7\bin> wsadmin -wsadmin_classpath
"..\plugins\com.ibm.wbimonitor.lifecycle.spi.jar;
..\plugins\com.ibm.wbimonitor.repository.jar" -lang jython -f
"..\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy"
"export_filename.json" -model modelId -objtype type
-mc MCID -obj object -userid username
-userdn userdn -groupid group -groupdn groupdn
-includegroups -conntype SOAP -host host_name -port port_number
exportFGSObjSecRules.jy "c:/fgsRules.json" -model Mymodel
–objtype Metric -mc testmc
-obj LoanAmount -userid jsmith
-includegroups -conntype SOAP -host localhost -port 8880
This section shows how to use the exportFGSObjSecRules script in a stand-alone or network deployment (ND) IBM Business Monitor environment. The usage information in this section also applies to using exportFGSObjSecRules on a z/OS platform.
profile_root/bin> wsadmin -wsadmin_classpath
"../../../plugins/com.ibm.wbimonitor.lifecycle.spi.jar:
../../../plugins/com.ibm.wbimonitor.repository.jar" -lang jython -f
"../../../scripts.wbm/FGSecurity/exportFGSObjSecRules.jy"
"export_filename.json" -model modelId -objtype type
-mc MCID -obj object -userid username
-userdn userdn -groupid group -groupdn groupdn
-includegroups -conntype SOAP -host host_name -port port_number
exportFGSObjSecRules.jy "/tmp/exportRules.json" -model Mymodel
-objtype Metric -mc testmc
-obj LoanAmount -userid jsmith
-includegroups -conntype SOAP -host localhost -port 8880
root@wbiaixp517 /usr/IBM/WebSphere/AppServer/profiles/Custom01/bin]#./wsadmin.sh
-wsadmin_classpath "../../../plugins/com.ibm.wbimonitor.lifecycle.spi.jar:
../../../plugins/com.ibm.wbimonitor.repository.jar" -lang jython -f
"../../../scripts.wbm/FGSecurity/exportFGSObjSecRules.jy"
"/tmp/exportRules.json" -model Mymodel -objtype Metric -mc testmc -obj LoanAmount
-userid jsmith -includegroups -conntype SOAP -host wbiaixp513 -port 8879
For example, to export all metric security rules for the MortgageLending model, enter the following command:
wsadmin -wsadmin_classpath "..\..\..\plugins\com.ibm.wbimonitor.lifecycle.spi.jar;
..\..\..\plugins\com.ibm.wbimonitor.repository.jar" -lang jython -f
"..\..\..\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy" /tmp/exportFile.json
–model MortgageLending –objtype Metric
wsadmin -wsadmin_classpath "..\..\..\plugins\com.ibm.wbimonitor.lifecycle.spi.jar;
..\..\..\plugins\com.ibm.wbimonitor.repository.jar" -lang jython -f
"..\..\..\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy" /tmp/exportFile.json
–userid JaneD
wsadmin -wsadmin_classpath "..\..\..\plugins\com.ibm.wbimonitor.lifecycle.spi.jar;
..\..\..\plugins\com.ibm.wbimonitor.repository.jar" -lang jython -f
"..\..\..\scripts.wbm\FGSecurity\exportFGSObjSecRules.jy" /tmp/exportFile.json
–model MortgageLending –objtype Metric –mc NewLoanApplication
–obj LoanAmount –groupid PayrollEmployee