keycloak을 통해 kibana를 보호하려고 하는데 로그인 후 keycloak-gatekeeper에서 오류가 발생합니다.
info issuing access token for user {"email": "[email protected]", "expires": "2019-03-23T00:18:30Z", "duration": "1m3.401805266s"}
error no session found in request, redirecting for authorization {"error": "authentication session not found"}
내 keycloak-gatekeeper 구성 파일은 다음과 같습니다.
skip-openid-provider-tls-verify: true
secure-cookie: false
discovery-url: https://keycloak.example.com/auth/realms/REALM
client-id: kibana
client-secret: xxx-xxx...
listen: 0.0.0.0:3000
enable-refresh-tokens: true
redirection-url: http://kibana.example.com/
encryption-key: AgXa7xRcoClDEU0ZDSH4X0XhL5Qy2Z2j
upstream-url: http://kibana:5601
내 apache2 가상 호스트 구성 파일은 다음과 같습니다.
Define VHOST_KIBANA kibana.example.com
<VirtualHost ${VHOST_KIBANA}:80>
ServerName ${VHOST_KIBANA}
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:8180/
ProxyPassReverse / http://127.0.0.1:8180/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
그 오류의 원인은 무엇입니까? 감사합니다
답변1
문제는 아파치 구성이었습니다. 이렇게 하면 올바르게 작동했습니다.
Define VHOST_KIBANA kibana.example.com
<VirtualHost ${VHOST_KIBANA}:80>
ServerName ${VHOST_KIBANA}
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8180/
ProxyPassReverse / http://127.0.0.1:8180/
</VirtualHost>