<?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>Dorian Monnier</title><link>http://dorianmonnier.fr/</link><description>Recent content on Dorian Monnier</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 26 Dec 2024 15:25:08 +0100</lastBuildDate><atom:link href="http://dorianmonnier.fr/index.xml" rel="self" type="application/rss+xml"/><item><title>Tailscale LocalAPI</title><link>http://dorianmonnier.fr/posts/2024-12-26-tailscale-localapi/</link><pubDate>Thu, 26 Dec 2024 15:25:08 +0100</pubDate><guid>http://dorianmonnier.fr/posts/2024-12-26-tailscale-localapi/</guid><description>&lt;h2 id="context"&gt;Context&lt;/h2&gt;
&lt;p&gt;I use Tailscale to secure network communication, and I wanted to authenticate users coming from the Tailscale network.&lt;/p&gt;
&lt;p&gt;The goal was to reproduce the behavior in the &lt;a href="https://github.com/tailscale/golink"&gt;golink&lt;/a&gt; application.
When users come from the Tailscale network, the application should authenticate them and give them access to the application based on roles defined in Tailscale ACL.&lt;/p&gt;
&lt;h2 id="solution"&gt;Solution&lt;/h2&gt;
&lt;p&gt;Tailscale exposes an HTTP API through a Unix Socket named &lt;code&gt;LocalAPI&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It can be used for many things. In my case, I needed to authenticate a user coming from Tailnet.
I used it to get information about a Tailscale user by calling the &lt;code&gt;whois&lt;/code&gt; endpoint.&lt;/p&gt;</description></item><item><title>Hello World</title><link>http://dorianmonnier.fr/posts/2024-12-26-hello-world/</link><pubDate>Thu, 26 Dec 2024 11:30:00 +0100</pubDate><guid>http://dorianmonnier.fr/posts/2024-12-26-hello-world/</guid><description>&lt;p&gt;Hello world, this is my first post!&lt;/p&gt;
&lt;p&gt;Thank you &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; for making it so easy to create a blog and &lt;a href="https://github.com/adityatelange/hugo-PaperMod/"&gt;PaperMod&lt;/a&gt; for the nice looking theme.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;package&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;main&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;import&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;func&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;main&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;fmt&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Println&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34;Hello, World!&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item></channel></rss>