Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11912

Empty configuration in ServiceUserMapperImpl's Required Principal/User validators results in 503

Details

    Description

      1) In webconsole configuration manager, open Apache Sling Service User Mapper Serviceorg.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl
      2) Before making any change the configuration is:

      :org.apache.felix.configadmin.revision:=L"1"
      require.validation=B"true"
      service.pid="org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl"
      user.enable.default.mapping=B"false"
      

      3) Without changing the configuration click on save, the configuration becomes:

      :org.apache.felix.configadmin.revision:=L"8"
      require.validation=B"true"
      required.principal.validators=[ \
        "", \
        ]
      required.user.validators=[ \
        "", \
        ]
      service.pid="org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl"
      user.default=""
      user.enable.default.mapping=B"false"
      

      i.e required.principal.validators and required.user.validators have an empty value and due to this all sling requests return

      "HTTP ERROR 503 ServletResolver service missing, cannot service requests".
      

      This persistence of empty configuration seems to be behaviour of felix.webconsole. But IMO sling requests should not fail due to empty values.

      (The above scenario was reproduced in an AEM instance)

      Attachments

        Issue Links

          Activity

            kwin Konrad Windszus added a comment - - edited

            This sounds like a bug in the Felix web console. IMHO empty values are not reasonable to support here. sagarmiglani Can you propose a fix for https://github.com/apache/felix-dev/blob/master/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java instead?

            kwin Konrad Windszus added a comment - - edited This sounds like a bug in the Felix web console. IMHO empty values are not reasonable to support here. sagarmiglani Can you propose a fix for https://github.com/apache/felix-dev/blob/master/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java instead?

            while I agree that this is a bug in the webconsole, I think Sling could be more lenient and ignore those empty values (in addition to fixing the bug in the webconsole)

            cziegeler Carsten Ziegeler added a comment - while I agree that this is a bug in the webconsole, I think Sling could be more lenient and ignore those empty values (in addition to fixing the bug in the webconsole)
            cziegeler Carsten Ziegeler added a comment - Updated PR https://github.com/apache/sling-org-apache-sling-serviceusermapper/pull/8 got merged

            People

              sagarmiglani Sagar Miglani
              sagarmiglani Sagar Miglani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: