Kubernets Api Key Authentication

11/23/2021

I am using nginx ingress controller on Azure AKS

Is there a way to tune nginx ingress to force some particular Header that I define with some specific value to authenticate?

Let's say I want that the ingress validate a header named "MyApiKey" with value "4567" and if it does not match throw a 401 error

I found something similar in this link with basic authentication. The problem is that I can not use the "Authorization" Header

https://stackoverflow.com/questions/59824039/basic-authentication-via-nginx-ingress-controller

Thanks for your help!!

-- David
azure
kubernetes
nginx-ingress

0 Answers