[
https://issues.apache.org/jira/browse/DRILL-8386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17676227#comment-17676227
]
ASF GitHub Bot commented on DRILL-8386:
---------------------------------------
jnturton commented on code in PR #2738:
URL: https://github.com/apache/drill/pull/2738#discussion_r1068257539
##########
contrib/storage-cassandra/src/test/java/org/apache/drill/exec/store/cassandra/CassandraUserTranslationTest.java:
##########
@@ -0,0 +1,103 @@
+/*
+ * 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.store.cassandra;
+
+import org.apache.drill.categories.SlowTest;
+import org.apache.drill.common.config.DrillProperties;
+import org.apache.drill.common.exceptions.UserRemoteException;
+import org.apache.drill.exec.physical.rowSet.RowSet;
+import org.apache.drill.test.ClientFixture;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import static
org.apache.drill.exec.rpc.user.security.testing.UserAuthenticatorTestImpl.ADMIN_USER;
+import static
org.apache.drill.exec.rpc.user.security.testing.UserAuthenticatorTestImpl.ADMIN_USER_PASSWORD;
+import static
org.apache.drill.exec.rpc.user.security.testing.UserAuthenticatorTestImpl.TEST_USER_1;
+import static
org.apache.drill.exec.rpc.user.security.testing.UserAuthenticatorTestImpl.TEST_USER_1_PASSWORD;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+
+@Category({SlowTest.class})
+public class CassandraUserTranslationTest extends BaseCassandraTest {
+ @Test
+ public void testInfoSchemaQueryWithMissingCredentials() throws Exception {
+ // This test validates that the correct credentials are sent down to
Cassandra.
+ // This user should not see the ut_cassandra because they do not have
valid credentials.
+ ClientFixture client = cluster
+ .clientBuilder()
+ .property(DrillProperties.USER, ADMIN_USER)
+ .property(DrillProperties.PASSWORD, ADMIN_USER_PASSWORD)
+ .build();
+
+ String sql = "SHOW DATABASES WHERE schema_name LIKE '%cassandra%'";
+
+ RowSet results = client.queryBuilder().sql(sql).rowSet();
+ assertEquals(1, results.rowCount());
+ results.clear();
+ }
+
+ @Test
+ public void testInfoSchemaQueryWithValidCredentials() throws Exception {
+ // This test validates that the cassandra connection with user translation
appears whne the user is
Review Comment:
```suggestion
// This test validates that the cassandra connection with user
translation appears when the user is
```
##########
contrib/storage-splunk/README.md:
##########
@@ -42,6 +42,10 @@ Sometimes Splunk has issue in connection to it:
https://github.com/splunk/splunk-sdk-java/issues/62 <br>
To bypass it by Drill please specify "reconnectRetries": 3. It allows you to
retry the connection several times.
+### User Translation
+The Splunk plugin supports user translation. Simply set the `authMode`
parameter to `USER_TRANSLATION` and use either the plain or vault credential
provider for credentials.
Review Comment:
Do you think I should make authMode values case insensitive before 1.21 is
released? USER_TRANSLATION looks odd compared to other Drill config values and
is only in caps due to the coincidence that the Java Enum names are in caps.
> Add Support for User Translation for Cassandra
> ----------------------------------------------
>
> Key: DRILL-8386
> URL: https://issues.apache.org/jira/browse/DRILL-8386
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - Cassandra
> Affects Versions: 1.20.3
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Major
> Fix For: 1.21.0
>
>
> Adds support for user translation to the Cassandra plugin.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)