keith-turner closed pull request #201: Added option to enable encryption
URL: https://github.com/apache/fluo-uno/pull/201
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/impl/setup-accumulo.sh b/bin/impl/setup-accumulo.sh
index cf94ea8..ecbc5ac 100755
--- a/bin/impl/setup-accumulo.sh
+++ b/bin/impl/setup-accumulo.sh
@@ -58,6 +58,12 @@ else
   $SED 
"s#instance[.]zookeepers=localhost:2181#instance.zookeepers=$UNO_HOST:2181#" 
"$conf"/accumulo-client.properties
   $SED "s#auth[.]principal=#auth.principal=$ACCUMULO_USER#" 
"$conf"/accumulo-client.properties
   $SED "s#auth[.]token=#auth.token=$ACCUMULO_PASSWORD#" 
"$conf"/accumulo-client.properties
+  if [[ "$ACCUMULO_CRYPTO" == "true" ]]; then
+    openssl rand -out $ACCUMULO_HOME/testkeyfile.key 32
+    echo "instance.crypto.opts.key.provider=uri" >> "$accumulo_conf"
+    echo 
"instance.crypto.opts.key.location=file://$ACCUMULO_HOME/conf/data-encryption.key"
 >> "$accumulo_conf"
+    echo 
"instance.crypto.service=org.apache.accumulo.core.security.crypto.impl.AESCryptoService"
 >> "$accumulo_conf"
+  fi
 fi
 $SED "s#localhost#$UNO_HOST#" "$conf/masters" "$conf/monitor" "$conf/gc"
 $SED "s#export ZOOKEEPER_HOME=[^ ]*#export ZOOKEEPER_HOME=$ZOOKEEPER_HOME#" 
"$conf"/accumulo-env.sh
diff --git a/conf/uno.conf b/conf/uno.conf
index 1595057..b1c20e1 100644
--- a/conf/uno.conf
+++ b/conf/uno.conf
@@ -143,6 +143,8 @@ export ACCUMULO_INSTANCE=uno
 export ACCUMULO_USER=root
 # Accumulo password
 export ACCUMULO_PASSWORD=secret
+# Accumulo crypto option, 'true' to run with encryption, 'false' to run without
+export ACCUMULO_CRYPTO=false
 
 # Metrics configuration
 # ---------------------


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to