Skip to content

Proposal: Add version_item Element to PAN-OS OVAL Schema #283#331

Open
sharathshivalingappa wants to merge 1 commit into
OVAL-Community:5.12.3_developfrom
sharathshivalingappa:283-Proposal-Add-version_item-Element-to-PAN-OS-OVAL-Schema
Open

Proposal: Add version_item Element to PAN-OS OVAL Schema #283#331
sharathshivalingappa wants to merge 1 commit into
OVAL-Community:5.12.3_developfrom
sharathshivalingappa:283-Proposal-Add-version_item-Element-to-PAN-OS-OVAL-Schema

Conversation

@sharathshivalingappa
Copy link
Copy Markdown

Abstarct

This PR enhances the PAN-OS OVAL schema by introducing a new element version_item in both definitions and system-characteristics schemas. As per the current PAN-OS XSD Statement (OVAL 5.12 and 6.0), the <config_item> element only collects information from:

https://<PAN-OS-DEVICE>/api/?type=export&category=configuration

This API is not sufficient to capture full system information.

Real-Time System Analysis Summary:

Element Name Description
config_item Only collects the running configuration from the PAN-OS device. Information like DeviceName, DeviceVersion, etc., is missing in the response.
version_item Collects device-specific information such as Model Name, Device Version, License Status, etc.

➡️ version_item is proposed as a new schema element to bridge this gap.


Real-Time Device Analysis (PA-VM - PAN-OS v11.0.5)

Example CLI Output:

admin@PA-VM> show system info

hostname: PA-VM
ip-address: 192.168.122.26
family: vm
model: PA-VM
serial: unknown
vm-license: none
sw-version: 11.0.5

Example API Request Flow:

# Get API Key
curl -s -k 'https://192.168.122.26/api/?type=keygen&user=admin&password=admin'

# Example Response
<response status='success'>
  <result>
    <key>LUFRPT1X...</key>
  </result>
</response>

# Use API Key to get config
APIKEY="LUFRPT1X..."
curl -s -k "https://192.168.122.26/api/?key=$APIKEY&type=export&category=configuration"

Example Configuration Output:

<config version="11.0.0" urldb="paloaltonetworks" detail-version="11.0.0">
  <mgt-config>...</mgt-config>
</config>

➡️ As seen above, sw-version and other critical system information are not represented in the configuration XML — hence the need for version_item.


Changes Introduced

  • version_item in panos-definitions-schema.xsd
  • version_item in panos-system-characteristics-schema.xsd

<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
<xsd:sequence>
<xsd:element name="major_version" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe EntityStateIntType should be EntityItemIntType.

<xsd:documentation>The major_version entity is used to check the major version piece of the version string. The value is an integer and in the example 10.1.14-h9 the major version is '10'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="minor_version" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe EntityStateIntType should be EntityItemIntType.

<xsd:documentation>The minor_version entity is used to check the minor version piece of the version string. The value is an integer and in the example 10.1.14-h9 the minor version is '1'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="release" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe EntityStateIntType should be EntityItemIntType.

<xsd:documentation>The release entity is used to check the release piece of the version string. The value is an integer and in the example 10.1.14-h9 the release is '14'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="hotfix" type="oval-def:EntityStateIntType" minOccurs="0" maxOccurs="1">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe EntityStateIntType should be EntityItemIntType.

<xsd:documentation>The hotfix entity is used to check the hotfix piece of the version string. The value is an integer and in the example 10.1.14-h9 the hotfix is '9'.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="version_string" type="oval-def:EntityStateAnySimpleType" minOccurs="0" maxOccurs="1">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe EntityStateAnySimpleType should be EntityItemAnySimpleType.

<xsd:documentation>The version_string entity is used to check the sw-version raw string output of a PAN-OS XML API request. The value is an string and the example 10.1.14-h9. This is entirely controlled by operator attributes.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="model_name" type="oval-def:EntityStateStringType" minOccurs="0" maxOccurs="1">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe EntityStateStringType should be EntityItemStringType

</xsd:annotation>
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="oval-def:StateType">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe StateType should be ItemType

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants