File tree Expand file tree Collapse file tree 5 files changed +46
-1
lines changed
dev-support/ranger-docker Expand file tree Collapse file tree 5 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ TAGSYNC_VERSION=3.0.0-SNAPSHOT
5151SOLR_VERSION = 8.11.2
5252
5353# Zookeeper Configuration
54- ZK_VERSION = 3.8.4
54+ ZK_VERSION = 3.9.2
5555
5656# Kerberos
5757KERBEROS_ENABLED = true
Original file line number Diff line number Diff line change @@ -78,6 +78,13 @@ services:
7878 image : ranger-zk
7979 container_name : ranger-zk
8080 hostname : ranger-zk.rangernw
81+ volumes :
82+ - ./dist/keytabs/ranger-zk:/etc/keytabs
83+ - ./scripts/wait_for_keytab.sh:/etc/wait_for_keytab.sh
84+ - ./scripts/kdc/krb5.conf:/etc/krb5.conf:ro
85+ - ./scripts/zk/jaas.conf:/etc/zookeeper/jaas.conf
86+ - ./scripts/zk/zookeeper-with-kerberos.sh:/zookeeper-with-kerberos.sh:ro
87+ entrypoint : [ "/bin/bash", "/zookeeper-with-kerberos.sh" ]
8188 networks :
8289 - ranger
8390 ports :
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ function create_keytabs() {
100100 create_principal_and_keytab knox ranger-knox
101101
102102 create_principal_and_keytab HTTP ranger-solr
103+
104+ create_principal_and_keytab zookeeper ranger-zk
103105}
104106
105107function create_testusers() {
Original file line number Diff line number Diff line change 1+ Server {
2+ com.sun.security.auth.module.Krb5LoginModule required
3+ useKeyTab=true
4+ keyTab="/etc/keytabs/zookeeper.keytab"
5+ storeKey=true
6+ useTicketCache=false
7+ principal="zookeeper/
[email protected] ";
8+ };
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Licensed to the Apache Software Foundation (ASF) under one
4+ # or more contributor license agreements. See the NOTICE file
5+ # distributed with this work for additional information
6+ # regarding copyright ownership. The ASF licenses this file
7+ # to you under the Apache License, Version 2.0 (the
8+ # "License"); you may not use this file except in compliance
9+ # with the License. You may obtain a copy of the License at
10+ #
11+ # http://www.apache.org/licenses/LICENSE-2.0
12+ #
13+ # Unless required by applicable law or agreed to in writing, software
14+ # distributed under the License is distributed on an "AS IS" BASIS,
15+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ # See the License for the specific language governing permissions and
17+ # limitations under the License.
18+
19+ set -e
20+
21+ if [ " ${KERBEROS_ENABLED} " = " true" ]; then
22+ /etc/wait_for_keytab.sh zookeeper.keytab
23+
24+ export ZOO_CFG_EXTRA=" authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider requireClientAuthScheme=sasl"
25+ export SERVER_JVMFLAGS=" -Djava.security.auth.login.config=/etc/zookeeper/jaas.conf -Dzookeeper.sasl.client=false ${SERVER_JVMFLAGS} "
26+ fi
27+
28+ /docker-entrypoint.sh zkServer.sh start-foreground
You can’t perform that action at this time.
0 commit comments