mr/src/itest/java/org/elasticsearch/hadoop/rest/commonshttp/auth/spnego/AbstractSpnegoAuthSchemeTest.java [75:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Configuration configuration = new Configuration();
        SecurityUtil.setAuthenticationMethod(UserGroupInformation.AuthenticationMethod.KERBEROS, configuration);
        UserGroupInformation.setConfiguration(configuration);

        // Login as Client and Execute Test
        UserGroupInformation client = UserGroupInformation.loginUserFromKeytabAndReturnUGI(KerberosSuite.PRINCIPAL_CLIENT, KEYTAB_FILE.getAbsolutePath());

        client.doAs(new PrivilegedExceptionAction<Void>() {
            @Override
            public Void run() throws Exception {
                HttpParams params = new HttpClientParams();

                // Order auth schemes
                EsHadoopAuthPolicies.registerAuthSchemes();
                List<String> authPreferences = new ArrayList<String>();
                authPreferences.add(EsHadoopAuthPolicies.NEGOTIATE);
                params.setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPreferences);

                AuthChallengeProcessor authChallengeProcessor = new AuthChallengeProcessor(params);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mr/src/itest/java/org/elasticsearch/hadoop/rest/commonshttp/auth/spnego/AbstractSpnegoAuthSchemeTest.java [204:222]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Configuration configuration = new Configuration();
        SecurityUtil.setAuthenticationMethod(UserGroupInformation.AuthenticationMethod.KERBEROS, configuration);
        UserGroupInformation.setConfiguration(configuration);

        // Login as Client and Execute Test
        UserGroupInformation client = UserGroupInformation.loginUserFromKeytabAndReturnUGI(KerberosSuite.PRINCIPAL_CLIENT, KEYTAB_FILE.getAbsolutePath());

        client.doAs(new PrivilegedExceptionAction<Void>() {
            @Override
            public Void run() throws Exception {
                HttpParams params = new HttpClientParams();

                // Order auth schemes
                EsHadoopAuthPolicies.registerAuthSchemes();
                List<String> authPreferences = new ArrayList<String>();
                authPreferences.add(EsHadoopAuthPolicies.NEGOTIATE);
                params.setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPreferences);

                AuthChallengeProcessor authChallengeProcessor = new AuthChallengeProcessor(params);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



