RANGER-5698 : Disable Unix Authentication Service by default - #1171
RANGER-5698 : Disable Unix Authentication Service by default#1171fimugdha wants to merge 1 commit into
Conversation
| && rm -f /home/ranger/dist/ranger-${RANGER_VERSION}-admin.tar.gz \ | ||
| && rm -f /opt/ranger/admin/install.properties \ | ||
| && mkdir -p /var/run/ranger /var/log/ranger /usr/share/java/ \ | ||
| && chmod 755 ${RANGER_SCRIPTS}/setup-ranger-shadow-group.sh \ |
There was a problem hiding this comment.
Adding users/groups have moved to the base image: https://github.com/apache/ranger-tools/blob/main/docker/Dockerfile , please see this script: https://github.com/apache/ranger-tools/blob/0e27092aedb0db01be54300f2936a6244e80ec6c/docker/create_users_and_groups.sh#L1 if a user like shadow is really required to be added.
There was a problem hiding this comment.
@kumaab, Created this pull-request on ranger-tools repository : apache/ranger-tools#16. Could you please review ? It will be needed for me to test this ranger side changes.
| private static final String SSL_TRUSTSTORE_FILE_TYPE_PARAM = "ranger.truststore.file.type"; | ||
| private static final String SSL_KEYSTORE_PATH_PARAM = "ranger.usersync.keystore.file"; | ||
| private static final String SSL_KEYSTORE_PATH_PASSWORD_PARAM = "ranger.usersync.keystore.password"; | ||
| private static final String SSL_KEYSTORE_PATH_PARAM = "ranger.usersync.service.https.attrib.keystore.file"; |
There was a problem hiding this comment.
it seems setup.py still using "ranger.usersync.keystore.file" and ranger-ugsync-template.xml does not have entry of ranger.usersync.service.https.attrib.keystore.file ; am i missing something here.
There was a problem hiding this comment.
@pradeepagrawal8184, the "ranger.usersync.keystore.file" will be used in case of unix authentication is enabled.
The "ranger.usersync.service.https.attrib.keystore.file" new config changes where not added as a part of this PR - https://github.com/apache/ranger/pull/1103/changes#diff-20795b8427231f8ec96f91b20a1bae2804a6f23327f44fe6156ee8677e9109f5.
Currently SSL enable is not used on default docker setup.
Do you think I need to handle the change of adding this new config into the usersync install.properties and in ranger-ugsync-template.xml files in this pull-request ?
| # Also, Unix authentication is enabled in Ranger Admin. | ||
| # defaults to false | ||
| ENABLE_UNIX_AUTH = false | ||
|
|
There was a problem hiding this comment.
what will happen to upgrade case by default. probably they have to edit this line if they want to continue with unixauth.
There was a problem hiding this comment.
Yes. How upgrade scenario for such use-cases are getting handled on apache side ?
There was a problem hiding this comment.
Yes, if he usage this updated file as is for upgrade then he needs to know the new default behaviours. mainly when he is already using unix auth before the upgrade.
| LOG.info("Service: {} - STOPPED", serviceName); | ||
| if (this.userSyncHAInitializerImpl != null) { | ||
| LOG.info("Stopping curator leader latch service as main thread is closing"); | ||
| this.userSyncHAInitializerImpl.stop(); |
There was a problem hiding this comment.
Can you test this once when unix auth is disabled and usersync is running in HA once.
There was a problem hiding this comment.
@pradeepagrawal8184, Sure, I will test it and keep you updated.
d1ff0fa to
ca836c7
Compare
What changes were proposed in this pull request?
The Unix Authentication service is rarely utilized for Ranger authentication, as the vast majority of deployments have migrated to modern alternatives like PAM or LDAP.
To optimize default startup behavior, we are removing the Unix Authentication service from the Ranger Usersync default startup sequence.
Moving forward, this service will run only if explicitly enabled via the
ranger.usersync.unix.auth.enabledproperty within theranger-ugsync-site.xmlconfiguration file.How was this patch tested?