HoustonPutman commented on code in PR #1994:
URL: https://github.com/apache/solr/pull/1994#discussion_r1408013410


##########
solr/modules/aws-secret-provider/src/java/org/apache/solr/secret/zk/AWSSecretManagerCredentialsInjector.java:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.secret.zk;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.lang.invoke.MethodHandles;
+import java.util.Collections;
+import java.util.List;
+import org.apache.solr.common.cloud.ZkCredentialsInjector;
+import org.apache.solr.common.util.StrUtils;
+import org.apache.solr.util.SolrJacksonAnnotationInspector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
+import 
software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder;
+import 
software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
+import 
software.amazon.awssdk.services.secretsmanager.model.SecretsManagerException;
+
+public class AWSSecretManagerCredentialsInjector implements 
ZkCredentialsInjector {
+  public static final String SECRET_CREDENTIAL_PROVIDER_SECRET_NAME_VM_PARAM =

Review Comment:
   I'm not sure that these names make sense to me. They are not consistent with 
each other.
   
   - `solr.zk.credentials.secret`
   - `solrZkCredentials`
   - `solr.zk.credentials.region`
   
   I think these work better.



##########
solr/server/scripts/cloud-scripts/zkcli.sh:
##########
@@ -23,6 +38,10 @@ solr_home="$sdir/../../solr"
 #...
 #   -DzkDigestCredentialsFile=/path/to/zkDigestCredentialsFile.properties
 #...
+# see the Solr documentation for the other available options
+
+# SOLR_MODULES=aws-secret-provider
+
 PATH=$JAVA_HOME/bin:$PATH $JVM $SOLR_ZK_CREDS_AND_ACLS $ZKCLI_JVM_FLAGS 
-Dlog4j.configurationFile=$log4j_config -Dsolr.home=$solr_home \
--classpath 
"$sdir/../../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../../lib/ext/*:$sdir/../../lib/*"
 org.apache.solr.cloud.ZkCLI ${1+"$@"}
+-Dsolr.install.dir=$SOLR_DIR  -Dsolr.modules=$SOLR_MODULES -classpath 
"$sdir/../../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../../lib/ext/*:$sdir/../../lib/*"
 org.apache.solr.cloud.ZkCLI ${1+"$@"}

Review Comment:
   SOLR_MODULES might not be provided, so probably want to use 
`"${SOLR_MODULES:-}"`
   
   Also $SOLR_DIR needs to be in quotes.



##########
solr/server/scripts/cloud-scripts/zkcli.sh:
##########
@@ -13,6 +13,21 @@ log4j_config="file:$sdir/../../resources/log4j2-console.xml"
 
 solr_home="$sdir/../../solr"
 
+# Get solr dir with fullpath

Review Comment:
   Are the Solr Modules auto-added with the `bin/solr <tool>` command?
   
   Also are you sure that `ZKCLI.java` and `SolrCLI.java` use the 
`solr.modules` option? I thought that was enabled through the solr.xml, which 
those tools wouldn't know about.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to