GCP - Send Object To Bucket
  • 11 Dec 2024
  • 5 Minutes to read
  • Dark
    Light
  • PDF

GCP - Send Object To Bucket

  • Dark
    Light
  • PDF

Article summary

The GCP - Send Object To Bucket uploads objects to the named bucket in Google Cloud Provider for:

  • Assets returned by the selected query or assets selected on the relevant asset page.

See Creating Enforcement Sets to learn more about adding Enforcement Actions to Enforcement Sets.

Note:

Required Fields

These fields must be configured to run the Enforcement Set.

  • Action name - The name of this Enforcement Action. The system sets a default name. You can change the name.
  • 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.

  • Use stored credentials from the GCP Adapter - Select this option to use credentials from the adapter connection. By default, the first connection is selected.

    • When you select this option, the Select Adapter Connection drop-down becomes available. Select the adapter connection to use for this Enforcement Action.
    Note:
    To use this option, you must successfully configure a Google Cloud Platform (GCP) adapter connection.
  • Object name - Name of the object to be uploaded to the bucket.

  • Bucket name - Destination bucket name in GCP.

  • Compute Node - The Axonius node to use when connecting to the specified host. For more details, see Connecting Additional Axonius Nodes.

Additional Fields

These fields are optional.

Connection and Credentials

When Use stored credentials from the adapter is toggled off, some of the connection fields below are required to create the connection, while other fields are optional.

  • JSON Key pair for the service account - A JSON document containing Service Account credentials for the GCP account. For details, see Connect Axonius to Google Cloud Platform.
  • HTTPS Proxy (optional) - Connect the adapter to a proxy instead of directly connecting it to the domain.
  • HTTPS Proxy User Name (optional) - The user name to use when connecting to the server using the  HTTPS Proxy.
  • HTTPS Proxy Password (optional) - The password to use when connecting to the server using the  HTTPS Proxy.
  • Choose object type to send to bucket - Select the format in which the query results will be sent: JSON or CSV.
    • When CSV is selected, these fields become available.

      Additional CSV Settings

      • Split by asset entities - Select to create a CSV file where each asset on a device is shown as a separate row. This separates each asset as the 'expand' option in the application. It separates each asset by its entity. For example, you will be able to know which values were fetched from each adapter connection. If you do not select this option, all values on a device are in the same cell on the CSV file.
      • Split by field values - Choose field value - For complex fields and lists you can create a CSV file where the values of complex fields and lists are represented as separate rows in the file. From the drop-down box select the value that you want to display in the file, 'Tags' for instance. Only fields that have been discovered are available. For example, if you export by Installed Software, you will be able to see each installed Software name and its version.
      • Don't split complex objects into columns - When selected, complex objects appear in a single column in JSON format. By default, each field in a complex object is split into a separate column in the CSV file.
      • Export CSV delimiter to use for multi-value fields (default: Export CSV delimiter to use for multi-value fields field under the System Settings section in the GUI Settings) - Specify a delimiter to separate between values within the same field of an exported CSV file, otherwise the delimiter defined in Export CSV delimiter to use for multi-value fields is used.
      • Maximum rows (default: 1048500) - Specify the maximum number of rows to be included in the CSV file. When you set a value here the generated CSV file will include the top x rows, based on the specified values. Otherwise, the generated CSV file will include the default maximum rows, set as 1048500. (note that this value is the maximum value supported by Excel, setting a higher value generates a file that can't be displayed fully or correctly in Excel)
      • Include associated devices (only for Vulnerabilities and Software) - For Software and Vulnerabilities queries. Toggle on this option to include the associated devices with the preferred hostname as a predefined field for each software or vulnerability. When you create a CSV file with associated devices (for Vulnerabilities or Software), if the exported query results are larger than the value set under Maximum rows (or the default value of 1048500), an appropriate notice is displayed at the end of the CSV file.
        • Device fields - This option is available for Software and Vulnerabilities. Select the device fields to add. By default Preferred Host Name is selected. Click add to select more fields. At least one field must be selected. Once you select fields, you can drag and drop to rearrange in the order that you want them to appear in the CSV file. Click the bin icon to remove a device field.
      • Include Associated fetch events (only for Fetch History) - For Adapter Fetch History queries, select this option to include details of the associated Fetch Events in the CSV file that is created.
      • Exclude parent complex objects columns (default: Disabled) - Enable this option to hide the parent field of complex fields in exported files.

APIs

Axonius uses the Upload objects from a file system | Cloud Storage | Google Cloud API.

  • Cloud Storage JSON API
    /pl/docs/google-cloud-platform-gcp#1-enable-cloud-apis

Adapter advanced settings:
Fetch Google Cloud Storage buckets - Fetch all Google Cloud Storage buckets.
Fetch Object metadata in Google Cloud Storage buckets - Fetch Object metadata in GCP Storage buckets.

Required Permissions

The stored credentials, or those provided in Connection and Credentials, must have the following permission(s) to perform this Enforcement Action:


For more details about other Enforcement Actions available, see Action Library.



Was this article helpful?