I have a question:
Is it possible to enable/disable mTLS for particular URL?
Lets consider the situation I have:
Service_A exposes port 8080 and it serves several URLs like /, /status, /metrics
So I want to have following:
enable mTLS for service_A:8080
disable mTLS for: service_A:8080/status, service_A:8080/metrics
Is it possible ?
This is how my current config. How can I ensure to have mtls only on path and not on host and port.
kind: Gateway
metadata:
name: some-gateway-dev
spec:
selector:
istio: dev-ingressgateway
servers:
- hosts:
- some.domain.com
port:
name: http-some-gateway-dev
number: 80
protocol: HTTP
tls:
httpsRedirect: true
- hosts:
- some.domain.com
port:
name: https-some-gateway-dev
number: 443
protocol: HTTPS
tls:
credentialName: some-gateway-dev-credential
mode: MUTUAL
subjectAltNames:
- allowconnectionfromhost.com
----
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: some-virtualservice
spec:
gateways:
- some-gateway-dev
- mesh
hosts:
- some.domain.com
- service-tcp-some
http:
- match:
- uri:
prefix: /
timeout: 30s
route:
- destination:
host: service-tcp-some
port:
number: 8080
subset: some-#VERSION#
weight: 100```
I tried to make use of service entries and also authentication policy but it seems both of them is not having an option to pass subjectAltNames.
Gaurav Dwivedi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.