You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2018/09/05 17:47:27 UTC

[3/3] lucene-solr:master: SOLR-11690: put command examples in [source] blocks; make NOTE a CAUTION and move up to associated command

SOLR-11690: put command examples in [source] blocks; make NOTE a CAUTION and move up to associated command


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/25650102
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/25650102
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/25650102

Branch: refs/heads/master
Commit: 256501026149a9d15675b3db885cf23b7d442156
Parents: a3aa014
Author: Cassandra Targett <ct...@apache.org>
Authored: Tue Sep 4 20:58:04 2018 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Wed Sep 5 12:47:08 2018 -0500

----------------------------------------------------------------------
 ...store-data-with-the-data-import-handler.adoc | 25 ++++++++++++--------
 1 file changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/25650102/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc b/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
index cdfee7d..d724055 100644
--- a/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
+++ b/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
@@ -143,27 +143,32 @@ http://localhost:8983/solr/dih/dataimport?command=full-import&jdbcurl=jdbc:hsqld
 
 The database password can be encrypted if necessary to avoid plaintext passwords being exposed in unsecured files. To do this, we will replace the password in `data-config.xml` with an encrypted password. We will use the `openssl` tool for the encryption, and the encryption key will be stored in a file which is only readable to the `solr` process. Please follow these steps:
 
-. Create a strong encryption password and store it in a file. Then make sure it is readable only for the `solr` user. Example commands:  
-
-  echo -n "a-secret" > /var/solr/data/dih-encryptionkey
-  chown solr:solr /var/solr/data/dih-encryptionkey
-  chmod 600 /var/solr/data/dih-encryptionkey 
+. Create a strong encryption password and store it in a file. Then make sure it is readable only for the `solr` user. Example commands:
++
+[source,text]
+echo -n "a-secret" > /var/solr/data/dih-encryptionkey
+chown solr:solr /var/solr/data/dih-encryptionkey
+chmod 600 /var/solr/data/dih-encryptionkey
++
+CAUTION: Note that we use the `-n` argument to `echo` to avoid including a newline character at the end of the password. If you use another method to generate the encrypted password, make sure to avoid newlines as well.
 
 . Encrypt the JDBC database password using `openssl` as follows:
++
+[source,text]
+echo -n "my-jdbc-password" | openssl enc -aes-128-cbc -a -salt -md md5 -pass file:/var/solr/data/dih-encryptionkey
++
+The output of the command will be a long string such as `U2FsdGVkX18QMjY0yfCqlfBMvAB4d3XkwY96L7gfO2o=`. You will use this as `password` in your `data-config.xml` file.
 
-  echo -n "my-jdbc-password" | openssl enc -aes-128-cbc -a -salt -md md5 -pass file:/var/solr/data/dih-encryptionkey
-
-.. The output of the command will be a long string such as `U2FsdGVkX18QMjY0yfCqlfBMvAB4d3XkwY96L7gfO2o=`. You will use this as `password` in your `data-config.xml` file.
 . In your `data-config.xml`, you'll add the `password` and `encryptKeyFile` parameters to the `<datasource>` configuration, as in this example:
 +
 [source,xml]
 <dataSource driver="org.hsqldb.jdbcDriver"
     url="jdbc:hsqldb:./example-DIH/hsqldb/ex"
-    user="sa" 
+    user="sa"
     password="U2FsdGVkX18QMjY0yfCqlfBMvAB4d3XkwY96L7gfO2o="
     encryptKeyFile="/var/solr/data/dih-encryptionkey" />
 
-NOTE: Note that we use the `-n` argument to `echo` to avoid including a newline character at the end of the password. If you use another method to generate the encrypted password, make sure to avoid newlines as well. 
+
 
 == DataImportHandler Commands