<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/rss/stylesheet/" type="text/xsl"?>
<rss xmlns:content='http://purl.org/rss/1.0/modules/content/' xmlns:taxo='http://purl.org/rss/1.0/modules/taxonomy/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:itunes='http://www.itunes.com/dtds/podcast-1.0.dtd' xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:atom='http://www.w3.org/2005/Atom' xmlns:podbridge='http://www.podbridge.com/podbridge-ad.dtd' version='2.0'>
<channel>
  <title>Charles&apos; Ends and Odds</title>
  <language>en-us</language>
  <generator>microfeed.org</generator>
  <itunes:type>episodic</itunes:type>
  <itunes:explicit>false</itunes:explicit>
  <atom:link rel="self" href="https://blog.charlesrod.com/rss/" type="application/rss+xml"/>
  <link>https://blog.charlesrod.com</link>
  <itunes:author>charles rodriguez</itunes:author>
  <itunes:image href="https://blog.charlesrod.com/assets/default/channel-image.png"/>
  <image>
    <title>Charles&apos; Ends and Odds</title>
    <url>https://blog.charlesrod.com/assets/default/channel-image.png</url>
    <link>https://blog.charlesrod.com</link>
  </image>
  <copyright>©2023</copyright>
  <itunes:block>Yes</itunes:block>
  <itunes:category text="Technology"/>
  <itunes:category text="Business"/>
  <itunes:category text="Business">
    <itunes:category text="Non-Profit"/>
  </itunes:category>
  <item>
    <title>OIDC Rancher Desktop</title>
    <guid>rMe4_PiVmnh</guid>
    <pubDate>Thu, 17 Jul 2025 06:55:25 GMT</pubDate>
    <itunes:explicit>false</itunes:explicit>
    <description>
      <![CDATA[<p>Rancher Desktop provides "provisioning scripts" to customize Rancher Desktop installations on Windows. ( <a href="https://docs.rancherdesktop.io/how-to-guides/provisioning-scripts/#windows" rel="noopener noreferrer" target="_blank">source</a> )</p><p><br></p><p>The following examples use GitLab as the basis.</p><p><br></p><h2>Prerequisite:</h2><p><br></p><ul><li>Create a Gitlab application: <a href="https://docs.gitlab.com/integration/oauth_provider/" rel="noopener noreferrer" target="_blank">https://docs.gitlab.com/integration/oauth_provider/</a></li></ul><p><br></p><h2>To add OIDC to Rancher Desktop on Windows</h2><p><br></p><ul><li>Create a file under the provisioning directory:</li></ul><pre class="ql-syntax" spellcheck="false">C:\Users\your-user-folder-here\AppData\Local\rancher-desktop\provisioning\00-OIDC-Setup.start&nbsp;
</pre><p><br></p><ul><li>File Contents should be similar to the following</li></ul><pre class="ql-syntax" spellcheck="false">#!/bin/sh   
mkdir -p /etc/rancher/k3s/config.yaml.d/   
cat &gt; /etc/rancher/k3s/config.yaml.d/OIDC.yaml &lt;&lt;EOF   
kube-apiserver-arg:    
- "oidc-client-id=xxxxxxxxxxxx"    
- "oidc-groups-claim=groups_direct"    
- "oidc-issuer-url=https://gitlab.com"    
- "oidc-username-claim=preferred_username"    
- "oidc-groups-prefix=customvalue:"    
- "oidc-username-prefix=customvalue:"   
EOF
</pre><p><br></p><p><strong>groups_direct</strong> is a key within the Gitlab OIDC token. By using the oidc-groups-claim flag, the kube-api server will grab a value found in the groups_direct key from the Gitlab OIDC token. If you're using a different provider, use a claim from the provider's token. <strong>preferred_username</strong> is another value from GitLab's token.</p><p><br></p><p><strong>customvalue</strong> can be any string. It'll be used to match OIDC operations to a ClusterRoleBinding</p><p><br></p><ul><li>Set up a ClusterRoleBinding and ClusterRole ( The ClusterRole is optional: you could use the built in roles- but not the best practice. )</li><li>Documentation on ClusterRoles and ClusterRoleBindings: <a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/" rel="noopener noreferrer" target="_blank">Using RBAC Authorization</a></li></ul><p><br></p><p>Example: where the customvalue was set to <strong>no1llc,</strong> and the user is part of a group <strong>partners</strong> and the subgroup <strong>founder. </strong>The values after the username and group prefixes <strong>MUST</strong> be matched to the token. ( note: [Group/User] should be Group or User.  ) </p><pre class="ql-syntax" spellcheck="false">subjects:   
- kind: [Group/User]  
  name: "no1llc:partners/founder"   
  apiGroup: rbac.authorization.k8s.io   
# or where user's username is gnoejuan and customvalue was "me"   
subjects:   
- kind: [Group/User]   
  name: "me:gnoejuan"   
  apiGroup: rbac.authorization.k8s.io
</pre><p><br></p><p>If there is no subgroup, the value will simply be the group.</p><p><br></p><p>Example "no1llc:partners"</p>]]>
    </description>
    <link>https://blog.charlesrod.com/i/oidc-rancher-desktop-and-rke2-rMe4_PiVmnh/</link>
    <itunes:episodeType>full</itunes:episodeType>
  </item>
</channel>
</rss>