oslo.rootwrap
Oslo Rootwrap
What it is and what it does
oslo.rootwrap is an OpenStack library that sits between application code and the shell to enforce fine-grained permission policies on commands that need to run as root. Rather than granting blanket sudo access, it validates each command against a set of rules before allowing execution, reducing the attack surface when OpenStack services need elevated privileges.
The package is part of the OpenStack oslo namespace and is maintained as an active project. It has minimal dependencies (only debtcollector and pbr) and installs as a pure Python wheel, making it lightweight to integrate into OpenStack deployments or other systems that need controlled root command execution.
Use it for:
- Restrict which shell commands OpenStack services can execute as root, enforcing a whitelist-based policy.
- Audit and log elevated-privilege command invocations for compliance and security monitoring.
- Prevent privilege escalation attacks by validating command arguments before sudo execution.
- Integrate permission filtering into multi-tenant cloud environments where isolation is critical.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
oslo.rootwrap provides fine-grained filtering of shell commands to run as root from OpenStack services, enabling controlled escalation of permissions with minimal privilege exposure.
Yes, if you are deploying or extending OpenStack services that require controlled root command execution. The permissive Apache 2.0 license, active maintenance, low install friction, and zero known vulnerabilities make it a safe choice. If you need root command filtering outside OpenStack, verify that its policy model aligns with your requirements first.
Install
oslo-rootwrap on PyPI
pip
pip install oslo-rootwrapuv
uv add oslo-rootwrappoetry
poetry add oslo-rootwrapInstalling oslo.rootwrap
Before you install
Active maintenance with a release 35 days ago. Low install friction: pure Python wheel with only two lightweight runtime dependencies (debtcollector and pbr). Supports current Python versions (3.11–3.14).
License in practice
Apache License 2.0 (permissive): you may use, modify, and distribute this package freely in commercial and private projects, provided you retain the license notice.
Quickstart
pip install oslo.rootwrap
from oslo_rootwrap import cmd
# Configure and invoke rootwrap filtering on shell commands
Requires Python 3.11 or later. Designed for OpenStack deployments; standalone use outside that context requires understanding its command-filtering policy model.
Verify before relying
- Specific API surface and filtering rule syntax are not detailed in the excerpt; consult documentation for integration patterns.
- Performance characteristics under high command volume are not documented in the fact sheet.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — debtcollector, pbr |
| Maintenance | actively maintained — 35 days since the last release |
| First released | |
| Downloads | 140,932/month — #11,258 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: oslo_rootwrap-7.10.0-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
oslo.policyoslo.policy enforces role-based access control…
permissive · top 15,000 on PyPI
oslo.privseposlo.privsep helps applications safely perform…
permissive · top 15,000 on PyPI
elevateElevate re-launches the current Python process…
permissive · top 15,000 on PyPI
oslo.vmwareoslo.vmware provides a library for common…
permissive · top 15,000 on PyPI
oslo.configParses command-line arguments and .ini-style…
permissive · top 5,000 on PyPI
oslo.logoslo.log provides standardized logging…
permissive · top 5,000 on PyPI
oslo.middlewareoslo.middleware provides WSGI middleware…
permissive · top 15,000 on PyPI
oslo.utilsoslo.utils provides common utility functions…
permissive · top 5,000 on PyPI
oslo.limitoslo.limit enforces quota and rate limits…
permissive · top 15,000 on PyPI
oslo.versionedobjectsoslo.versionedobjects provides a versioned…
permissive · top 15,000 on PyPI