TypeError: Cannot read property 'remoteAddress' of undefined

If you think it is a bug report or you have a technical issue, please answer the following questions. For general questions, you can delete these questions.

Elasticsearch version: 7.10.2

Kibana version (if relevant): 7.10.2

SG version 49

Describe the issue:
Using cacheproxy authentication getting error:
“TypeError: Cannot read property ‘remoteAddress’ of undefined\n at ProxyCache.addAdditionalAuthHeaders (/usr/share/kibana/plugins/searchguard/server/applications/searchguard/auth/types/proxycache/ProxyCache.js:223:35)\n at ProxyCache.getAllAuthHeaders (/usr/share/kibana/plugins/searchguard/server/applications/searchguard/auth/types/AuthType.js:410:12)\n at AuthType._defineProperty (/usr/share/kibana/plugins/searchguard/server/applications/searchguard/auth/types/AuthType.js:267:38)\n at process._tickCallback (internal/process/next_tick.js:68:7)”

where the configuration in kibana.yaml

searchguard.auth.type: “proxycache”
searchguard.proxycache.user_header: x-proxy-user
searchguard.proxycache.roles_header: x-proxy-roles
searchguard.proxycache.proxy_header: x-forwarded-for
searchguard.proxycache.proxy_header_ip: “127.0.0.1”

The Elastic stack is running with official elasticsearch and kibana helm charts.

I suspect that the error occurs when the health check called on kibana pod.

Can you please advise with a fix / workaround?

The proxycache auth type is only useful in very specific and unusual setups. Can you please describe your environment and why you are needing proxycache?

In most setups involving proxy auth, you only need the plain proxy configuration:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.