You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/01/08 06:07:40 UTC
[2/3] git commit: ACCUMULO-2046 Adds checking for jaas.conf, krb5.conf
ACCUMULO-2046 Adds checking for jaas.conf, krb5.conf
Putting -D flags into accumulo-env.sh for these files is
a pain, and can be easily automated if we patch the startup
scripts to do so.
Signed-off-by: Josh Elser <el...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/472f484a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/472f484a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/472f484a
Branch: refs/heads/master
Commit: 472f484a73a2bf264581d1282a904d497dfb0234
Parents: bb14351
Author: Michael Allen <mi...@sqrrl.com>
Authored: Tue Dec 17 16:57:14 2013 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Tue Jan 7 23:54:38 2014 -0500
----------------------------------------------------------------------
bin/accumulo | 11 +++++++++++
bin/config.sh | 20 ++++++++++++++++++++
2 files changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/472f484a/bin/accumulo
----------------------------------------------------------------------
diff --git a/bin/accumulo b/bin/accumulo
index 89f5624..75df322 100755
--- a/bin/accumulo
+++ b/bin/accumulo
@@ -89,6 +89,17 @@ if [ "$1" = "jar" -a -f "$2" ] ; then
fi
#
+# Set up -D switches for JAAS and Kerberos if env variables set
+#
+if [ ! -z ${ACCUMULO_JAAS_CONF} ]; then
+ ACCUMULO_GENERAL_OPTS="${ACCUMULO_GENERAL_OPTS} -Djava.security.auth.login.config=${ACCUMULO_JAAS_CONF}"
+fi
+
+if [ ! -z ${ACCUMULO_KRB5_CONF} ]; then
+ ACCUMULO_GENERAL_OPTS="${ACCUMULO_GENERAL_OPTS} -Djava.security.krb5.conf=${ACCUMULO_KRB5_CONF}"
+fi
+
+#
# Add appropriate options for process type
#
case "$1" in
http://git-wip-us.apache.org/repos/asf/accumulo/blob/472f484a/bin/config.sh
----------------------------------------------------------------------
diff --git a/bin/config.sh b/bin/config.sh
index dde0213..8b99e68 100755
--- a/bin/config.sh
+++ b/bin/config.sh
@@ -38,6 +38,10 @@
# SSH Default ssh parameters used to start daemons
# MALLOC_ARENA_MAX To work around a memory management bug (see ACCUMULO-847)
# HADOOP_HOME Home dir for hadoop. TODO fix this.
+#
+# Values set by script if certain files exist
+# ACCUMULO_JAAS_CONF Location of jaas.conf file. Needed by JAAS for things like Kerberos based logins
+# ACCUMULO_KRB5_CONF Location of krb5.conf file. Needed by Kerberos subsystems to find login servers
if [ -z "${ACCUMULO_HOME}" ] ; then
# Start: Resolve Script Directory
@@ -142,3 +146,19 @@ export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-1}
# ACCUMULO-1985 provide a way to use the scripts and still bind to all network interfaces
export ACCUMULO_MONITOR_BIND_ALL=${ACCUMULO_MONITOR_BIND_ALL:-"false"}
+
+# Check for jaas.conf configuration
+if [ -z ${ACCUMULO_JAAS_CONF} ]; then
+ if [ -f ${ACCUMULO_CONF_DIR}/jaas.conf ]; then
+ export ACCUMULO_JAAS_CONF=${ACCUMULO_CONF_DIR}/jaas.conf
+ fi
+fi
+
+# Check for krb5.conf configuration
+if [ -z ${ACCUMULO_KRB5_CONF} ]; then
+ if [ -f ${ACCUMULO_CONF_DIR}/krb5.conf ]; then
+ export ACCUMULO_KRB5_CONF=${ACCUMULO_CONF_DIR}/krb5.conf
+ fi
+fi
+
+