You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "mneethiraj (via GitHub)" <gi...@apache.org> on 2026/01/16 09:33:51 UTC
[PR] RANGER-5441: update Docker setup to support Kerberos in Zookeeper [ranger]
mneethiraj opened a new pull request, #808:
URL: https://github.com/apache/ranger/pull/808
## What changes were proposed in this pull request?
Updated docker setup to configure zookeeper for Kerberos authentication.
## How was this patch tested?
Verified that Kerberized HiveServer2 successfully connects to zookeeper and completes its initialization.
--
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: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-5441: update Docker setup to support Kerberos in Zookeeper [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj merged PR #808:
URL: https://github.com/apache/ranger/pull/808
--
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: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-5441: update Docker setup to support Kerberos in Zookeeper [ranger]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #808:
URL: https://github.com/apache/ranger/pull/808#discussion_r2697698197
##########
dev-support/ranger-docker/scripts/zk/ranger-zk.sh:
##########
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# 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.
+
+if [ "${KERBEROS_ENABLED}" == "true" ]
+then
+ /home/ranger/scripts/wait_for_keytab.sh zookeeper.keytab
+ export SERVER_JVMFLAGS="-Djava.security.auth.login.config=/etc/zookeeper/jaas.conf -Dzookeeper.sasl.client=false ${SERVER_JVMFLAGS}"
+fi
+
+/home/ranger/scripts/ranger-zk-entrypoint.sh $*
Review Comment:
The use of `$*` passes all arguments as a single word. Use `"$@"` instead to properly preserve argument boundaries and handle arguments containing spaces correctly.
```suggestion
/home/ranger/scripts/ranger-zk-entrypoint.sh "$@"
```
##########
dev-support/ranger-docker/scripts/zk/ranger-zk-entrypoint.sh:
##########
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+# 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.
+
+#
+# This is a copy of /docker-entrypoint.sh from zookeeper docker image, customized to
+# update zoo.cfg for Kerberos authentication (lines between marker RANGER below).
+#
+
+set -e
+
+# Allow the container to be started with `--user`
+if [[ "$1" = 'zkServer.sh' && "$(id -u)" = '0' ]]; then
Review Comment:
Use `==` instead of `=` for string comparison in `[[ ]]` conditional expressions for consistency with bash best practices, even though both work.
```suggestion
if [[ "$1" == 'zkServer.sh' && "$(id -u)" == '0' ]]; then
```
--
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: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-5441: update Docker setup to support Kerberos in Zookeeper [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj commented on code in PR #808:
URL: https://github.com/apache/ranger/pull/808#discussion_r2697743270
##########
dev-support/ranger-docker/scripts/zk/ranger-zk-entrypoint.sh:
##########
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+# 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.
+
+#
+# This is a copy of /docker-entrypoint.sh from zookeeper docker image, customized to
+# update zoo.cfg for Kerberos authentication (lines between marker RANGER below).
+#
+
+set -e
+
+# Allow the container to be started with `--user`
+if [[ "$1" = 'zkServer.sh' && "$(id -u)" = '0' ]]; then
Review Comment:
Not changing the file copied from original Zookeeper docker image,
--
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: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-5441: update Docker setup to support Kerberos in Zookeeper [ranger]
Posted by "kumaab (via GitHub)" <gi...@apache.org>.
kumaab commented on PR #808:
URL: https://github.com/apache/ranger/pull/808#issuecomment-3762766170
[0001-RANGER-5441-Add-support-to-run-ZK-with-Kerberos.patch](https://github.com/user-attachments/files/24685510/0001-RANGER-5441-Add-support-to-run-ZK-with-Kerberos.patch)
I tried to simplify the PR using the patch above, could you please try with this patch? thank you.
--
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: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] RANGER-5441: update Docker setup to support Kerberos in Zookeeper [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj commented on PR #808:
URL: https://github.com/apache/ranger/pull/808#issuecomment-3764239769
> [0001-RANGER-5441-Add-support-to-run-ZK-with-Kerberos.patch](https://github.com/user-attachments/files/24685510/0001-RANGER-5441-Add-support-to-run-ZK-with-Kerberos.patch)
>
> I tried to simplify the PR using the patch above, could you please try with this patch? thank you.
@kumaab - the patch looks good. I updated the PR with the changes. Thanks!
--
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: dev-unsubscribe@ranger.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org