- 04 Aug 2024
- 7 Minutes to read
- Print
- DarkLight
- PDF
Axonius - Add Custom Data to Assets
- Updated on 04 Aug 2024
- 7 Minutes to read
- Print
- DarkLight
- PDF
Axonius - Add Custom Data to Assets can be configured to do the following to each asset resulting from the query run:
- Add a Custom Field (name and value) to the asset.
- Add or replace a value of a Custom Field or Axonius Field that already exists on the asset.
Learn more about Custom Data.
Once added, you can use the custom data as a field in future queries.
See Creating Enforcement Sets to learn more about adding Enforcement Actions to Enforcement Sets.
General Settings
- Enforcement Set name (required) - The name of the Enforcement Set. A default value is added by Axonius. You can change the name according to your needs.
- Add description - Add a description of the Enforcement Set. It is recommended to describe what the Enforcement Set does.
- Run action on assets matching following query (required) - Select an asset category and a query. The Enforcement Action will be run on the assets that match the query parameters.
- A query only returns results for the asset type it was created for.
- Not all asset categories are supported for all Enforcement Actions.
- See Actions supported for Activity Logs, Adapters Fetch History, and Asset Investigation modules.
- See Actions supported for Vulnerabilities.
- See Actions supported for Software.
- Action name (required) - The name of the Main action. A default value is added by Axonius. You can change the name according to your needs.
- Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.
Required Fields
You can create a new Single Value or Multiple Value custom field to add to each asset that results from the query run.
Or, you can select a predefined Custom Field or Axonius Field to add to each asset, or if the selected field already exists on the asset, to replace its value or add to its values. In the case that the predefined field is configured in the system as Single Select, you are required to choose a single value so that the field is added to the assets as a single value field.
The following fields must be configured to run the Enforcement Set.
- Field name - Select a predefined Custom Field or Axonius Field, or create a new Custom Field.
- Select a predefined Custom Field or Axonius Field: From the Field name dropdown, filter the list of fields to select a Custom Field or Axonius Field that is already defined in the system to either add to each asset, or if this field already exists on the asset, to add values to it or replace its values.
The Field type and Value type are automatically filled in according to the custom field configuration. Proceed to step 3 below. - Create a new custom field to add to the asset: Type a new field name and then click + New Field Name to add a new custom field to the asset.
- Select a predefined Custom Field or Axonius Field: From the Field name dropdown, filter the list of fields to select a Custom Field or Axonius Field that is already defined in the system to either add to each asset, or if this field already exists on the asset, to add values to it or replace its values.
Custom field names support special characters (i.e., not alphabetic or numeric characters). However, the system does not support giving a custom field a name identical to that of an already existing custom field apart from special characters. For example: If CustomField*1 is a defined custom field, you should not name a new custom field CustomField$1 or CustomField#1.
- For new custom fields only:
- From the Field type dropdown, select one of the following:
- Single Value - Creates a single-value field.
- Multiple Values - Creates a list field.
- From the Value type dropdown, select a value type according to the field type that you selected.
- When Field type is Single Value, the following Value types are available:
- String
- Date - See Adding Dates.
- Float
- Integer
- Boolean
- When Field type is Multiple Values, the following Value types are available:
- String
- Date - See Adding Dates
- Float
- Integer
- When Field type is Single Value, the following Value types are available:
- From the Field type dropdown, select one of the following:
- For a predefined field (Custom Field or Axonius Field): When the Field type is Single Select, from the Field value dropdown, select a single value.
- When the Field type is Single Value, in the Field value box, type a value. The field value is determined by the Value type.
- For a String, Float, or Integer value type, in the Field value field, select from the dropdown or type a free-text value for the custom field.
- For a Boolean value type, from the Field value dropdown, select either True or False.
- For a Date value type, select the current date or a specific date. See Adding Dates below for more details.
- When the Field type is Multiple Values:
- In the Field Value box, type a list of field values. You can click the x of a value to remove it, or click a value to edit it.
- For a String, Float, or Integer value type, in the Field value field, select from the dropdown (if it exists), the field values. Otherwise, type a value, and then press Enter, comma, or semicolon to add each additional value to the list. You can also paste a comma separated list into the field. To learn more, see Adding a List String below.
- For a Date value type, select the current date or specific dates. See Adding Dates below for more details.
- When you enable the If field exists add new values to the list (otherwise override all existing values) option, if the Multiple Value field already exists on the asset, the field values entered in this enforcement action are added to the existing values on the asset field. Otherwise, the entered field values overwrite the existing field values.
- In the Field Value box, type a list of field values. You can click the x of a value to remove it, or click a value to edit it.
Adding Dates
You can add a Date custom field to assets. This can be useful to identify the first time an asset was noncompliant.
For Single Value date fields you can add a single date - the Enforcement action run time or another date.
For Multiple Value date fields you can add the Enforcement action run time (a single date) or a list of other dates.
To add a date
- In the Date type field, choose Now (Execution time) or set a Specific date. The times displayed are in UTC.
- Now (Execution time) sets the date to the Enforcement action run time.
- Specific date can be either in the past or future.
- For a Single Value date, in Field value, click Select Date to select a date from a calendar, click select time to select a time, and then click Ok.
- When you enable the Don’t overwrite values if custom field already exists option, if the Date field already exists on the asset, the date value entered in this enforcement action does not replace the existing date on this field. This can be useful, for instance, if the action added a custom date to show the first time something was found on the system, and you do not want to overwrite this value. Otherwise, if you do not enable this option, the entered date replaces the existing date.
- For a Multiple Value date, in Field value, click Add Date to select a date from a calendar, click select time to select a time, and then click Ok. Repeat for each date that you want to add.
- For a Single Value date, in Field value, click Select Date to select a date from a calendar, click select time to select a time, and then click Ok.
When you create a Dynamic Value Statement for adding a custom date field, make sure to use form.field_date.specific with Date type set to Specific date, as a dynamic date can be written only to this type of Date field. Do not use form.field_date.now or a field with Date type set to Now, as this type of field cannot accept dynamic input and regardless of the statement, its value is always the action runtime.
Adding a List String
To add items to a list string
- Do one of the following
- Type the name of the field value and press Enter.
- Type the name of the field value and press Comma (,).
- Type the name of the field value and press Semicolon (;).
For example:
- Type “Paris” and press Enter. A tile named “Paris” is added to the list.
- Type “London” and type a comma “,”. A tile named “London” is added to the list.
- Type “Montreal” and type a semicolon “;”. A tile named “Montreal” is added to the list.
To remove items from the list, click the x in the tile you want to remove.
Additional Fields
These fields are optional.
Remove this custom data field from entities not found in the query results - Toggle on this option to remove the Custom Field from all entities that are not part of the list of assets on which the Enforcement Action ran. Be aware that selecting this option can cause the removal of Custom Fields added by other users or Enforcement sets.
To see a list of the assets, which are not in the query results, view the run history detail and click Additional in the drawer header.
When this option is toggled on, the following sub-options appear:
- Remove entire field - Select this option to removes the entire field from entities not in the query results.
- Remove values field - Relevant for Multiple Values fields. Select this option to remove from entities not in the query results only the field values added to the Multiple Values field (for assets in the query) using this Enforcement Action (these are the field values in Field value (list string) under Required Fields).
For more details about other Enforcement Actions available, see Action Library.