Tomcat에서 j_security_check의 정체

최근 Local PC에서 사용 가능한 Proxy Server를 구현하고 있습니다.
거의 다 만들어서 테스트를 하는데 대부분이 사이트는 문제 없는데 local에서 수행중인 tomcat의 admin에 로그인만 하면 다음과 같은 에러 페이지가 나타났습니다.

HTTP Status 400 - Invalid direct reference to form login page


그러면서 URL은 "http://localhost:8080/admin/j_security_check"와 같이 j_security_check로 바뀌어져 있습니다.
당근 j_security_check 를 찾아봤죠... web.xml, server.xml, struts-config.xml, servlet, jsp 파일 모두 뒤져도 없었습니다.

인터넷 검색중에 다음과 같은 리플을 찾았습니다.
This is caused by directly surfing to the login URL. Instead, you should
go to a protected resource, such as /xreporter/en-US/datasources. If
login is required, this will redirect you to the login page. The
"j_security_check" URL is a kind of temporary resource that only exists
if the tomcat decided that the login page should be shown.


말인즉 j_security_check 라는 URL은 별도로 존재하는 것이 아니라 Tomcat 서버가 보안 인증이 필요한(web.xml 파일에 security-constraint 설정되어 있는 URL에 접근할려면 경우 login이 필요한지 등을 확인하는 임시적인 URL이라고 하네요...

그래도 똑같은 request를 브라우저에서 보내면 처리되고 매뉴얼하게 패킷을 만들어서 보내면 안되는 이유는 아직까지 파악이 안되네요...
Tomcat 소스를 봐야 해결되지 않을까 생각하고 있습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 김형준


Trackback URL : http://www.jaso.co.kr/trackback/53

Leave a comment
« Previous : 1 : ... 352 : 353 : 354 : 355 : 356 : 357 : 358 : 359 : 360 : ... 388 : Next »