Replies: 2 comments
-
The secure context logic isn't aware that you consider direct service access over http to be secure. Without additional configuration keycloak should not assume that it is secure - an enhancement may be needed for this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
what is tls mode of istio gateway ? is https getting terminated at gateway ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling with a
Non-secure context detected; cookies are not secured and will not be available in cross-origin POST requests
warning from theorg.keycloak.cookie.DefaultCookieProvider
class when requests are sent inside the Kubernetes network.The most important thing is that everything works for me. Users log in, etc. I'm just afraid I might have a misconfiguration and be exposed to some threats.
All public communication seems okay because I've set
in an Istio VirtualService. But when an app in pod A sends requests to the Keycloak pods through the Kubernetes service, for example,
POST http://keycloak-service.default.svc.cluster.local/realms/aaa/protocol/openid-connect/token
, I get the above log.I did some tests. I got into another pod, let's say pod B, and sent sample requests to the token endpoint with the
X-Forwarded-Proto: https
header. With the header, everything was fine, but without the header, the log appeared.My configuration:
I've tried to set
hostanme-strict: true
,proxy-headers: forwarded
, but nothing has worked. I can modify pod A to send requests with appropriate headers, but I don't think that is the case. I also think that the communication between Keycloak's pods produces the same output, but I haven't confirmed this yet. I will try to test communication without the istio-proxy.Below is a log from the istio-proxy which helped me understand that the problem is with internal traffic, not public.
Is my configuration correct in this case? Is this just the behavior of Keycloak?
Beta Was this translation helpful? Give feedback.
All reactions