Closed arki91 closed 3 years ago
The latest basic auth filter has hosts option now: https://github.com/istio-ecosystem/wasm-extensions/releases/tag/1.9.2. Please take a look at this configuration reference on how to configure the hosts option: https://github.com/istio-ecosystem/wasm-extensions/tree/master/extensions/basic_auth#configuration-reference.
An example configuration is like the folllow:
{
"basic_auth_rules": [
{
"hosts":["bookinfo.com", "*.suffix.com", "host.prefix.*"],
"prefix": "/productpage",
"request_methods":[ "GET", "POST" ],
"credentials":["test:test"]
}
]
}
Thanks!
In our setup we have multiple hostnames routed against one istio ingess gateway pod so we have to setup basic auth for each hostname differently.