[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16062180#comment-16062180 ] ASF GitHub Bot commented on DRILL-5568: --- Github user asfgit closed the pull request at: https://github.com/apache/drill/pull/849 > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > Labels: ready-to-commit > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054924#comment-16054924 ] ASF GitHub Bot commented on DRILL-5568: --- Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122847120 --- Diff: exec/jdbc-all/pom.xml --- @@ -483,6 +518,269 @@ + default --- End diff -- Yes didn't found any other way to set the default value. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054921#comment-16054921 ] ASF GitHub Bot commented on DRILL-5568: --- Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122847012 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/SecurityConfiguration.java --- @@ -0,0 +1,44 @@ +/* + * 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.drill.exec.rpc.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + + +public class SecurityConfiguration extends Configuration { + //private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SecurityConfiguration.class); + + public SecurityConfiguration() { +super(); +updateGroupMapping(); + } + + /** + * Update the Group Mapping class name to add namespace prefix retrieved from System Property. This is needed since + * in drill-jdbc-all jar we are packaging hadoop dependencies under that namespace. This will help application + * using this jar as driver to avoid conflict with it's own hadoop dependency if any. + */ + private void updateGroupMapping() { +final String originalClassName = get(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING); +final String profilePrefix = System.getProperty("namespacePrefix"); +final String updatedClassName = (profilePrefix != null) ? (profilePrefix + originalClassName) +: originalClassName; +set(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING, updatedClassName); --- End diff -- Changed to use` Strings.isNullOrEmpty`. I am already trimming the value of prefix befire setting it inside system property. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054922#comment-16054922 ] ASF GitHub Bot commented on DRILL-5568: --- Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122847079 --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillFactory.java --- @@ -37,6 +38,24 @@ protected final int major; protected final int minor; + static { +Properties prop = new Properties(); --- End diff -- Moved it to SecurityConfiguration.java. All unit tests are also passing and the application is also running fine. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054918#comment-16054918 ] ASF GitHub Bot commented on DRILL-5568: --- Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122846916 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/SecurityConfiguration.java --- @@ -0,0 +1,44 @@ +/* + * 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.drill.exec.rpc.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + + +public class SecurityConfiguration extends Configuration { + //private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SecurityConfiguration.class); + + public SecurityConfiguration() { +super(); +updateGroupMapping(); + } + + /** + * Update the Group Mapping class name to add namespace prefix retrieved from System Property. This is needed since + * in drill-jdbc-all jar we are packaging hadoop dependencies under that namespace. This will help application + * using this jar as driver to avoid conflict with it's own hadoop dependency if any. --- End diff -- Fixed > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054919#comment-16054919 ] ASF GitHub Bot commented on DRILL-5568: --- Github user sohami commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122846935 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/SecurityConfiguration.java --- @@ -0,0 +1,44 @@ +/* + * 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.drill.exec.rpc.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + + +public class SecurityConfiguration extends Configuration { + //private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SecurityConfiguration.class); + + public SecurityConfiguration() { +super(); +updateGroupMapping(); + } + + /** + * Update the Group Mapping class name to add namespace prefix retrieved from System Property. This is needed since + * in drill-jdbc-all jar we are packaging hadoop dependencies under that namespace. This will help application + * using this jar as driver to avoid conflict with it's own hadoop dependency if any. + */ + private void updateGroupMapping() { +final String originalClassName = get(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING); +final String profilePrefix = System.getProperty("namespacePrefix"); --- End diff -- Updated > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054624#comment-16054624 ] ASF GitHub Bot commented on DRILL-5568: --- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122799104 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/SecurityConfiguration.java --- @@ -0,0 +1,44 @@ +/* + * 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.drill.exec.rpc.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + + +public class SecurityConfiguration extends Configuration { + //private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SecurityConfiguration.class); + + public SecurityConfiguration() { +super(); +updateGroupMapping(); + } + + /** + * Update the Group Mapping class name to add namespace prefix retrieved from System Property. This is needed since + * in drill-jdbc-all jar we are packaging hadoop dependencies under that namespace. This will help application + * using this jar as driver to avoid conflict with it's own hadoop dependency if any. --- End diff -- Maybe add a comment that the property is needed only when Hadoop classes are relocated. In a normal build, the property is not set and Hadoop classes are used normally. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054625#comment-16054625 ] ASF GitHub Bot commented on DRILL-5568: --- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122797316 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/SecurityConfiguration.java --- @@ -0,0 +1,44 @@ +/* + * 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.drill.exec.rpc.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + + +public class SecurityConfiguration extends Configuration { + //private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SecurityConfiguration.class); + + public SecurityConfiguration() { +super(); +updateGroupMapping(); + } + + /** + * Update the Group Mapping class name to add namespace prefix retrieved from System Property. This is needed since + * in drill-jdbc-all jar we are packaging hadoop dependencies under that namespace. This will help application + * using this jar as driver to avoid conflict with it's own hadoop dependency if any. + */ + private void updateGroupMapping() { +final String originalClassName = get(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING); +final String profilePrefix = System.getProperty("namespacePrefix"); +final String updatedClassName = (profilePrefix != null) ? (profilePrefix + originalClassName) +: originalClassName; +set(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING, updatedClassName); --- End diff -- ``` if (! Strings.isNullOrEmpty(profilePrefix)) { set(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING, profilePrefix.trim() + originalClassName); } ``` ? Handles the case where the prefix is missing, or exists, but is empty. Or, perhaps I'm being overly cautions about stray spaces, empty properties, and not changing properties when not needed... > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054622#comment-16054622 ] ASF GitHub Bot commented on DRILL-5568: --- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122800022 --- Diff: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillFactory.java --- @@ -37,6 +38,24 @@ protected final int major; protected final int minor; + static { +Properties prop = new Properties(); --- End diff -- Actually, I think this code can be moved into `SecurityConfiguration.java`. Java handles resources by looking in the class path, which is formed from all jars. A long as the resource file is somewhere in the top level of some jar, this code will find it. So, despite what I said in person the other day, the code need not be here to work. That said, the property file DOES have to be in the JDBC-all package to avoid having multiple files of the same name in the class path. Please try it out to see if the code works in `SecurityConfiguration.java`. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054626#comment-16054626 ] ASF GitHub Bot commented on DRILL-5568: --- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122796433 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/SecurityConfiguration.java --- @@ -0,0 +1,44 @@ +/* + * 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.drill.exec.rpc.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + + +public class SecurityConfiguration extends Configuration { + //private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SecurityConfiguration.class); + + public SecurityConfiguration() { +super(); +updateGroupMapping(); + } + + /** + * Update the Group Mapping class name to add namespace prefix retrieved from System Property. This is needed since + * in drill-jdbc-all jar we are packaging hadoop dependencies under that namespace. This will help application + * using this jar as driver to avoid conflict with it's own hadoop dependency if any. + */ + private void updateGroupMapping() { +final String originalClassName = get(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING); +final String profilePrefix = System.getProperty("namespacePrefix"); --- End diff -- Would recommend a name that is a bit less generic. Maybe "drill.security.namespacePrefix"? > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16054623#comment-16054623 ] ASF GitHub Bot commented on DRILL-5568: --- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/849#discussion_r122799235 --- Diff: exec/jdbc-all/pom.xml --- @@ -483,6 +518,269 @@ + default --- End diff -- Not real happy about the amount of redundancy. But, I suppose Maven offers no alternative... > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16047337#comment-16047337 ] Sorabh Hamirwasia commented on DRILL-5568: -- The bloat was coming from dependency with mapr distribution. Updated the PR to exclude those dependencies in pom.xml. Now the size is back to ~29MB. Verified that the pre-commit test's are all running fine too. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16046159#comment-16046159 ] Parth Chandra commented on DRILL-5568: -- In the functional test framework build, this change is causing the size of the jdbc-all jar file to bloat and thebuild fails with the error: drill-jdbc-all-1.11.0-SNAPSHOT.jar size (78517001) too large. Max. is 2900 > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > Labels: ready-to-commit > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16039936#comment-16039936 ] ASF GitHub Bot commented on DRILL-5568: --- Github user sohami commented on the issue: https://github.com/apache/drill/pull/849 + @paul-rogers - To help review this PR in case JIRA didn't sent out the email. > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (DRILL-5568) Include hadoop-common jars inside drill-jdbc-all.jar
[ https://issues.apache.org/jira/browse/DRILL-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16037583#comment-16037583 ] ASF GitHub Bot commented on DRILL-5568: --- GitHub user sohami opened a pull request: https://github.com/apache/drill/pull/849 DRILL-5568: Include hadoop-common jars inside drill-jdbc-all.jar More details on this PR is in [JIRA](https://issues.apache.org/jira/browse/DRILL-5568) You can merge this pull request into a Git repository by running: $ git pull https://github.com/sohami/drill DRILL-5568 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/849.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #849 commit e84ce5bb6317e7a8caa50c7ffc85dfc416616596 Author: Sorabh HamirwasiaDate: 2017-06-05T20:45:27Z DRILL-5568: Include hadoop-common jars inside drill-jdbc-all.jar > Include hadoop-common jars inside drill-jdbc-all.jar > > > Key: DRILL-5568 > URL: https://issues.apache.org/jira/browse/DRILL-5568 > Project: Apache Drill > Issue Type: Bug > Components: Client - JDBC >Reporter: Sorabh Hamirwasia >Assignee: Sorabh Hamirwasia > > With Sasl support in 1.10 the authentication using username/password was > moved to Plain Mechanism of Sasl Framework. There are couple of Hadoop > classes like Configuration.java and UserGroupInformation.java defined in > hadoop-common package which were used in DrillClient for security mechanisms > like Plain/Kerberos mechanisms. Due to this we need to add hadoop dependency > inside _drill-jdbc-all.jar_ Without it the application using this driver > will fail to connect to Drill with authentication enabled. > Today this jar (which is JDBC driver for Drill) already has lots of other > dependencies which DrillClient relies on like Netty, etc. But the way we add > these dependencies are under *oadd* namespace so that the application using > this driver won't end up in conflict with it's own version of same > dependencies. As part of this JIRA it will include hadoop-common dependencies > under same namespace. This will allow an application to connect to Drill > using this driver with security enabled. -- This message was sent by Atlassian JIRA (v6.3.15#6346)