-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Assets - Import - Rearchitecture
-
None
-
4
-
Severity 2 - Major
Issue Summary
Assets Discovery Import configuration requires uploading a Scan Results zip file in order to set up.
The Toggle to "Automatically create object types and attributes" has no effect on the following behaviour (see JSDCLOUD-17676).
If the Structure is customized in any way (see examples below); whenever the Scan Results zip file is being manually replaced (e.g. while testing / developing, by accessing "Edit Import structure" configuration removing the current zip file, and uploading the SAME or any other Scan Results zip file) or whenever a new discovery import runs from the discovery tool, all Mapping customization will be lost, and the default mapping will restore!
Additionally, if any object type had its Name changed, e.g. "Host" to "Server", a new "Host object type will be created, with a new, default map set to it ("Server" OT and map will remain untouched).
Examples:
1. Discovery may have customized patterns, adding "External Information" as additional data to the Scan results xml. (e.g. the Windows Postgres patterns will already include extended information for: Owner, Access Privileges and Encoding etc.) - this information will not automatically create Attributes (see JSDCLOUD-17677), and will require the user to manually create the attribute and map them with corresponding datalocators within the Database object type map.
2. The user wants to create a Unique TAG for Hosts, by combining the Host's Model and the RAM size, concatenated, hence combining two datalocators mapped into one attribute, resulting in: "XYZ-nnnnn"
Steps to Reproduce
- Use Assets Discovery tool to generate a Scan Result zip
(extended information is optional) - Create a new, blank object schema in Assets, and navigate to the schema configuration>Import tab
- Create a new Discovery import, give it a name, and upload your Scan result zip.
Leave the "Automatically create object types and attributes" toggle on.
No additional settings are required, save the import and wait for the Object Types and mapping to create. (refresh the import page until object type maps are available when clicking "Edit Mapping" - Adjust your Schema:
4.1 Change the "Operating System" object type to "OS"
4.2 Add a Text Attribute to the "Host" object type: "TAG" - Refresh the Import page and add an attribute map to your "Host" object type:
Map the "Model" and "RAM" datalocators to your "TAG" attribute. - Run the import (optional - not required, but to prove the import is working)
See that OS objects are created, and Hosts objects have the TAG attribute populated - access the import's configuration ("Edit import structure"), remove the Scan zip from the page, and click Brows to upload the exact same file from your computer (use the same file to show that there is no change to any data locators...).
Click to save the changes - No warning or error is showing, only updating/success banners.
- Wait 5 min, and refresh the import page, expand "Edit Mapping" and inspect the configuration
OR
- Use Assets Discovery tool to generate a Scan Result zip
(extended information is optional) - Create a new, blank object schema in Assets, and navigate to the schema configuration>Import tab
- Create a new Discovery import, give it a name, and upload your Scan result zip.
Leave the "Automatically create object types and attributes" toggle on.
No additional settings are required, save the import and wait for the Object Types and mapping to create. (refresh the import page until object type maps are available when clicking "Edit Mapping" - Update the missing object type configuration
- Wait for discovery import tool to run the import
- Once the import runs from the discovery tool, the missing configuration mapping is reset to the default configuration.
Expected Results
The "OS" object type map is there.
No "Operating System" object type map is present - since we modified it to "OS"
The "Host" object type map contains the mapping of the "Model" and "RAM" datalocators to the TAG attribute
Actual Results
The "OS" object type map is there - untouched ![]()
There is a new object type map for "Operating System", and a new corresponding object type was created in the Schema ![]()
The "Host" object type map does no longer show the mapping for the TAG attribute
(or any Customized / Extended information mapping), although the Attribute is still present on the object type itself ![]()
Workaround
One can manually rename all object types previously created, and delete the newly created ones once all testing is done...
Otherwise, manually recreating all the customized mapping is required each time a file is uploaded.