{"id":29324989,"url":"https://github.com/osrf/nodl_to_policy","last_synced_at":"2025-09-06T00:38:42.659Z","repository":{"id":47924374,"uuid":"381436457","full_name":"osrf/nodl_to_policy","owner":"osrf","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-27T12:02:37.000Z","size":96,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-07T17:16:10.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osrf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-29T16:53:10.000Z","updated_at":"2021-10-27T12:02:40.000Z","dependencies_parsed_at":"2022-08-12T14:20:38.449Z","dependency_job_id":null,"html_url":"https://github.com/osrf/nodl_to_policy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/osrf/nodl_to_policy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrf%2Fnodl_to_policy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrf%2Fnodl_to_policy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrf%2Fnodl_to_policy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrf%2Fnodl_to_policy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osrf","download_url":"https://codeload.github.com/osrf/nodl_to_policy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osrf%2Fnodl_to_policy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273842836,"owners_count":25177920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2025-07-07T17:02:30.262Z","updated_at":"2025-09-06T00:38:42.630Z","avatar_url":"https://github.com/osrf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nodl_to_policy\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Build status](https://github.com/osrf/nodl_to_policy/actions/workflows/test.yml/badge.svg)](https://github.com/osrf/nodl_to_policy/actions/workflows/test.yml)\n\nThis repository contains tooling to generate a [ROS 2 Access Control Policy](https://design.ros2.org/articles/ros2_access_control_policies.html) from the [Node Interface Definition Language (NoDL)](https://github.com/ros2/design/pull/266) description of a ROS system (or that of a specific package), primarily to be used in conjunction with the `SROS2` utilities.\n\n## Building\n\n* Clone this repository to a ROS workspace: `git clone git@github.com:osrf/nodl_to_policy.git \u003cws/src\u003e/nodl_to_policy`\n* Install required dependencies: `rosdep install -yri --from-paths \u003cws/src\u003e --rosdistro=galactic`\n* Build with: `colcon build --symlink-install`\n\n## Usage\n\n### CLI\n\nThe `nodl_to_policy` package extends the ROS 2 CLI by adding a `nodl_to_policy` command, with an associated `convert` verb.\nThe expected use is as follows:\n\n```bash\nros2 nodl_to_policy convert \u003cpath-to-NoDL-file (*.nodl.xml)\u003e\n```\n\nInvoking the `convert` verb as above dumps the resulting access control policy in the console standard output.\nIf desired, this output can be redirected (`\u003e`) to `\u003coutput\u003e.policy.xml`.\n\n### API\n\nThe NoDL \u0026rarr; policy conversion method simply takes a NoDL description (type: `List[nodl.Node]`).\nAs such, the conversion API could be used programmatically as follows:\n\n```python\nfrom nodl_to_python.policy import convert_to_policy\n\n# obtain a NoDL description, either through `nodl.parse(\u003cnodl_file_path\u003e)` or otherwise\n\npolicy = convert_to_policy(nodl_description)  # type(nodl_description) == List[nodl.Node]\n\n# use policy, and/or output it using `nodl.dump_policy(policy, \u003coutput_stream\u003e)`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosrf%2Fnodl_to_policy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosrf%2Fnodl_to_policy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosrf%2Fnodl_to_policy/lists"}