<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Rbac on rHomelab</title><link>https://rhomelab.com/tags/rbac/</link><description>Recent content in Rbac on rHomelab</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 05 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://rhomelab.com/tags/rbac/index.xml" rel="self" type="application/rss+xml"/><item><title>Proxmox Permissions and API Tokens: Giving Out Access Without Giving Out Root</title><link>https://rhomelab.com/proxmox/proxmox-permissions-rbac-api-tokens/</link><pubDate>Mon, 05 Oct 2026 00:00:00 +0000</pubDate><guid>https://rhomelab.com/proxmox/proxmox-permissions-rbac-api-tokens/</guid><description>How Proxmox&amp;#39;s realm, role, and permission-path model actually works, how to set up least-privilege users and pools for family or roommates, and why a scoped API token beats handing out your root password.</description><content:encoded><![CDATA[<p>Most single-operator homelabs run everything as <code>root@pam</code>. You log in as root, every VM shows up, every setting is reachable, and that&rsquo;s fine right up until you want someone else to have access too, a roommate who wants to spin up their own VM, a family member who needs to restart one container, or a script that needs to talk to the API without holding the keys to the entire cluster. At that point &ldquo;just use my login&rdquo; stops being a reasonable answer, and Proxmox&rsquo;s actual permission system, which almost nobody touches because the default single-user setup never forces you to, becomes worth understanding.</p>
<h2 id="realms-users-and-why-rootpam-isnt-special-the-way-you-think">Realms, users, and why <code>root@pam</code> isn&rsquo;t special the way you think</h2>
<p>Proxmox authenticates users against a &ldquo;realm,&rdquo; and <code>pam</code> is just one of several. <code>root@pam</code> authenticates against the host&rsquo;s own Linux PAM stack, same as SSH would, which is why it&rsquo;s the account that exists by default and why it can&rsquo;t be deleted. For anyone else, you have two realistic choices: create more <code>@pam</code> accounts (real Linux users on the host, heavier-handed than you usually want) or use Proxmox&rsquo;s own built-in realm, written as <code>@pve</code>. A <code>@pve</code> user is a Proxmox-only identity with no corresponding Linux account, no shell access, nothing outside the web UI and API. For giving a person or a script scoped access, <code>@pve</code> is almost always the right realm. Create it under Datacenter &gt; Permissions &gt; Users, and at creation time it starts with zero permissions anywhere. That blank slate is the point.</p>
<p>If your homelab already has a directory service, Proxmox also supports LDAP and Active Directory realms, which is worth knowing about but overkill for a one-or-two-person setup. Stick with <code>@pve</code> unless you already have a reason to need it.</p>
<h2 id="roles-are-the-permission-bundles-paths-are-where-they-apply">Roles are the permission bundles, paths are where they apply</h2>
<p>Proxmox splits access control into two pieces that only make sense together: a <strong>role</strong> (what actions are allowed, a bundle of individual privileges like <code>VM.PowerMgmt</code> or <code>VM.Console</code>) and a <strong>path</strong> (where in the resource tree that role applies, a specific VM, a whole node, a storage target, or the entire datacenter). A permission is the combination of a user (or group), a role, and a path, with an option to propagate down the tree.</p>
<p>Proxmox ships a set of built-in roles that cover the common cases without you building anything from scratch:</p>
<ul>
<li><strong><code>PVEVMAdmin</code></strong> - full control over a VM/container (start, stop, console, snapshot, config) but no host-level access.</li>
<li><strong><code>PVEVMUser</code></strong> - console and power management only, no config changes. The right fit for &ldquo;let someone use the VM, not reconfigure it.&rdquo;</li>
<li><strong><code>PVEAuditor</code></strong> - read-only everywhere it&rsquo;s assigned. Useful for a dashboard account or a monitoring integration that should never be able to change anything.</li>
<li><strong><code>PVEDatastoreAdmin</code></strong> - manage a storage target without touching VMs at all.</li>
</ul>
<p>You can also build a custom role from individual privileges under Datacenter &gt; Permissions &gt; Roles if none of the built-ins fit, though for most homelab cases the stock roles cover it.</p>
<h2 id="pools-the-piece-that-makes-per-vm-access-manageable">Pools: the piece that makes per-VM access manageable</h2>
<p>Assigning a role to one VM at a time works for a single machine, but it falls apart fast once someone has three or four VMs they&rsquo;re supposed to manage. This is what <strong>pools</strong> are for: a named group of VMs/containers (and optionally storage) that you can grant a single permission against instead of repeating the grant per resource. Create a pool under Datacenter &gt; Permissions &gt; Pools, add the relevant guests to it, then grant the user&rsquo;s role against the pool&rsquo;s path instead of each VM individually. Add a new VM to that pool later and the existing permission covers it automatically, no second grant needed.</p>
<p>This is the practical shape of &ldquo;give my roommate their own lane&rdquo;: create a pool, drop their VMs into it, grant their <code>@pve</code> user <code>PVEVMAdmin</code> on that pool&rsquo;s path, and they can fully manage anything inside it while having zero visibility into your VMs, your storage config, or the node itself.</p>
<h2 id="a-worked-example-roommate-access-to-their-own-vms-nothing-else">A worked example: roommate access to their own VMs, nothing else</h2>
<ol>
<li><strong>Datacenter &gt; Permissions &gt; Pools</strong> - create a pool, something like <code>roommate-vms</code>.</li>
<li>Move or create their VMs/containers inside that pool.</li>
<li><strong>Datacenter &gt; Permissions &gt; Users</strong> - add a new user, realm <code>@pve</code>, set a password (or skip the password and issue them a token instead, covered below).</li>
<li><strong>Datacenter &gt; Permissions &gt; Add</strong> - select the user, path <code>/pool/roommate-vms</code>, role <code>PVEVMAdmin</code>, leave propagate on.</li>
</ol>
<p>That&rsquo;s the whole grant. They log into the same web UI with their own credentials and see exactly one pool&rsquo;s worth of VMs. They can&rsquo;t see your node&rsquo;s storage, your other guests, or the datacenter-level settings, because nothing was ever granted at those paths.</p>
<h2 id="api-tokens-the-right-way-to-let-a-script-talk-to-proxmox">API tokens: the right way to let a script talk to Proxmox</h2>
<p>The moment you&rsquo;re running Terraform, a backup script, or a monitoring pull against the Proxmox API, resist the urge to embed the root password in a config file somewhere. Proxmox API tokens solve this properly: under Datacenter &gt; Permissions &gt; API Tokens, you create a token tied to a specific user, give it its own token ID, and critically, you can scope its permissions <strong>independently</strong> of that user&rsquo;s own web-UI permissions. A token can be deliberately weaker than the user it belongs to.</p>
<p>The practical pattern: create a dedicated <code>@pve</code> user purely to own tokens (don&rsquo;t reuse your own login), grant that user only the specific role and path a given automation task actually needs, then issue a token under it with &ldquo;Privilege Separation&rdquo; left on so the token inherits exactly that scope and nothing more. A Terraform workflow that only needs to clone VMs from a template and manage their lifecycle should get a token scoped to <code>PVEVMAdmin</code> on the relevant pool, not an unscoped token tied to root. If that token ever leaks, a compromised credential with VM-level reach in one pool is a contained incident. A leaked root token is the whole cluster.</p>
<p>Tokens are presented to you exactly once at creation time, copy the secret immediately, Proxmox doesn&rsquo;t store it in a form you can retrieve again. If you lose it, revoke the token and issue a new one, don&rsquo;t leave an orphaned token sitting around with no idea where the secret went.</p>
<h2 id="two-factor-authentication-while-youre-in-here">Two-factor authentication, while you&rsquo;re in here</h2>
<p>Since you&rsquo;re already in Datacenter &gt; Permissions, it&rsquo;s worth enabling TOTP two-factor for any account that has real reach, root included. It&rsquo;s under each user&rsquo;s settings (or Datacenter &gt; Permissions &gt; Two Factor for a cluster-wide default), works with any standard TOTP app, and takes under a minute to set up. A firewall and a tight RBAC setup both assume the account itself hasn&rsquo;t been handed over; 2FA is what actually protects that assumption if a password leaks somewhere unrelated to Proxmox entirely.</p>
<h2 id="what-this-isnt-a-substitute-for">What this isn&rsquo;t a substitute for</h2>
<p>Permissions control what an authenticated user or token can do inside Proxmox. They don&rsquo;t replace the firewall rules that control what can reach the web UI or API in the first place, and they don&rsquo;t replace keeping the host itself patched. A roommate with a perfectly scoped <code>PVEVMAdmin</code> grant on their own pool is still a real account with a real password, and the API is still reachable from wherever your firewall rules let it be reached from. Treat RBAC as the second layer, not the only one: lock down who can even get to the login page, then make sure what they can do once they&rsquo;re past it matches what they actually need, not what&rsquo;s convenient to grant once and forget about.</p>
]]></content:encoded></item></channel></rss>