Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-2438

Legacy Kerberos for management interface returns 500 instead of 401

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 3.0.0.Beta12
    • None
    • Security
    • None
    • Hide

      Tested scenario https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/how-to-set-up-sso-with-kerberos/#configure-krb-management-interfaces

      With difference that Kerberos is configured wrongly, e.g. in way there is provided wrong principal or wrong for host attribute.

                  <security-realm name="NotSuitableKeyTab">
                      <server-identities>
                          <kerberos>
                              <keytab principal="HTTP/wronghost@JBOSS.ORG" path="krb-http.keytab" for-hosts="wronghost"/>
                              <keytab principal="HTTP/wronghost2@JBOSS.ORG" path="krb-http.keytab" for-hosts="wronghost2"/>
                          </kerberos>
                      </server-identities>
                      <authentication>
                          <kerberos/>
                      </authentication>
                  </security-realm>
      

      2. On first access to http://localhost:9990/console server responses with http code 500 instead of expected 401.

      Show
      Tested scenario https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/version-7.0/how-to-set-up-sso-with-kerberos/#configure-krb-management-interfaces With difference that Kerberos is configured wrongly, e.g. in way there is provided wrong principal or wrong for host attribute. <security-realm name= "NotSuitableKeyTab" > <server-identities> <kerberos> <keytab principal= "HTTP/wronghost@JBOSS.ORG" path= "krb-http.keytab" for -hosts= "wronghost" /> <keytab principal= "HTTP/wronghost2@JBOSS.ORG" path= "krb-http.keytab" for -hosts= "wronghost2" /> </kerberos> </server-identities> <authentication> <kerberos/> </authentication> </security-realm> 2. On first access to http://localhost:9990/console server responses with http code 500 instead of expected 401.

      On first access server should response with 401 http code. Subsequent response could be 500, as it express properly server is misconfigured. In EAP 7.0 it was 403, that is not ideal as 403 mean user is authenticated but has not proper roles, which is not true in this case.

      Also some ERROR log message would be helpful for administrators to find cause of problem. Now there are just TRACE level messages

      server.log
      07:40:04,134 TRACE [org.jboss.as.domain.management.security] (management task-6) No mapping for name 'http/localhost.localdomain' to KeytabService, attempting to use host only match.
      07:40:04,135 TRACE [org.jboss.as.domain.management.security] (management task-6) No mapping for host 'localhost.localdomain' to KeytabService, attempting to use default.
      07:40:04,135 TRACE [org.jboss.as.domain.management.security] (management task-6) No KeytabService available for host 'localhost.localdomain' unable to return SubjectIdentity.
      

              darran.lofthouse@redhat.com Darran Lofthouse
              mchoma@redhat.com Martin Choma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: