I am trying to configure kong's basic-auth plugin for a service running in minikube, following this.
Configs are as:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kong-routing
annotations:
konghq.com/strip-path: 'true'
kubernetes.io/ingress.class: kong
konghq.com/plugins: awesome-basic-auth
spec:
ingressClassName: kong
rules:
- host: kong.experiment
http:
paths:
- path: /my-api
pathType: ImplementationSpecific
backend:
service:
name: myservice
port:
number: 30050
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: awesome-basic-auth
config:
anonymous: anonymous
hide_credentials: true
plugin: basic-auth
---
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
annotations:
kubernetes.io/ingress.class: kong
name: testuser
credentials:
- my-basic-auth
username: testuser
Secret:
kubectl create secret generic my-basic-auth --from-literal=kongCredType=basic-auth --from-literal=username=testuser --from-literal=password=testpw
I have also configured anonymus user and request termination plugin for it, as explained in the link.
Based on this documentation, I have also executed:
minikube addons enable kong
But I don't see any impact of all this. I can still access end points with Basic Auth in postman, no matter if user credentials are absent or wrongly set in request headers.
What am I missing in the whole picture?