<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>openbao &amp;mdash; Jerry of the Week</title>
    <link>https://write.in0rdr.ch/tag:openbao</link>
    <description>ˈdʒɛri - Individual who sends life against the grain no matter the consequences</description>
    <pubDate>Tue, 28 Apr 2026 13:28:07 +0000</pubDate>
    <item>
      <title>Nomad authentication with OpenBao</title>
      <link>https://write.in0rdr.ch/nomad-authentication-with-openbao</link>
      <description>&lt;![CDATA[I started to use OpenBao as OpenID connect provider to authenticate my Nomad home lab.&#xA;&#xA;#nomad #openbao #jenkins #homelab&#xA;!--more--&#xA;&#xA;I have two automatic/system jobs that require a Token.&#xA;&#xA;The backup cron job is taking Nomad snapshots in regular intervals. The snapshot API requires a management token and the Nomad policy capability for snapshots with the operator are not implemented yet.&#xA;The Jenkins server runs Nomad jobs using the Nomad cloud plugin. This system needs a Token to access the Nomad API (AppRole not compatible, see below).&#xA;&#xA;I still keep my bootstrapping token around just in case I ever need it. That&#39;s ok unlike to procedures with OpenBao root tokens..&#xA;&#xA;  The bootstrap token can be deleted and is like any other token, care should be taken to not revoke all management tokens.&#xA;&#xA;Name             Type        Global  Accessor ID  Expired&#xA;Bootstrap Token  management  true              false&#xA;Snapshot         management  false             false&#xA;OIDC-vault       client      true              false&#xA;Jenkins          client      false             false&#xA;&#xA;The auth method in Nomad is still called Vault, never mind..&#xA;&#xA;The access for human users is authenticated by an OIDC provider in my OpenBao server.&#xA;&#xA;Because I already had an identity and alias setup (userpass authentication) including a group, I only needed to configure the provider and the assignment to the group to allow authentication with the new provider.&#xA;&#xA;In the OpenBao server, the default provider and the allowall assignment cannot be deleted. I assume it is similar to the “master” realm in a Keycloak instance 🤔.&#xA;&#xA;bao-openidconnect-vault.svg&#xA;&#xA;I had to define a NOMADTOKEN as “Jenkins credential”, because the Nomad cloud plugin for Jenkins cannot read secrets from OpenBao using an AppRole (the Nomad jobs spawned by the plugin can do this, just not the plugin itself).&#xA;&#xA;When I type nomad login in the shell, the browser opens and I can authenticate with OpenBao. What could be improved is outputting the OIDC redirect URI in the terminal. This is helpful when you need to login from disconnected machines (i.e., not the shell on your local machine).&#xA;&#xA;div style=&#34;text-align:center; font-size: 0.8em&#34;&#xD;&#xA;a href=&#34;https://write.in0rdr.ch/feed&#34;&amp;#128732; RSS/a | a href=&#34;https://m.in0rdr.ch/in0rdr&#34;&amp;#128024; Fediverse/a | a href=&#34;https://chat.in0rdr.ch/#/guest?join=p0c@conference.in0rdr.ch&#34;&amp;#128172; XMPP/a&#xD;&#xA;/div]]&gt;</description>
      <content:encoded><![CDATA[<p>I started to use <a href="https://openbao.org/docs/secrets/identity/oidc-provider">OpenBao as OpenID connect provider</a> to authenticate my Nomad home lab.</p>

<p><a href="https://write.in0rdr.ch/tag:nomad" class="hashtag"><span>#</span><span class="p-category">nomad</span></a> <a href="https://write.in0rdr.ch/tag:openbao" class="hashtag"><span>#</span><span class="p-category">openbao</span></a> <a href="https://write.in0rdr.ch/tag:jenkins" class="hashtag"><span>#</span><span class="p-category">jenkins</span></a> <a href="https://write.in0rdr.ch/tag:homelab" class="hashtag"><span>#</span><span class="p-category">homelab</span></a>
</p>

<p>I have two automatic/system jobs that require a Token.</p>
<ul><li>The backup cron job is taking Nomad snapshots in regular intervals. The <a href="https://developer.hashicorp.com/nomad/api-docs/operator/snapshot">snapshot API</a> requires a management token and the <a href="https://github.com/hashicorp/nomad/issues/23614">Nomad policy capability for snapshots with the operator</a> are not implemented yet.</li>
<li>The Jenkins server runs Nomad jobs using the <a href="https://github.com/jenkinsci/nomad-plugin">Nomad cloud plugin</a>. This system needs a Token to access the Nomad API (AppRole not compatible, see below).</li></ul>

<p>I still keep my bootstrapping token around just in case I ever need it. That&#39;s <a href="https://developer.hashicorp.com/nomad/tutorials/archive/access-control-bootstrap">ok</a> unlike to procedures with OpenBao root tokens..</p>

<blockquote><p>The bootstrap token can be deleted and is like any other token, care should be taken to not revoke all management tokens.</p></blockquote>

<pre><code>Name             Type        Global  Accessor ID  Expired
Bootstrap Token  management  true    ***          false
Snapshot         management  false   ***          false
OIDC-vault       client      true    ***          false
Jenkins          client      false   ***          false
</code></pre>

<p>The auth method in Nomad is still called Vault, never mind..</p>

<p>The access for human users is authenticated by an <a href="https://developer.hashicorp.com/nomad/tutorials/archive/sso-oidc-vault">OIDC provider in my OpenBao server</a>.</p>

<p>Because I already had an identity and alias setup (userpass authentication) including a group, I only needed to configure the provider and the assignment to the group to allow authentication with the new provider.</p>

<p>In the OpenBao server, the <a href="https://openbao.org/docs/concepts/oidc-provider/#oidc-providers"><code>default</code> provider</a> and the <a href="https://openbao.org/docs/concepts/oidc-provider/#assignments"><code>allow_all</code> assignment</a> cannot be deleted. I assume it is similar to the “master” realm in a Keycloak instance 🤔.</p>

<p><img src="https://code.in0rdr.ch/pub/blog/bao-openidconnect-vault.svg" alt="bao-openidconnect-vault.svg"></p>

<p>I had to define a <code>NOMAD_TOKEN</code> as “Jenkins credential”, because the Nomad cloud plugin for Jenkins cannot read secrets from OpenBao using an AppRole (the Nomad jobs spawned by the plugin can do this, just not the plugin itself).</p>

<p>When I type <code>nomad login</code> in the shell, the browser opens and I can authenticate with OpenBao. What could be improved is outputting the OIDC redirect URI in the terminal. This is helpful when you need to login from disconnected machines (i.e., not the shell on your local machine).</p>

<div style="text-align:center; font-size: 0.8em">
<a href="https://write.in0rdr.ch/feed">🛜 RSS</a> | <a href="https://m.in0rdr.ch/in0rdr">🐘 Fediverse</a> | <a href="https://chat.in0rdr.ch/#/guest?join=p0c@conference.in0rdr.ch">💬 XMPP</a>
</div>
]]></content:encoded>
      <guid>https://write.in0rdr.ch/nomad-authentication-with-openbao</guid>
      <pubDate>Sat, 15 Nov 2025 20:22:29 +0000</pubDate>
    </item>
  </channel>
</rss>