2017-12-20 2 views
0

친애하는 sonarqube 커뮤니티,의 요청에 잘못된 CSFR '보안 역방향 프록시

뒤에 sonarqube을 실행 우리는 아파치 보안 (SSL) 리버스 프록시 뒤에 sonarqube을 설정했습니다. 정상 접속이 잘 작동하지만, 특권 조치는 다음과 같은 오류가 발생할 :

2017.12.19 08:26:02 DEBUG web[AWBtqc1RcFsQ/x1cAAAx][auth.event] login failure [cause|Wrong CSFR in request][method|JWT][provider|LOCAL|local] [IP|xxx.xxx.xxx.xxx|yyy.yyy.yyy.yyy][login|admin]

sonarqube가 '/ 수중 음파 탐지기'에서 실행하고 아파치 구성은 다음과 같습니다

... 
ProxyPreserveHost On 
AllowEncodedSlashes NoDecode 
... 
<Location /sonar> 
    RequestHeader set X-Forwarded-Proto "https" 
    ProxyPass  http://xxx.domain:9000/sonar 
    ##ProxyPassReverse http://xxx.domain:9000/sonar 
    ProxyPassReverse [https://]https://<service>.<domain>.<tld>/sonar 
</Location> 

sonarqube 버전 6.7 LTS, 아파치 버전 입니다 사전

답변

4

에서 2.4.27

덕분에 당신은 리버스 프록시 설정을 사용하고 있기 때문에, 당신은 6.0에서 발생이 변화에 주목을 지불해야한다 차 우리는 단지 Upgrade Notes에 명확히 한 어떤 :

So far, if you were securing your SonarQube server behind a reverse-proxy, you had to make sure that Cookies were marked as secure at proxy level. Starting from v6.3, SonarQube automatically sets that flag when interacting via HTTPS. You should therefore remove any custom config you would have put in your reverse-proxy to flag SonarQube cookies as secure.

그것은 리버스 프록시에서 이러한 남은 설정은 당신이 관찰 한 것과 같은 실패 (들) 인증 선도, 간섭을 일으킬 것이라고 할 수있다.

+0

답변 해 주셔서 감사합니다. 동료가이를 테스트 한 결과 "보안"플래그는 관련성이 없지만 "HttpOnly"플래그는 결과입니다. 분명히, XSFR 토큰은 설정되지 않은 것에 달려 있습니다. 그는 이제 서버 측에서 "HttpOnly"플래그를 비활성화했습니다. 그러나 우리는 여전히 동일한 리버스 프록시를 통해 호출되는 다른 서비스 (Jenkins, Confluence 등)에서 아무런 문제가 없었기 때문에 이것이 "작은"버그라고 생각합니다. –