RE: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop authentication plugins, GenericHadoopAuthPlugin and ConfigurableInternodeAuthHadoopPlugin

2016-12-19 Thread Uwe Schindler
Hi,

 

Yeah that’s a similar test setup. Windows is also detected with 
assumeFalse(Constants.WINDOWS), which seems to break for this test.

 

Uwe

 

-

Uwe Schindler

Achterdiek 19, D-28357 Bremen

http://www.thetaphi.de <http://www.thetaphi.de/> 

eMail: u...@thetaphi.de

 

From: Kevin Risden [mailto:compuwizard...@gmail.com] 
Sent: Monday, December 19, 2016 7:39 PM
To: dev@lucene.apache.org
Subject: Re: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop authentication 
plugins, GenericHadoopAuthPlugin and ConfigurableInternodeAuthHadoopPlugin

 

Failed on Java 8 too.

 

Build:  <https://jenkins.thetaphi.de/job/Lucene-Solr-master-Windows/6296/> 
https://jenkins.thetaphi.de/job/Lucene-Solr-master-Windows/6296/
Java: 32bit/jdk1.8.0_112 -server -XX:+UseG1GC

3 tests failed.
FAILED:  junit.framework.TestSuite.org <http://junit.framework.TestSuite.org> 
.apache.solr.security.hadoop.TestSolrCloudWithHadoopAuthPlugin




Kevin Risden

 

On Mon, Dec 19, 2016 at 12:36 PM, Uwe Schindler <u...@thetaphi.de 
<mailto:u...@thetaphi.de> > wrote:

Hi,

Something went wrong with the Java 9 assume in 
TestSolrCloudWithHadoopAuthPlugin. It should just ignore the test, but for some 
reason it fails the test. See recent Jenkins failures!

Uwe

-
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de <mailto:u...@thetaphi.de> 

> -Original Message-
> From: is...@apache.org <mailto:is...@apache.org>  [mailto:is...@apache.org 
> <mailto:is...@apache.org> ]
> Sent: Monday, December 19, 2016 4:16 PM
> To: comm...@lucene.apache.org <mailto:comm...@lucene.apache.org> 
> Subject: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop authentication
> plugins, GenericHadoopAuthPlugin and
> ConfigurableInternodeAuthHadoopPlugin
>

> Repository: lucene-solr
> Updated Branches:
>   refs/heads/master 321c6f090 -> a1a8b2864
>
>
> http://git-wip-us.apache.org/repos/asf/lucene-
> solr/blob/a1a8b286/solr/core/src/test/org/apache/solr/security/hadoop/Te
> stImpersonationWithHadoopAuth.java
> --
> diff --git
> a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWi
> thHadoopAuth.java
> b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationW
> ithHadoopAuth.java
> new file mode 100644
> index 000..ed8397b
> --- /dev/null
> +++
> b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationW
> ithHadoopAuth.java
> @@ -0,0 +1,215 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.solr.security.hadoop;
> +
> +import static
> org.apache.solr.security.HttpParamDelegationTokenPlugin.USER_PARAM;
> +import static org.apache.solr.security.hadoop.ImpersonationUtil.*;
> +
> +import java.net.InetAddress;
> +import java.nio.charset.Charset;
> +import java.nio.file.Files;
> +import java.nio.file.Path;
> +import java.util.HashMap;
> +import java.util.Map;
> +
> +import org.apache.lucene.util.Constants;
> +import org.apache.solr.client.solrj.SolrClient;
> +import org.apache.solr.client.solrj.embedded.JettySolrRunner;
> +import org.apache.solr.client.solrj.impl.HttpSolrClient;
> +import org.apache.solr.client.solrj.request.CollectionAdminRequest;
> +import org.apache.solr.cloud.SolrCloudTestCase;
> +import org.apache.solr.common.params.ModifiableSolrParams;
> +import org.apache.solr.common.util.Utils;
> +import org.apache.solr.security.HadoopAuthPlugin;
> +import org.apache.solr.servlet.SolrRequestParsers;
> +import org.junit.AfterClass;
> +import org.junit.BeforeClass;
> +import org.junit.Test;
> +
> +public class TestImpersonationWithHadoopAuth  extends
> SolrCloudTestCase {
> +  protected static final int NUM_SERVERS = 2;
> +  private static final boolean defaultAddRequestHeadersToContext =
> +  SolrRequestParsers.DEFAULT.isAddRequestHeadersToContext();
> +

Re: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop authentication plugins, GenericHadoopAuthPlugin and ConfigurableInternodeAuthHadoopPlugin

2016-12-19 Thread Kevin Risden
Failed on Java 8 too.

Build: https://jenkins.thetaphi.de/job/Lucene-Solr-master-Windows/6296/
Java: 32bit/jdk1.8.0_112 -server -XX:+UseG1GC

3 tests failed.
FAILED:  junit.framework.TestSuite.org.apache.solr.security.hadoop.
TestSolrCloudWithHadoopAuthPlugin

Kevin Risden

On Mon, Dec 19, 2016 at 12:36 PM, Uwe Schindler  wrote:

> Hi,
>
> Something went wrong with the Java 9 assume in
> TestSolrCloudWithHadoopAuthPlugin. It should just ignore the test, but
> for some reason it fails the test. See recent Jenkins failures!
>
> Uwe
>
> -
> Uwe Schindler
> Achterdiek 19, D-28357 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
>
> > -Original Message-
> > From: is...@apache.org [mailto:is...@apache.org]
> > Sent: Monday, December 19, 2016 4:16 PM
> > To: comm...@lucene.apache.org
> > Subject: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop
> authentication
> > plugins, GenericHadoopAuthPlugin and
> > ConfigurableInternodeAuthHadoopPlugin
> >
> > Repository: lucene-solr
> > Updated Branches:
> >   refs/heads/master 321c6f090 -> a1a8b2864
> >
> >
> > http://git-wip-us.apache.org/repos/asf/lucene-
> > solr/blob/a1a8b286/solr/core/src/test/org/apache/solr/security/hadoop/Te
> > stImpersonationWithHadoopAuth.java
> > --
> > diff --git
> > a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWi
> > thHadoopAuth.java
> > b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationW
> > ithHadoopAuth.java
> > new file mode 100644
> > index 000..ed8397b
> > --- /dev/null
> > +++
> > b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationW
> > ithHadoopAuth.java
> > @@ -0,0 +1,215 @@
> > +/*
> > + * Licensed to the Apache Software Foundation (ASF) under one or more
> > + * contributor license agreements.  See the NOTICE file distributed with
> > + * this work for additional information regarding copyright ownership.
> > + * The ASF licenses this file to You under the Apache License, Version
> 2.0
> > + * (the "License"); you may not use this file except in compliance with
> > + * the License.  You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing, software
> > + * distributed under the License is distributed on an "AS IS" BASIS,
> > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> > implied.
> > + * See the License for the specific language governing permissions and
> > + * limitations under the License.
> > + */
> > +package org.apache.solr.security.hadoop;
> > +
> > +import static
> > org.apache.solr.security.HttpParamDelegationTokenPlugin.USER_PARAM;
> > +import static org.apache.solr.security.hadoop.ImpersonationUtil.*;
> > +
> > +import java.net.InetAddress;
> > +import java.nio.charset.Charset;
> > +import java.nio.file.Files;
> > +import java.nio.file.Path;
> > +import java.util.HashMap;
> > +import java.util.Map;
> > +
> > +import org.apache.lucene.util.Constants;
> > +import org.apache.solr.client.solrj.SolrClient;
> > +import org.apache.solr.client.solrj.embedded.JettySolrRunner;
> > +import org.apache.solr.client.solrj.impl.HttpSolrClient;
> > +import org.apache.solr.client.solrj.request.CollectionAdminRequest;
> > +import org.apache.solr.cloud.SolrCloudTestCase;
> > +import org.apache.solr.common.params.ModifiableSolrParams;
> > +import org.apache.solr.common.util.Utils;
> > +import org.apache.solr.security.HadoopAuthPlugin;
> > +import org.apache.solr.servlet.SolrRequestParsers;
> > +import org.junit.AfterClass;
> > +import org.junit.BeforeClass;
> > +import org.junit.Test;
> > +
> > +public class TestImpersonationWithHadoopAuth  extends
> > SolrCloudTestCase {
> > +  protected static final int NUM_SERVERS = 2;
> > +  private static final boolean defaultAddRequestHeadersToContext =
> > +  SolrRequestParsers.DEFAULT.isAddRequestHeadersToContext();
> > +
> > +  @SuppressWarnings("unchecked")
> > +  @BeforeClass
> > +  public static void setupClass() throws Exception {
> > +assumeFalse("Hadoop does not work on Windows",
> > Constants.WINDOWS);
> > +
> > +InetAddress loopback = InetAddress.getLoopbackAddress();
> > +Path securityJsonPath =
> > TEST_PATH().resolve("security").resolve("hadoop_simple_auth_with_delegat
> > ion.json");
> > +String securityJson = new String(Files.readAllBytes(
> securityJsonPath),
> > Charset.defaultCharset());
> > +
> > +Map securityConfig = (Map > Object>)Utils.fromJSONString(securityJson);
> > +Map authConfig = (Map > Object>)securityConfig.get("authentication");
> > +Map proxyUserConfigs = (Map)
> authConfig
> > +.getOrDefault(HadoopAuthPlugin.PROXY_USER_CONFIGS, new
> > HashMap<>());
> > +proxyUserConfigs.put("proxyuser.noGroups.hosts", "*");
> > +

RE: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop authentication plugins, GenericHadoopAuthPlugin and ConfigurableInternodeAuthHadoopPlugin

2016-12-19 Thread Uwe Schindler
Hi,

Something went wrong with the Java 9 assume in 
TestSolrCloudWithHadoopAuthPlugin. It should just ignore the test, but for some 
reason it fails the test. See recent Jenkins failures!

Uwe

-
Uwe Schindler
Achterdiek 19, D-28357 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de

> -Original Message-
> From: is...@apache.org [mailto:is...@apache.org]
> Sent: Monday, December 19, 2016 4:16 PM
> To: comm...@lucene.apache.org
> Subject: [1/2] lucene-solr:master: SOLR-9513: Generic Hadoop authentication
> plugins, GenericHadoopAuthPlugin and
> ConfigurableInternodeAuthHadoopPlugin
> 
> Repository: lucene-solr
> Updated Branches:
>   refs/heads/master 321c6f090 -> a1a8b2864
> 
> 
> http://git-wip-us.apache.org/repos/asf/lucene-
> solr/blob/a1a8b286/solr/core/src/test/org/apache/solr/security/hadoop/Te
> stImpersonationWithHadoopAuth.java
> --
> diff --git
> a/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationWi
> thHadoopAuth.java
> b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationW
> ithHadoopAuth.java
> new file mode 100644
> index 000..ed8397b
> --- /dev/null
> +++
> b/solr/core/src/test/org/apache/solr/security/hadoop/TestImpersonationW
> ithHadoopAuth.java
> @@ -0,0 +1,215 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one or more
> + * contributor license agreements.  See the NOTICE file distributed with
> + * this work for additional information regarding copyright ownership.
> + * The ASF licenses this file to You under the Apache License, Version 2.0
> + * (the "License"); you may not use this file except in compliance with
> + * the License.  You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +package org.apache.solr.security.hadoop;
> +
> +import static
> org.apache.solr.security.HttpParamDelegationTokenPlugin.USER_PARAM;
> +import static org.apache.solr.security.hadoop.ImpersonationUtil.*;
> +
> +import java.net.InetAddress;
> +import java.nio.charset.Charset;
> +import java.nio.file.Files;
> +import java.nio.file.Path;
> +import java.util.HashMap;
> +import java.util.Map;
> +
> +import org.apache.lucene.util.Constants;
> +import org.apache.solr.client.solrj.SolrClient;
> +import org.apache.solr.client.solrj.embedded.JettySolrRunner;
> +import org.apache.solr.client.solrj.impl.HttpSolrClient;
> +import org.apache.solr.client.solrj.request.CollectionAdminRequest;
> +import org.apache.solr.cloud.SolrCloudTestCase;
> +import org.apache.solr.common.params.ModifiableSolrParams;
> +import org.apache.solr.common.util.Utils;
> +import org.apache.solr.security.HadoopAuthPlugin;
> +import org.apache.solr.servlet.SolrRequestParsers;
> +import org.junit.AfterClass;
> +import org.junit.BeforeClass;
> +import org.junit.Test;
> +
> +public class TestImpersonationWithHadoopAuth  extends
> SolrCloudTestCase {
> +  protected static final int NUM_SERVERS = 2;
> +  private static final boolean defaultAddRequestHeadersToContext =
> +  SolrRequestParsers.DEFAULT.isAddRequestHeadersToContext();
> +
> +  @SuppressWarnings("unchecked")
> +  @BeforeClass
> +  public static void setupClass() throws Exception {
> +assumeFalse("Hadoop does not work on Windows",
> Constants.WINDOWS);
> +
> +InetAddress loopback = InetAddress.getLoopbackAddress();
> +Path securityJsonPath =
> TEST_PATH().resolve("security").resolve("hadoop_simple_auth_with_delegat
> ion.json");
> +String securityJson = new String(Files.readAllBytes(securityJsonPath),
> Charset.defaultCharset());
> +
> +Map securityConfig = (Map Object>)Utils.fromJSONString(securityJson);
> +Map authConfig = (Map Object>)securityConfig.get("authentication");
> +Map proxyUserConfigs = (Map) authConfig
> +.getOrDefault(HadoopAuthPlugin.PROXY_USER_CONFIGS, new
> HashMap<>());
> +proxyUserConfigs.put("proxyuser.noGroups.hosts", "*");
> +proxyUserConfigs.put("proxyuser.anyHostAnyUser.hosts", "*");
> +proxyUserConfigs.put("proxyuser.anyHostAnyUser.groups", "*");
> +proxyUserConfigs.put("proxyuser.wrongHost.hosts", "1.1.1.1.1.1");
> +proxyUserConfigs.put("proxyuser.wrongHost.groups", "*");
> +proxyUserConfigs.put("proxyuser.noHosts.groups", "*");
> +proxyUserConfigs.put("proxyuser.localHostAnyGroup.hosts",
> +loopback.getCanonicalHostName() + "," + loopback.getHostName() + ","
> + loopback.getHostAddress());
> +proxyUserConfigs.put("proxyuser.localHostAnyGroup.groups", "*");
> +