<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Auth on dev.endevour</title><link>https://devendevour.iankulin.com/tags/auth/</link><description>Recent content in Auth on dev.endevour</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Fri, 23 Feb 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://devendevour.iankulin.com/tags/auth/index.xml" rel="self" type="application/rss+xml"/><item><title>Quick &amp;amp; Dirty auth with nginx &amp;amp; Node</title><link>https://devendevour.iankulin.com/quick-dirty-auth-with-nginx-node/</link><pubDate>Fri, 23 Feb 2024 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/quick-dirty-auth-with-nginx-node/</guid><description>&lt;p&gt;One of the basic requirements for any serious web app is a proper users/roles/authentication system - but if you&amp;rsquo;re just throwing up a utility of some kind on a public IP for testing, and you don&amp;rsquo;t want it to be abused, then this could be an option. There&amp;rsquo;s a few components:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Your app. In this demo it&amp;rsquo;s going to be Node, but it could be Go or whatever your server-side poison is. The app is listening for connections on a non-web port (ie not on 80 or 443), I&amp;rsquo;m going to use the traditional 3000.&lt;/li&gt;
&lt;li&gt;A firewall. That port (in my example 3000) must not be accessible from the internet. It has to be blocked by a firewall.&lt;/li&gt;
&lt;li&gt;A web server (I&amp;rsquo;m using nginx) that enforces basic auth.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I briefly discussed web server basic auth earlier - it&amp;rsquo;s a system built into the web server that requires a log in for a route, and authenticates it against the credentials in a password file (usually named &lt;code&gt;.htpasswrd&lt;/code&gt;) and only serves the content if authenticated.&lt;/p&gt;</description></item><item><title>Cookies, Sessions &amp;amp; Tokens</title><link>https://devendevour.iankulin.com/cookies-sessions-tokens/</link><pubDate>Tue, 12 Sep 2023 00:00:00 +0000</pubDate><guid>https://devendevour.iankulin.com/cookies-sessions-tokens/</guid><description>&lt;p&gt;&lt;img src="https://devendevour.iankulin.com/images/brunofach_flat_screen_illustration_of_a_background_with_cookies_0a1c174a-afdd-43a1-b9f6-ceab96b5aabd.jpg" alt="" class="img-responsive"&gt; &lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m up to the point in a web app where it needs to come off my lan and into the hands of a couple of users for alpha feedback. Before that happens, I have to add some sort of login/authentication system since it I want to use real, sensitive data. There&amp;rsquo;s lots of detailed blog posts and videos of how to implement this in an Express app with passport, but what I was missing was the big picture of what actually needs to happen.&lt;/p&gt;</description></item></channel></rss>