Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9 M1
-
Component/s: {Unused} Authentication and Rights Management
-
Labels:None
-
keywords:patch
-
Similar issues:
XWIKI-7068 Merge custom kerberos authenticator in main trunk XWIKI-3449Authenticated XWiki user name might be incorrect in XMLRPC login XWIKI-4057LDAP authenticator should not insert wiki name in the returned user Principal when it's the current wiki XWIKI-1144LDAP authentication ignores xwiki.authentication.ldap.fields_mapping when getting user principal XWIKI-3342Safer check on the cached authentication XWIKI-1079LDAP Authentication XWIKI-4728Wysiwyg editor special character handling in links XWIKI-1132New App Server trusted authentication service XWIKI-3328 Extend XWIKI-3013 (authenticate only once per session) to basic authentication XWIKI-3401Malformed authentication URL due to encoding of ContextPath
Description
I needed users within our organization to be able to login to XWiki via HTTP Negotiate. I'm sure this is a requirement for other companies as well.
The easiest way IMHO to do this is to have Apache HTTPD do the heavy lifting with mod_auth_kerb. Implementing Java container/Realm HTTP Negotiate would be considerable more work.
After Apache HTTPD has done the kerberos authentication one would expect to be able to simply use Xwiki's AppServerTrustedAuthServiceImpl as authentication implementation class and be done with it. However in Kerberos the user is authenticated as a principal which looks like this username@REALMNAME.TLD (for example: siepkes@EXAMPLE.COM). The @REALMNAME.TLD part makes it impossible to use AppServerTrustedAuthServiceImpl.
I propose we include a simple class called AppServerTrustedKerberosAuthServiceImpl which chops off the @REALMNAME.TLD part of the principal. This works for me with: MIT-Kerberos, Apache 2 HTTP, mod_auth_kerb, mod_jk and Apache Tomcat 5.5.
Theoretically this class should also work with IIS, mod_jk and Apache Tomcat 5.5, making it possible for Active Directory users to automatically login via SSO. I Haven't tested it, but for as far as I can see this shoud work.
As I can see, this patch should work but it doesn't consider old domain notations.
my.domain\user has to be considered too in this case.