What happened?
I want to implement Pomerium in our infrastructure to protect some critical services.
We have several clusters with multiple services in each other. I need to create layer of protection with keycloak auth.
Currently our services use domain names in a way of serviceN.corp.domain.com.
Keycloak is in auth.corp.domain.com.
I started with one service example. My current config for pomerium is
autocert: false
address: :80
cookie_secret: xxxx
shared_secret: yyyy
idp_provider: "oidc"
idp_provider_url: "https://auth.corp.domain.com/auth/realms/xxxx"
idp_client_id: xxxx
idp_client_secret: "zzzz"
insecure_server: true
authenticate_service_url: https://service1.cloud.mygento.com
policy:
- from: https://service1.cloud.mygento.com
to: http://private_ip:8080
allowed_users:
- xxx@domain.com
- zzz@domain.com
With such a config I got a /.pomerium on home page and any other route is targeting to private service. I’ve spent time debugging this problem and found a reason in source code. It’s similar to Infinite redirect at /.pomerium endpoint after navigating to proxied application · Issue #3364 · pomerium/pomerium · GitHub - same domain to auth and app.
I can try create a new domain verify.corp.domain.com and target it to IP of that cluster and try on that service. It probably will work.
Hovewer I don’t understand how to scale that setup to multiple clusters.
Should I create a sidecar container with pomerium to each service and one global verifyer? Or one per cluster? Can I just silently work without a global verifier?
Current possible service map to IP:
service1.corp.domain.com - IP1
service2.corp.domain.com - IP2
service3.corp.domain.com - IP1
service4.corp.domain.com - IP3
auth.corp.domain.com - IP4