Hello,
I have configured successfully keycloak and kong using helm chart so kong will be the ingress controller of Keycloak. For the rest API part work perfectly. Now We have developed web application and used the keycloak login page. After successful login Kong receives a 302 (the normal process) with the location pointing to the new web application domain. But the ingress controller shows the following message
{
"message":"An invalid response was received from the upstream server"
}
I have tried several plugin bit with no success. Anybody has a hint on how to configure the redirect in Kong or should we move a more classic ingress like Nginx or HAProxy that support more the reverse proxy pattern?
This the keycloak configuration with helm
keycloak:
image:
registry: <acr>
repository: docker/keycloak
tag: 0.1.0
global.namespaceOverride: keycloak
fullnameOverride: keycloak
replicaCount: 1
httpRelativePath: "auth/"
auth:
adminUser: "admin"
adminPassword: "admin"
proxy: "edge"
service:
type: ClusterIP
postgresql:
enabled: false
externalDatabase:
host: <db_url>
port: 5432
user: <db_user>
password: <>
database: keycloak
extraEnvVars:
- name: KEYCLOAK_HOSTNAME
value: keycloak-dev.<domain>
- name: KEYCLOAK_PROXY_ADDRESS_FORWARDING
value: "true"
- name: KEYCLOAK_LOG_LEVEL
value: ERROR
- name: KEYCLOAK_FRONTEND_URL
value: https://keycloak-dev.<domain>/auth
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
- secretName: keycloak-dev.<domain>-tls
hosts:
- keycloak-dev.<domain>
hostname: keycloak-dev.<domain>
ingressClassName: kong
pathType: Prefix
path: /auth
servicePort: 80
metrics:
enabled: true
Kong Helm configuration
plugins:
namespace: gateway
kong-oidc-plugin:
namespace : gateway
kong:
namespace: gateway
repository: <acr>/docker/kong:3.0.0
tag: "3.0"
proxy:
annotations:
service.beta.kubernetes.io/azure-load-balancer-resource-group: <resource_group>
loadBalancerIP: <static_ip>
env:
prefix: /kong_prefix/
database: "off"
ingressController:
enabled: true
installCRDs: false
plugins:
configMaps:
- pluginName: oidc
name: kong-plugin-oidc
Thanks