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 2025/10/19 10:24:41 UTC
[PR] RANGER-5373: Docker setup updated to run KDC and create keytabs for service accounts [ranger]
mneethiraj opened a new pull request, #704:
URL: https://github.com/apache/ranger/pull/704
## What changes were proposed in this pull request?
Introduced `Dockerfile.ranger-kdc` to deploy a Kerberos KDC; introduced script `create_keytab.sh` which can be used by services to create Kerberos principals and keytabs for their use.
## How was this patch tested?
Brought up Ranger container using `docker compose` along with `-f docker-compose.ranger-kdc.yml` and confirmed that each service created service principals and keytabs need for the service.
--
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-5373: Docker setup updated to run KDC and create keytabs for service accounts [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj commented on PR #704:
URL: https://github.com/apache/ranger/pull/704#issuecomment-3457622805
Closing this PR as all changes here are included in #720.
--
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-5373: Docker setup updated to run KDC and create keytabs for service accounts [ranger]
Posted by "mneethiraj (via GitHub)" <gi...@apache.org>.
mneethiraj closed pull request #704: RANGER-5373: Docker setup updated to run KDC and create keytabs for service accounts
URL: https://github.com/apache/ranger/pull/704
--
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-5373: Docker setup updated to run KDC and create keytabs for service accounts [ranger]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #704:
URL: https://github.com/apache/ranger/pull/704#discussion_r2443240243
##########
dev-support/ranger-docker/config/kdc/create_keytab.sh:
##########
@@ -0,0 +1,41 @@
+#!/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.
+
+ADMIN_PRINCIPAL=admin/admin
+ADMIN_PASSWORD=rangerR0cks!
Review Comment:
Hard-coded credentials in the script create a security vulnerability. These credentials should be passed as environment variables or parameters instead of being embedded in the script.
##########
dev-support/ranger-docker/scripts/ranger-admin-install-oracle.properties:
##########
@@ -91,3 +91,12 @@ STALE_PATCH_ENTRY_HOLD_TIME=10
hadoop_conf=
authentication_method=UNIX
+
+#------------ Kerberos Config -----------------
+spnego_principal=HTTP/_HOST@REALM
+spnego_keytab=/etc/keytabs/HTTP.keytab
+token_valid=30
+admin_principal=rangeradmin/_HOST@REALM
+admin_keytab=/etc/keytabs/rangeradmin.keytab
+lookup_principal=rangerlookup/_HOST@REALM
+lookup_keytab=/etc/keytabs/rangerlookup.keytab
Review Comment:
All keytab path references use `/etc/keytabs/` but the script creates them in `/opt/ranger/admin/keytabs`. These paths should be updated to `/opt/ranger/admin/keytabs/` to match the actual keytab location defined in ranger.sh.
```suggestion
spnego_keytab=/opt/ranger/admin/keytabs/HTTP.keytab
token_valid=30
admin_principal=rangeradmin/_HOST@REALM
admin_keytab=/opt/ranger/admin/keytabs/rangeradmin.keytab
lookup_principal=rangerlookup/_HOST@REALM
lookup_keytab=/opt/ranger/admin/keytabs/rangerlookup.keytab
```
##########
dev-support/ranger-docker/scripts/ranger-admin-install-sqlserver.properties:
##########
@@ -97,3 +97,12 @@ STALE_PATCH_ENTRY_HOLD_TIME=10
hadoop_conf=
authentication_method=UNIX
+
+#------------ Kerberos Config -----------------
+spnego_principal=HTTP/_HOST@REALM
+spnego_keytab=/etc/keytabs/HTTP.keytab
Review Comment:
The keytab path reference is inconsistent with the script that creates keytabs in `/opt/ranger/admin/keytabs` (line 19 of ranger.sh). The path should be `/opt/ranger/admin/keytabs/HTTP.keytab` to match where the keytab is actually created.
```suggestion
spnego_keytab=/opt/ranger/admin/keytabs/HTTP.keytab
```
##########
dev-support/ranger-docker/scripts/ranger-admin-install-sqlserver.properties:
##########
@@ -97,3 +97,12 @@ STALE_PATCH_ENTRY_HOLD_TIME=10
hadoop_conf=
authentication_method=UNIX
+
+#------------ Kerberos Config -----------------
+spnego_principal=HTTP/_HOST@REALM
+spnego_keytab=/etc/keytabs/HTTP.keytab
+token_valid=30
+admin_principal=rangeradmin/_HOST@REALM
+admin_keytab=/etc/keytabs/rangeradmin.keytab
Review Comment:
The keytab path reference is inconsistent with the script that creates keytabs in `/opt/ranger/admin/keytabs` (line 19 of ranger.sh). The path should be `/opt/ranger/admin/keytabs/rangeradmin.keytab` to match where the keytab is actually created.
```suggestion
admin_keytab=/opt/ranger/admin/keytabs/rangeradmin.keytab
```
##########
dev-support/ranger-docker/scripts/ranger-admin-install-sqlserver.properties:
##########
@@ -97,3 +97,12 @@ STALE_PATCH_ENTRY_HOLD_TIME=10
hadoop_conf=
authentication_method=UNIX
+
+#------------ Kerberos Config -----------------
+spnego_principal=HTTP/_HOST@REALM
+spnego_keytab=/etc/keytabs/HTTP.keytab
+token_valid=30
+admin_principal=rangeradmin/_HOST@REALM
+admin_keytab=/etc/keytabs/rangeradmin.keytab
+lookup_principal=rangerlookup/_HOST@REALM
+lookup_keytab=/etc/keytabs/rangerlookup.keytab
Review Comment:
The keytab path reference is inconsistent with the script that creates keytabs in `/opt/ranger/admin/keytabs` (line 19 of ranger.sh). The path should be `/opt/ranger/admin/keytabs/rangerlookup.keytab` to match where the keytab is actually created.
```suggestion
lookup_keytab=/opt/ranger/admin/keytabs/rangerlookup.keytab
```
##########
dev-support/ranger-docker/scripts/ranger-admin-install-postgres.properties:
##########
@@ -90,3 +90,12 @@ STALE_PATCH_ENTRY_HOLD_TIME=10
hadoop_conf=
authentication_method=UNIX
+
+#------------ Kerberos Config -----------------
+spnego_principal=HTTP/_HOST@REALM
+spnego_keytab=/etc/keytabs/HTTP.keytab
+token_valid=30
+admin_principal=rangeradmin/_HOST@REALM
+admin_keytab=/etc/keytabs/rangeradmin.keytab
+lookup_principal=rangerlookup/_HOST@REALM
+lookup_keytab=/etc/keytabs/rangerlookup.keytab
Review Comment:
All keytab path references use `/etc/keytabs/` but the script creates them in `/opt/ranger/admin/keytabs`. These paths should be updated to `/opt/ranger/admin/keytabs/` to match the actual keytab location defined in ranger.sh.
```suggestion
spnego_keytab=/opt/ranger/admin/keytabs/HTTP.keytab
token_valid=30
admin_principal=rangeradmin/_HOST@REALM
admin_keytab=/opt/ranger/admin/keytabs/rangeradmin.keytab
lookup_principal=rangerlookup/_HOST@REALM
lookup_keytab=/opt/ranger/admin/keytabs/rangerlookup.keytab
```
##########
dev-support/ranger-docker/scripts/ranger-admin-install-mysql.properties:
##########
@@ -90,3 +90,12 @@ STALE_PATCH_ENTRY_HOLD_TIME=10
hadoop_conf=
authentication_method=UNIX
+
+#------------ Kerberos Config -----------------
+spnego_principal=HTTP/_HOST@REALM
+spnego_keytab=/etc/keytabs/HTTP.keytab
+token_valid=30
+admin_principal=rangeradmin/_HOST@REALM
+admin_keytab=/etc/keytabs/rangeradmin.keytab
+lookup_principal=rangerlookup/_HOST@REALM
+lookup_keytab=/etc/keytabs/rangerlookup.keytab
Review Comment:
All keytab path references use `/etc/keytabs/` but the script creates them in `/opt/ranger/admin/keytabs`. These paths should be updated to `/opt/ranger/admin/keytabs/` to match the actual keytab location defined in ranger.sh.
```suggestion
spnego_keytab=/opt/ranger/admin/keytabs/HTTP.keytab
token_valid=30
admin_principal=rangeradmin/_HOST@REALM
admin_keytab=/opt/ranger/admin/keytabs/rangeradmin.keytab
lookup_principal=rangerlookup/_HOST@REALM
lookup_keytab=/opt/ranger/admin/keytabs/rangerlookup.keytab
```
--
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