What happened?
I am getting a error 404 trying to access the service ,
What did you expect to happen?
I am using pomerium as a reverse proxy in my minor project to demonstrate Zero Trust Architecture . i want to integrate pomerium with keycloak , so that if i want to access a service which i hosted on localhost pomerium will intercept it and redirect to keycloak for authentication .
i want to be redirected to keycloak for authentication when i try to access a backend service hosted on localhost:2000
How’d it happen?
What’s your environment like?
i have setup pomerium in docker
- Pomerium version: pomerium:v0.27.1
- Server Operating System/Architecture/Cloud: Windows 11
What’s your config.yaml?
authenticate_service_url: http://localhost:8080/auth/realms/minor-project/protocol/openid-connect/auth
authenticate_service:
id: “pomerium-auth”
issuer: “http://localhost:8080/auth/realms/Minor-Project”
client_id: “student”
client_secret: “ug4fIl9V0aFfomvuu8oGSwWNu9EcySxg”
cookie_secret: “a0796abba0a645402b78d011c74229dd0421c0df35893ab24d3f9d4c7169df16”
scopes: [“openid”, “profile”, “email”]
routes:
- from: “https://localhost”
to: “http://localhost:2000”
auth: true
My docker-compose.yml
version: ‘3’
services:
pomerium:
image: pomerium/pomerium:v0.27.1
ports:
- “443:443”
restart: always
environment:
POMERIUM_DEBUG: “true”
POMERIUM_INSECURE_SERVER: “true”
POMERIUM_PROXY_AUTHENTICATE_URL: “http://localhost:8080/auth/realms/minor-project/protocol/openid-connect/auth”
POMERIUM_PROXY_AUTHORIZE_URL: “http://localhost:8080/auth/realms/minor-project/protocol/openid-connect/token”
POMERIUM_PROXY_FORWARD_AUTH_URL: “http://localhost:8080/auth/realms/minor-project/protocol/openid-connect/userinfo”
POMERIUM_IDP_PROVIDER: “keycloak”
POMERIUM_IDP_CLIENT_ID: “student” # Ensure this matches your Keycloak client ID
POMERIUM_IDP_CLIENT_SECRET: “ug4fIl9V0aFfomvuu8oGSwWNu9EcySxg”
POMERIUM_IDP_ISSUER_URL: “http://localhost:8080/auth/realms/minor-project”
POMERIUM_COOKIE_SECRET: “a0796abba0a645402b78d011c74229dd0421c0df35893ab24d3f9d4c7169df16”
POMERIUM_JWT_SECRET: “c5d19263db199de69cca97ff20f99e830c853f75c8b6600bf48deeb18fddf69d”
POMERIUM_ZERO_TOKEN: “AMf-vBzBUXNoj6p-cjmC39BRnjedi5hcIDa8jl7ssmNHxBX6DjwoBwI2zFmLnNF80Y5BAuhbkeEVNn3PhLKRsO9wF1A2P4Olqf2mCfe9C_wJmKL_kaPUjGGEhtRj526Q_n2fqenxzOy_sqSAnyWGlniazRoKWai2ThtN2qV8U_o9E9pstTzRP2UGF22PO6A6hKS1VkQdtV_K”
POMERIUM_ROUTES: |
- from: “https://localhost”
to: “http://localhost:2000” # Your Student Service app
auth: true
XDG_CACHE_HOME: “/var/cache”
volumes:
- pomerium-cache:/var/cache
networks:
main:
aliases:
- verify.eternal-polliwog-2484.pomerium.app
verify:
image: cr.pomerium.com/pomerium/verify:latest
networks:
main:
aliases:
- verify
networks:
main: {}