{"id":34599917,"url":"https://github.com/scsibug/a2x","last_synced_at":"2026-06-01T09:31:13.517Z","repository":{"id":321245901,"uuid":"1084945749","full_name":"scsibug/a2x","owner":"scsibug","description":"ALFA to XACML compiler (sourcehut mirror)","archived":false,"fork":false,"pushed_at":"2025-11-21T16:32:21.000Z","size":458,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T00:53:47.210Z","etag":null,"topics":["alfa","authorization","xacml"],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~gheartsfield/a2x","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scsibug.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-28T11:33:27.000Z","updated_at":"2025-11-21T16:32:25.000Z","dependencies_parsed_at":"2025-10-28T17:39:31.492Z","dependency_job_id":null,"html_url":"https://github.com/scsibug/a2x","commit_stats":null,"previous_names":["scsibug/a2x"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/scsibug/a2x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scsibug%2Fa2x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scsibug%2Fa2x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scsibug%2Fa2x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scsibug%2Fa2x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scsibug","download_url":"https://codeload.github.com/scsibug/a2x/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scsibug%2Fa2x/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33769490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alfa","authorization","xacml"],"created_at":"2025-12-24T12:28:31.022Z","updated_at":"2026-06-01T09:31:13.511Z","avatar_url":"https://github.com/scsibug.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"ALFA to XACML (a2x)\n-------------------\n[![builds.sr.ht status](https://builds.sr.ht/~gheartsfield/a2x/commits/master.svg)](https://builds.sr.ht/~gheartsfield/a2x/commits/master?)\n\na2x converts policies written in the ALFA language to XACML 3.0 XML\npolicies.\n\nLicensed under the [GNU General Public License v3.0 or\nlater](https://spdx.org/licenses/GPL-3.0-or-later.html).\n\n### CHANGELOG\n\nPlease see the [CHANGELOG](CHANGELOG.md) for release history.\n\n### Usage\n\nConvert any files in the `src` directory ending in `.alfa` to XACML,\nsaving to the `xacml` directory.\n\n```\n$ a2x --input src --output xacml\n```\n\nThe `--input` option can be repeated for as many files or directories\nas desired.\n\nMost entities from the XACML spec are predefined and available through\nan implicitly imported namespace.  To see a listing, run:\n\n```\n$ a2x --show-builtins\n```\n\nIf you prefer to not have these implicitly imported, they can be\ndisabled with the ```--disable-builtins``` flag.\n\nThe default prefix for `PolicySetId`, `PolicyId`, and `RuleId` can be\ncustomized with the ```--namespace``` option.\n\n\n\n### Sample Policy\n\nA [sample policy](samples/retail/README.md) is included in this\nrepository, which may be helpful as a reference for ALFA language\nfeatures, and a known working example for running `a2x`.\n\nConvert the sample to XACML:\n\n```\n$ a2x -i samples -o xacml-gen\n\nALFA to XACML Converter v0.1.2\n==============================\n\nInput:  samples\nOutput: xacml-gen\n\nScanning input directory...\nFound 5 ALFA policy files\n\nParsing ALFA policies:\n  ✓ samples/retail/attr.alfa\n  ✓ samples/retail/oblig.alfa\n  ✓ samples/retail/common.alfa\n  ✓ samples/retail/main.alfa\n  ⊘ samples/retail/empty.alfa (empty)\n\nWriting XACML policies:\n  ✓ xacml-gen/main.retail.xml\n  ✓ xacml-gen/common.deny.xml\n  ✓ xacml-gen/main.customerBusinessHours.xml\n  ✓ xacml-gen/main.customerAddToCart.xml\n  ✓ xacml-gen/main.clerkAddToCart.xml\n  ✓ xacml-gen/main.voidTransaction.xml\n\nSummary:\n--------\nALFA files processed  : 5\nXACML files generated : 6\nPolicy Sets written   : 3\nPolicies written      : 7\nRules written         : 9\n\nTotal time: 4.1ms\n\n✓ Conversion completed successfully\n```\n\n### Building\n\na2x is written in Rust, so you will need to [install\nRust](https://www.rust-lang.org/) to compile it.  Rust version 1.85.0\n(stable) or newer is supported.\n\nTo build a2x:\n\n```\n$ git clone https://git.sr.ht/~gheartsfield/a2x\n$ cd a2x\n$ cargo build --release --locked\n$ ./target/release/a2x --version\na2x 0.1.0\n```\n\n### Running tests\n\na2x has unit tests and full end-to-end tests that ensure ALFA policies\nare converted to exact matches of manually verified XACML policies.\nTo run all these tests, use:\n\n```\n$ cargo test\n```\n\n### References\n\n* [XACML\n  3.0](https://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html) -\n  the OASIS specification for eXtensible Access Control Markup\n  Language.\n* [ALFA 1.0](https://groups.oasis-open.org/higherlogic/ws/public/download/55228/alfa-for-xacml-v1.0-wd01.doc) - the OASIS draft specification for ALFA (Word format)\n* [ALFA Guide](https://alfa.guide/) - many resources for learning and using ALFA\n* [ALFA 2.0](https://www.ietf.org/archive/id/draft-brossard-alfa-authz-00.html) - future evolution of the ALFA language\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscsibug%2Fa2x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscsibug%2Fa2x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscsibug%2Fa2x/lists"}