Unified Firewall Abstraction laYer for Automation
Project description
UFAYA
Unified Firewall Abstraction laYer for Automation
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, anddebug. - Export payloads now use
schema_version: 3. - Each exported rule includes a canonical
hit_countfield. - In live mode, UFAYA fetches
show security policies hit-count | display xml | no-moreand populateshit_countwhen that operational snapshot is available. - The live hit-count parser supports both older
policy-informationresponses and newer Junos operational XML variants such asmulti-routing-engine-resultswithpolicy-hit-count-entryrecords. - 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_atUTC 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
- live mode fetches
- NAT parsing walks
<security><nat><source>,<destination>, and<static>from configuration XML. - NAT export modes are also
minimal,enriched, anddebug. - NAT payloads use
schema_version: 2. - Exported NAT rules use a vendor-agnostic, rule-centric shape with explicit
conditions(traffic match) andmapping(before/after rewrite) blocks. conditionsdescribes which packets the rule selects;mappingdescribes what field is rewritten, from which addresses/ports, to which addresses/ports.- Each mapping step includes a human-readable
summary,original/translatedsides,mapping_kind(fixed/pool/interface_address),determinism(exact/set_based/dynamic), andresolution_status(resolved/unresolved). - Static NAT exports both
forward(inbound destination rewrite) andreverse(outbound source rewrite) mapping steps. - Unconstrained NAT address selectors export explicitly as
["any"]inconditions. - NAT
applicationreferences are resolved into canonical protocol/port condition fields while preserving raw application names. - Enriched and debug NAT exports also include referenced translation pools under
supporting_objects.translation_pools. supporting_objects.translation_poolsremains 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 mapping targets, including supported address-range forms.
- NAT lookup metadata records Juniper precedence as
static, thendestination, thensource.
Installation
pip install ufaya
Contributing
See CONTRIBUTING.md for guidelines.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ufaya-0.6.3.tar.gz.
File metadata
- Download URL: ufaya-0.6.3.tar.gz
- Upload date:
- Size: 48.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59878bf4242c692c8742c1f3c12004c7a3ea0f2b636209da3b7486956797e9f4
|
|
| MD5 |
c8243ed5db6c233cd03a3fdb0fae30f9
|
|
| BLAKE2b-256 |
ee30e371d1a93d076b23266b4e533812950d7f7f0abeebaacf4fadf628170506
|
Provenance
The following attestation bundles were made for ufaya-0.6.3.tar.gz:
Publisher:
publish.yml on A-Khanafer/ufaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ufaya-0.6.3.tar.gz -
Subject digest:
59878bf4242c692c8742c1f3c12004c7a3ea0f2b636209da3b7486956797e9f4 - Sigstore transparency entry: 1331211959
- Sigstore integration time:
-
Permalink:
A-Khanafer/ufaya@2f92ab393cbf11fb9ea78a5ca86960b85c7b51b9 -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/A-Khanafer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f92ab393cbf11fb9ea78a5ca86960b85c7b51b9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ufaya-0.6.3-py3-none-any.whl.
File metadata
- Download URL: ufaya-0.6.3-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa990546a99f52efc5566caf432e65784d37954f90b424579d43d8418ca29238
|
|
| MD5 |
53588a367bfdcc9f7625a9bb0e1813b5
|
|
| BLAKE2b-256 |
95a258212620aa50ed7aaf658885f75ebc8a5a942f53f2bcf791d7fbcf3ac6fc
|
Provenance
The following attestation bundles were made for ufaya-0.6.3-py3-none-any.whl:
Publisher:
publish.yml on A-Khanafer/ufaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ufaya-0.6.3-py3-none-any.whl -
Subject digest:
fa990546a99f52efc5566caf432e65784d37954f90b424579d43d8418ca29238 - Sigstore transparency entry: 1331212079
- Sigstore integration time:
-
Permalink:
A-Khanafer/ufaya@2f92ab393cbf11fb9ea78a5ca86960b85c7b51b9 -
Branch / Tag:
refs/tags/v0.6.3 - Owner: https://github.com/A-Khanafer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f92ab393cbf11fb9ea78a5ca86960b85c7b51b9 -
Trigger Event:
push
-
Statement type: