Строгие ограничения безопасности при запуске tomcat 8 с liferay

Я получаю следующее серьезное сообщение, в то время как 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.

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


person abhineet    schedule 03.09.2015    source источник
comment
Смотрите также этот связан вопрос.   -  person Pixelstix    schedule 14.06.2017


Ответы (1)


Это означает, что в 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>

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

person Kaszaq    schedule 08.10.2015