Skip to main content

Unified Firewall Abstraction laYer for Automation

Project description

UFAYA

Unified Firewall Abstraction laYer for Automation

CI PyPI version Python versions License: MIT

UFAYA is a Python SDK that provides a single, consistent interface for interacting with firewalls from multiple vendors. Instead of writing separate automation scripts for each firewall platform, UFAYA exposes a unified abstraction layer that normalizes firewall operations across different systems.

The design follows the same architectural principle used by tools like NAPALM, which provide a unified API to interact with devices from different vendors through an abstraction layer.

Supported Vendors

Vendor Driver Status
Juniper SRX juniper_srx Read-only XML ingestion + firewall-rule JSON export with live policy hit counts + XML-first NAT JSON export
Palo Alto paloalto Skeleton
Fortinet fortinet Skeleton
Cisco cisco Skeleton

Juniper SRX exports

JuniperSRXDriver.export_rules_json(output_dir, mode=...) writes a context-grouped JSON document for parsed security policies.

  • Export modes remain minimal, enriched, and debug.
  • Export payloads now use schema_version: 3.
  • Each exported rule includes a canonical hit_count field.
  • In live mode, UFAYA fetches show security policies hit-count | display xml | no-more and populates hit_count when that operational snapshot is available.
  • The live hit-count parser supports both older policy-information responses and newer Junos operational XML variants such as multi-routing-engine-results with policy-hit-count-entry records.
  • In file mode, or when the live hit-count snapshot cannot be collected, rules still include hit_count: null.
  • Live exports that successfully collect hit counts also include a top-level hit_counts_collected_at UTC timestamp.
  • Hit-count parser maintenance notes live in JUNIPER_HIT_COUNTS.md.

JuniperSRXDriver.export_nat_json(output_dir, mode=...) writes a context-grouped JSON document for parsed Junos NAT rules.

  • NAT export is XML-first in both modes:
    • live mode fetches show configuration | display xml | no-more
    • file mode reads the XML file passed via config_path
  • NAT parsing walks <security><nat><source>, <destination>, and <static> from configuration XML.
  • NAT export modes are also minimal, enriched, and debug.
  • NAT payloads use schema_version: 1.
  • Exported NAT rules use a vendor-agnostic, rule-centric shape with canonical match and translation blocks.
  • Unconstrained NAT address selectors export explicitly as ["any"] in the canonical match.
  • NAT application references are resolved into canonical protocol/port match fields while preserving raw application names.
  • Enriched and debug NAT exports also include referenced translation pools under supporting_objects.translation_pools.
  • supporting_objects.translation_pools remains scoped to pools actually referenced by exported rules, not the full device inventory.
  • Referenced translation pools export the same normalized address/port values used by rule-level translation targets, including supported address-range forms.
  • NAT lookup metadata records Juniper precedence as static, then destination, then source.

Installation

pip install ufaya

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ufaya-0.6.1.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ufaya-0.6.1-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file ufaya-0.6.1.tar.gz.

File metadata

  • Download URL: ufaya-0.6.1.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ufaya-0.6.1.tar.gz
Algorithm Hash digest
SHA256 3e262b0c66473d24e6177033658a08edc1f37fa6d7cf2d098713d0b0178e415b
MD5 604ffde0ddd0a81bfa3b5ba442519f0b
BLAKE2b-256 71dbec560304cbbf82b9622de8957dfefceaf4c9c49c5ff8b0db47f725cd281a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ufaya-0.6.1.tar.gz:

Publisher: publish.yml on A-Khanafer/ufaya

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ufaya-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: ufaya-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ufaya-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3a6262b4a3dcd3d645c6e2ecb969b15be069bce4985974a052e879ed73bf41f
MD5 8cf7ded30cacd2f37c8b8a0da1b4d9c3
BLAKE2b-256 3e4f75796d072bac9a95e056a360d5db595f54f188056ac2ddb07a5fada7e367

See more details on using hashes here.

Provenance

The following attestation bundles were made for ufaya-0.6.1-py3-none-any.whl:

Publisher: publish.yml on A-Khanafer/ufaya

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page