Java SDK Export / Import Issues and Fix with Application Objects

Document created by rusad02 Employee on Sep 15, 2016Last modified by kristen.palazzolo on Dec 17, 2016
Version 3Show Document
  • View in full screen mode

SDK Full Policy Store Backup and Restore Issue and Fix for Application Model

Please note when using the Export and Import methods in the Java SDK - application objects will not be properly reimported into the policy store and will not be visible on the adminUI. I do believe this needs to be submitted as a bug but here is the fix for not losing that object on the adminUI that I found.

O/S - Red Hat Linux 6 - 64 bit

Policy Server Version: 12.52.101.640

Policy Store: CA Directory r12.18

Issue: Using the Java SDK Export / Import classes to create full backups of the policy store causes issue with Application objects on re-import.

 Export

 SmExportAttr objExportAttr = new SmExportAttr ();

 objExportAttr.setFileName(getExportFileName(),true);

 objExportAttr.setSensitiveDataUnencrypted();

result = policyapi.doExport(objExportAttr);

 

Import

SmImport myImp = new SmImport();

SmImportAttr myimport = new SmImportAttr();

myimport.setOverWriteExistingDatabaseRecords();

myimport.setRenameOff();

myimport.setFileName(getImportFileName());

result = policyapi.doImport(myimport);

 

Upon reimport of the policy store backup the application objects are not visible on the AdminUI.

The object is present in the .smdif export file that is created during the backup method as seen below:

Further inspection in XPSExplorer shows the application object is re-imported in the Domain Objects screen. Please see the object below and notice the flag IsAnApplication is no longer set to true. Also IsDLP is no longer set to false.

 

 

FIX: From XPSExplorer get a writeable copy of the object.

Enter: W

Enter: 11

Enter: true

 

The IsAnApplication flag will now be set properly to true.

 

Enter: 04 (to select the IsDLP attribute)
Enter: false

 

The IsDLP attribute flag is now properly set to false.

Enter: U (to update the attribute)

Enter Q , Q, Q, P (to synchronize the changes with the Policy Server)

 

Restart the Policy Server and the AdminUI (My environment was very particular about needing a reboot of Policy Server and AdminUI even though I synchronized changes on XPSExplorer)

 

TestApplication has been restored and is useable on AdminUI.

 

Hope this helps!

 

Adam Rusniak

1 person found this helpful

Attachments

    Outcomes