Uploaded image for project: 'Identity Provider'
  1. Identity Provider
  2. IDP-1621

web.xml: authn-constraint is wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.1.0
    • Component/s: Configuration
    • Labels:
      None
    • Environment:

      Centos 8

      OpenJDK 11

      Wildfly 20 (undertow)

    • Servlet Container:
      Other

      Description

       

      The security-constraint in the web.xml seems to contain an invalid tag:

       

          <!-- Disallow other methods by using an empty auth-constraint. -->
          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>Non-API Content</web-resource-name>
                  <url-pattern>/*</url-pattern>
                  <http-method-omission>GET</http-method-omission>
                  <http-method-omission>HEAD</http-method-omission>
                  <http-method-omission>OPTIONS</http-method-omission>
                  <http-method-omission>POST</http-method-omission>
              </web-resource-collection>
              <authn-constraint/>
          </security-constraint>
      

      According to the schema (http://java.sun.com/xml/ns/javaee/web-common_3_0.xsd) it should be auth-constraint (without the "n").

       

      I noticed it while trying to make it run on wildfly/undertow. Which is not supported, I know. But I guess that jetty and tomcat might just ignore the whole constraint (have not tested that). So I thought you might want to know.

       

      Wildfly is saying:

      {{}}{{[root@vzd-test-app1 ~]# cat /opt/wildfly_base/deployments/login.war.failed }}
      {{{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"login.war\".PARSE" => "WFLYSRV0153: Failed to process phase PARSE of deployment \"login.war\" }}
      {{ Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYUT0027: Failed to parse XML descriptor \"/content/login.war/WEB-INF/web.xml\" at [195,5]}}
      {{ Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[195,5]}}
      Message: Unexpected element '{http://java.sun.com/xml/ns/javaee}authn-constraint' encountered" }}

        Attachments

          Activity

            People

            Assignee:
            cantor.2@osu.edu Scott Cantor
            Reporter:
            rnf3t5gm5dhhsr0aulzvjsung7a=@https://lmuidp.lrz.de/idp/shibboleth rnf3t5gm5dhhsr0aulzvjsung7a=@https://lmuidp.lrz.de/idp/shibboleth
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: