728x90

요즘에 보안에 대해서 민감하기 때문에 최대한 보안에 문제되는 점은 사전에 점검한다.
HTTP method 중에 GET, POST, PUT, DELETE, TRACE, OPTIONS등
불필요한건 제거하는 게 좋다.
apache / apache-tomcat의 설정이 조금 다르다.
apache-tomcat의 경우 해당 프로젝트의 web.xml에 다음과 같이 설정해 주면 된다.

 

tomcat의 ajp기능 비활성 시키기

 

해당 웹프로젝트의 web.xml에 아래 내용 추가

 

 

 <security-role>
  <description>Nobody should be in this role so JSP files are protected from direct access.</description>
  <role-name>nobody</role-name>
 </security-role>
 <security-constraint>
  <web-resource-collection>
   <web-resource-name>Forbidden</web-resource-name>
   <url-pattern>/*</url-pattern>
   <http-method>PUT</http-method>
   <http-method>DELETE</http-method>
   <http-method>TRACE</http-method>
   <http-method>PATH</http-method>
   <http-method>OPTIONS</http-method>

   <http-method>PROPFIND</http-method>

   <http-method>PROPPATCH</http-method>

   <http-method>COPY</http-method>

   <http-method>MOVE</http-method>

   <http-method>LOCK</http-method>

   <http-method>UNLOCK</http-method>

   <http-method>HEAD</http-method>
   <http-method>GET</http-method>
  </web-resource-collection>
  <auth-constraint>
   <role-name>nobody</role-name>
  </auth-constraint>
 </security-constraint>

 

728x90

+ Recent posts