Bug 1172180 - Kerberos authentication into Management Console does not select correct keytab element with IPv6 address
Summary: Kerberos authentication into Management Console does not select correct keyta...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Tomas Hofman
QA Contact: Ondrej Lukas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-09 14:29 UTC by Ondrej Lukas
Modified: 2015-08-27 09:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-27 09:03:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1172144 0 unspecified CLOSED KerberosHttpInterfaceTestCase fails on IPv6 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker EAP6-253 0 Major Closed Kerberos auth for management over HTTP/HTTPS 2016-05-04 07:52:45 UTC
Red Hat Issue Tracker UNDERTOW-506 0 Major Resolved GSSAPIAuthenticationMechanism doesn't parse IPv6 address correctly 2016-05-04 07:52:45 UTC

Internal Links: 1172144

Description Ondrej Lukas 2014-12-09 14:29:26 UTC
There are three options how to select appropriate keytab element. Two of them are broken when IPv6 address is used:

1) Compare the host name against the host extracted from the request
Hostname is not correctly extracted from http request for Kerberos authentication into Management Console for IPv6 address. For that reason in case when following keytab is set in server configuration, then it is never taken into account in org.jboss.as.domain.http.server.security.SpnegoAuthenticator:
<keytab principal="HTTP/[2620:52:0:105f::ffff:1a]@JBOSS.ORG" path="${KEYTAB_PATH}"/>

Take a look at getHostName method of SpnegoAuthenticator [1]. It expects only IPv4 address. There may be another places where only IPv4 is expected.

2) From for-host attribute
It also is not taken into account when IPv6 address is set in for-hosts attribute:
<keytab principal="HTTP/[2620:52:0:105f::ffff:1a]@JBOSS.ORG" path="${KEYTAB_PATH}" for-hosts="[2620:52:0:105f::ffff:1a]"/>

Log output for this case:
TRACE [org.jboss.as.domain.management.security] (HttpManagementService-threads - 1) No mapping for name 'HTTP/[2620' to KeytabService, attempting to use host only match.
TRACE [org.jboss.as.domain.management.security] (HttpManagementService-threads - 1) No mapping for host '[2620' to KeytabService, attempting to use default.
TRACE [org.jboss.as.domain.management.security] (HttpManagementService-threads - 1) No KeytabService available for host '[2620' unable to return SubjectIdentity.
TRACE [org.jboss.as.domain.http.api] (HttpManagementService-threads - 1) No Subject available for host '[2620'

3) Set for-hosts to "*"
It works fine when for-hosts attribute is set to "*". It means that Kerberos authentication into Management Console with IPv6 works, but selecting appropriate keytab element with IPv6 address is broken.


[1] https://github.com/jbossas/jboss-eap/blob/6.x/domain-http/interface/src/main/java/org/jboss/as/domain/http/server/security/SpnegoAuthenticator.java#L183

Comment 1 JBoss JIRA Server 2015-04-28 15:05:49 UTC
John Doyle <jdoyle> updated the status of jira EAP6-253 to Closed

Comment 2 Tomas Hofman 2015-07-29 10:37:51 UTC
Created upstream issue.

Comment 3 Tomas Hofman 2015-07-29 12:45:51 UTC
Note that there is already test case for this. Can be run with following (replace node0 value with your own IPv6 address):

cd testsuite/integration/manualmode
mvn install -Dtest=KerberosHttpInterfaceTestCase -Dnode0=2620:52:0:2804:56ee:75ff:fe2d:980f -Dipv6

Comment 5 Tomas Hofman 2015-08-03 07:46:55 UTC
I'm not backporting to EAP, since there is no customer case.


Note You need to log in before you can comment on or make changes to this bug.