{"id":17095907,"url":"https://github.com/travier/betterkit","last_synced_at":"2025-03-23T17:42:45.341Z","repository":{"id":109636326,"uuid":"457469716","full_name":"travier/betterkit","owner":"travier","description":"WIP Polkit replacement","archived":false,"fork":false,"pushed_at":"2024-07-25T17:50:42.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T11:12:20.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-02-09T17:54:39.000Z","updated_at":"2024-07-25T17:50:45.000Z","dependencies_parsed_at":"2024-07-25T20:40:53.781Z","dependency_job_id":null,"html_url":"https://github.com/travier/betterkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travier%2Fbetterkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travier%2Fbetterkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travier%2Fbetterkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travier%2Fbetterkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travier","download_url":"https://codeload.github.com/travier/betterkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144021,"owners_count":20568049,"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","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":"2024-10-14T14:44:08.225Z","updated_at":"2025-03-23T17:42:45.316Z","avatar_url":"https://github.com/travier.png","language":"Rust","readme":"# Alternative to polkit based on DBus and systemd-run\n\n## Design\n\n- Define a set of actions (commands) that will be executed via [systemd-run].\n- Define a set of rules that grant access to those actions to users based on\n  various conditions (logged-in locally, system administrator, etc.).\n- Run as a privileged system daemon that will execture the action for users if\n  they match the rules.\n\n## Security\n\n- Limited parsing of untrusted data\n- Declarative and easy to understand configuration syntax for actions and rules\n- Actions are run fully un-privileged and confined by default: privileged\n  access is opt-in\n- No SUID binary\n- Clear logging of which user requested which action and which rules enabled it\n- Written in pure safe Rust\n\n## Example\n\n```\n$ cat /usr/lib/betterkit/actions/rpm-ostree.conf\n[Action]\nId=org.coreos.rpm-ostree.rollback\nDescription=Roolback to previous deployment with rpm-ostree\nCommand=rpm-ostree rollback\nUser=root\nAccess=dbus-system\n\n$ cat /usr/lib/betterkit/rules/rpm-ostree.conf\n[Rule]\nAction=org.coreos.rpm-ostree.rollback\nGroup=wheel\nResult=Accept\n\n[Rule]\nAction=org.coreos.rpm-ostree.rollback\nActive=true\nResult=Ask\n```\n\n[systemd-run]: https://www.freedesktop.org/software/systemd/man/systemd-run.html\n\n## Current status\n\nCurrently only working with the session bus:\n\n```\n$ cargo run -- -v --user\n[INFO  deadend] Received: Signal NameAcquired from org.freedesktop.DBus\n[INFO  deadend] Received: Signal NameAcquired from org.freedesktop.DBus\n[INFO  deadend] Writing MOTD with reason: Test\n[INFO  deadend] Successfully wrote MOTD\n```\n\n```\n$ busctl --user call --json=pretty -- org.betterkit /org/betterkit/betterkit1 org.betterkit.betterkit1 Run as 2 \"ls\" \"-alh\" | jq -r \".data[0]\"\n$ busctl --user call --json=pretty -- org.betterkit /org/betterkit/betterkit1 org.betterkit.betterkit1 Get t 6 | jq -r \".data[0]\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravier%2Fbetterkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravier%2Fbetterkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravier%2Fbetterkit/lists"}