It's possible to perform an authorization(rule-based like) into Kubernetes ingress(like kong, nginx). For example, i have this:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: foo-bar
spec:
rules:
- host: api.foo.bar
http:
paths:
- path: /service
backend:
serviceName: service.foo.bar
servicePort: 80
But before redirect to /service, I need to perform a call in my authorization api to valid if the request token has the rule to pass for /service.
Or I really need to use an API gateway behind ingress like a spring zuul to do this?