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