Skip to content

Latest commit

 

History

History
27 lines (26 loc) · 1.21 KB

README.md

File metadata and controls

27 lines (26 loc) · 1.21 KB

What is it?

This is demo how to use forwardauth middleware of traefik. You can find more details about it on official traefik docs

How to use it (in k8s)?

  1. register an app in Azure Active Directory to obtain ClientId, ClientSecret, TenantId
  2. build docker image src/TraefikAuthAAD/Dockerfile and publish it to a registry
  3. create a deploy and make sure that you override these environment variables:
  1. create a service for the deploy
  2. create a traefik middleware object:
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: auth
spec:
  forwardAuth:
    address: http://{service name or ip}/auth
    trustForwardHeader: true  
  1. use the middleware in your ingress objects