<p>I want to create external authentication for Service A, which listens to traffic on port <code>8080</code>.
What I desire is to have a second container (<em>Service B</em>) running in the same pod as <em>Service A</em>, that intercepts, evaluates and (maybe) forwards the traffic going in on port <code>8080</code>
"Maybe" means that <em>Service B</em> should filter out every request, that is not authenticated.</p>

<p><em>Service B</em> would be injected into every service that is getting deployed in order to ensure consistent authorisation and still keep the deployment process simple.</p>

<p>(How) is this possible?</p>

Nils Martel
<p>Look up Traefiks forward auth mode or nginx’s mod auth request. They both do what you are looking for. Or more generally this kind of thing is called an API gateway and there are many good ones.</p>
