Skip to main content

PAN-OS Device Certificate Report

Banner Image

Build Status PyPI version Python versions License

A CLI tool to generate device certificate reports from Palo Alto Networks PAN-OS devices.

This tool assists customers in navigating the information provided within this Knowledge Base article.

Table of Contents

Features

  • Multiple Data Sources: Collect device information from CSV files, Panorama appliances, or individual firewalls.
  • Comprehensive Reports: Generates detailed PDF reports including device certificate status, software versions, and upgrade requirements.
  • Easy to Use: Provides a straightforward command-line interface powered by Typer.
  • Data Validation: Utilizes Pydantic models for robust data handling.
  • Flexible Workflows: Supports multiple workflows for different use cases and environments.

Installation

Requires Python 3.10 or higher.

Install the package using pip:

$ pip install device-certificate-report
---> 100%
Successfully installed device-certificate-report

Usage

The device-certificate-report utility provides three subcommands:

  • csv: Generate a report from a CSV file containing device information.
  • panorama: Connect to a Panorama appliance to retrieve connected firewalls and generate a report.
  • firewall: Connect directly to a firewall appliance to generate a report.

CSV Subcommand

Process a CSV file to generate the report.

$ device-certificate-report csv --csv-file <path_to_csv_file> --output-file <output_pdf>
  • --csv-file and --output-file flags are optional*

Examples:

$ device-certificate-report csv                                                                                                                                                                                        ─╯
CSV file path: panorama.csv
Cleaned CSV file saved as: /Users/cdot/development/cdot65/device_certificate_report/cleaned.csv
Processing cleaned CSV file: /Users/cdot/development/cdot65/device_certificate_report/cleaned.csv
Report generated at device_certificate_report.pdf
$ device-certificate-report csv --csv-file panorama.csv --output-file device_certificate_report.pdf                                                                                                                    ─╯
Cleaned CSV file saved as: /Users/cdot/development/cdot65/device_certificate_report/cleaned.csv
Processing cleaned CSV file: /Users/cdot/development/cdot65/device_certificate_report/cleaned.csv
Report generated at device_certificate_report.pdf

Panorama Subcommand

Connect to a Panorama appliance and generate the report from connected firewalls.

$ device-certificate-report panorama --hostname <panorama_ip> --username <user> --password <password> --output-file <output_pdf>
  • --hostname, --username, --password, and --output-file flags are optional*

Examples:

$ device-certificate-report panorama                                                                                                                                                                                   ─╯
Panorama hostname or IP: panorama1.example.io
Panorama username: admin
Panorama password: 
Connecting to Panorama at panorama1.example.io
INFO:device_certificate_report.components.data_collection:Sending operational command to Panorama to retrieve all devices.
INFO:device_certificate_report.components.data_collection:Parsing XML response from Panorama.
INFO:device_certificate_report.components.data_collection:Found 14 devices connected to Panorama.
Report generated at device_certificate_report.pdf
$ device-certificate-report panorama --hostname panorama.example.io --username admin --password paloalto123 --output-file panorama_report.pdf                                                                      ─╯
Connecting to Panorama at panorama1.example.io
INFO:device_certificate_report.components.data_collection:Sending operational command to Panorama to retrieve all devices.
INFO:device_certificate_report.components.data_collection:Parsing XML response from Panorama.
INFO:device_certificate_report.components.data_collection:Found 14 devices connected to Panorama.
Report generated at panorama_report.pdf

Firewall Subcommand

Connect to a single Firewall appliance and generate the report.

$ device-certificate-report firewall --hostname <firewall_ip> --username <user> --password <password> --output-file <output_pdf>

Examples:

$ device-certificate-report firewall                                                                                                                                                                                   ─╯
Firewall hostname or IP: austin-fw1.example.io
Firewall username: admin
Firewall password: 
Connecting to Firewall at austin-fw1.example.io
INFO:device_certificate_report.components.data_collection:Sending operational command to Firewall to retrieve system info.
INFO:device_certificate_report.components.data_collection:Sending operational command to Firewall to retrieve device certificate status.
INFO:device_certificate_report.components.data_collection:Parsing XML response from Firewall system info.
INFO:device_certificate_report.components.data_collection:Parsing XML response from Firewall device certificate status.
Report generated at austin-fw1.example.io.pdf
$ device-certificate-report firewall --hostname austin-fw1.example.io --username admin --password paloalto123 --output-file firewall.pdf                                                                            ─╯
Connecting to Firewall at austin-fw1.example.io
INFO:device_certificate_report.components.data_collection:Sending operational command to Firewall to retrieve system info.
INFO:device_certificate_report.components.data_collection:Sending operational command to Firewall to retrieve device certificate status.
INFO:device_certificate_report.components.data_collection:Parsing XML response from Firewall system info.
INFO:device_certificate_report.components.data_collection:Parsing XML response from Firewall device certificate status.
Report generated at firewall.pdf

Note: If --output-file is not specified, the report will be saved with a default name.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a Pull Request.

Please ensure that your code adheres to the existing coding standards and includes appropriate test coverage.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Support

For details on the support provided by Palo Alto Networks for this project, please consult the SUPPORT.md file in the repository.


More extensive documentation will be available through our GitHub Pages site.

Metadata

Release files for device-certificate-report 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for device-certificate-report 0.1.2
File Size Uploaded Provenance
device_certificate_report-0.1.2.tar.gz 21.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for device-certificate-report 0.1.2
File Interpreter ABI Platform
device_certificate_report-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / device_certificate_report-0.1.2.tar.gz

Download URL device_certificate_report-0.1.2.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2208c91b278025b237fc1934994dadaf8b0142295b4a7f053aac9d7a8f8b04e9
BLAKE2b-256 checksum
How to use checksums
f4bb34011347c85dbc8b12b98a440833eef2b0d56eb3205d3e32634da56f4fde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Darwin/23.6.0

Release files / device_certificate_report-0.1.2-py3-none-any.whl

Download URL device_certificate_report-0.1.2-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0112786742aeca869887aab388bf465954e7cfbbb75298c66ed73c41b851700e
BLAKE2b-256 checksum
How to use checksums
3380c48c159de1fc6368b90b5f1dffe170c18116ee91b7d13965eb18a667a924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.7 Darwin/23.6.0

Security for device-certificate-report 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page