2015-09-03 2 views
4

Я получаю сообщение ниже строгого режима, в то время как tomcat 8 появляется с пожизненным сроком службы.Тяжелые ограничения безопасности при запуске tomcat 8 с liferay

SEVERE [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.SecurityConstraint.findUncoveredHttpMethods For security constraints with URL pattern [/bg/c/portal/protected] only the HTTP methods [POST GET] are covered. All other methods are uncovered. 
03-Sep-2015 07:06:00.733 SEVERE [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.SecurityConstraint.findUncoveredHttpMethods For security constraints with URL pattern [/sv/c/portal/protected] only the HTTP methods [POST GET] are covered. All other methods are uncovered. 
03-Sep-2015 07:06:00.733 SEVERE [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.SecurityConstraint.findUncoveredHttpMethods For security constraints with URL pattern [/zh/c/portal/protected] only the HTTP methods [POST GET] are covered. All other methods are uncovered. 

Это не имеет никакого влияния на сервере запускается, но не уверен, что является причиной этого? Любая помощь действительно понравилась бы.

+0

См. Также этот [родственный вопрос] (https://stackoverflow.com/questions/27431243/warning-jacc-for-the-url-pattern-xxx-all-but-the-following-methods-were-uncov). – Pixelstix

ответ

14

Это означает, что в web.xml кто-то указал ограничение безопасности только для методов POST и GET по шаблону /bg/c/portal/protected, возможно, таким же образом, к этому:

<security-constraint> 
    <web-resource-collection> 
     <url-pattern>/bg/c/portal/protected</url-pattern> 
     <http-method>POST</http-method> 
     <http-method>GET</http-method> 
    </web-resource-collection> 
    <user-data-constraint> 
     <transport-guarantee>...</transport-guarantee> 
    </user-data-constraint> 
</security-constraint> 

Вы должны либо удалить http-method скобки так будет сопоставьте все методы для этого url-pattern или создайте второй, если вы хотите установить для него различные ограничения безопасности без каких-либо http-method скобок.

Например, если вы хотите защитить с помощью SSL /bg/c/portal/protected конечной точки для POST и GET методов, но и для других не нужно, что то вы должны создать конфиг так:

<security-constraint> 
    <web-resource-collection> 
     <url-pattern>/bg/c/portal/protected</url-pattern> 
     <http-method>POST</http-method> 
     <http-method>GET</http-method> 
    </web-resource-collection> 
    <user-data-constraint> 
     <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
    </user-data-constraint> 
</security-constraint> 
<security-constraint> 
    <web-resource-collection> 
     <url-pattern>/bg/c/portal/protected</url-pattern> 
    </web-resource-collection> 
    <user-data-constraint> 
     <transport-guarantee>NONE</transport-guarantee> 
    </user-data-constraint> 
</security-constraint> 

Как вы видите, теперь все методы для этого шаблона охвачены, поэтому никакая ошибка не будет выбрана.