RANGER-5658: Remove obsolete atlas.kafka.zookeeper.connect requirement from Tag Sync#1037
Open
ramackri wants to merge 3 commits into
Open
RANGER-5658: Remove obsolete atlas.kafka.zookeeper.connect requirement from Tag Sync#1037ramackri wants to merge 3 commits into
ramackri wants to merge 3 commits into
Conversation
…t from Tag Sync. Tag Sync consumes Atlas notifications via kafka-clients (bootstrap.servers only). The legacy zookeeper.connect property was never used by Atlas KafkaNotification but was still required at startup and in installer templates. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
setup.py wrote tagadmin.user.password as the literal username 'rangertagsync' instead of rangerTagsync_password from install.properties, causing 401 on TagAdminRESTSink until updatetagadminpassword.py ran at end of setup. Complements RANGER-5658 / PR #1037 (Atlas Kafka ZK cleanup); required for docker Atlas REST TagSync with Kerberos Ranger Admin. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the legacy
atlas.kafka.zookeeper.connectconfiguration requirement from Ranger Tag Sync's Atlas Kafka source (RANGER-5658).Tag Sync consumes Atlas entity notifications via
kafka-clientsusingatlas.kafka.bootstrap.serversandatlas.kafka.entities.group.id. Thezookeeper.connectproperty was never used by Atlas 2.4KafkaNotificationfor consumer creation; Ranger only validated that it was set. With Kafka 3.9.x and KRaft brokers, clients do not use ZooKeeper for consumption.Changes (RANGER-5658)
TAGSYNC_ATLAS_ZOOKEEPER_ENDPOINTconstant and startup validation fromAtlasTagSourcevalidateRequiredAtlasKafkaProperties()for unit testingTAG_SOURCE_ATLAS_KAFKA_ZOOKEEPER_CONNECTfrominstall.properties,installprop2xml.properties, andsetup.pyAdditional change (TagSync install — Ranger destination credential)
During TagSync installation,
setup.pystores the Ranger Admin destination password in the Java credential keystore (tagadmin.user.password) before the process exits. Previously this step always wrote the service account username (rangertagsync) as the secret value, even wheninstall.propertiesdefined a differentrangerTagsync_password.That mismatch breaks the common deployment pattern where:
TagAdminRESTSinkusing basic auth (Hadoopsimplesecurity in TagSync'score-site.xml), rather than SPNEGO.In those environments, an incorrect keystore password produces HTTP 401 on
/service/tags/importservicetags/and tag mappings never reach Ranger. A second script (updatetagadminpassword.py) at the end ofsetup.pywas intended to correct the credential, but any install failure or early exit before that step left TagSync permanently unable to authenticate.This change: when
rangerTagsync_passwordis set ininstall.properties, use it for the initial keystore write—the same pattern already used for the Atlas REST credential in the same file.Out of scope
ranger-tagsync.server.ha.zookeeper.*) — unchanged; still requires ZooKeeper when HA is enabledUpgrade note
Existing deployments may still have
atlas.kafka.zookeeper.connectinconf/atlas-application.properties; it is harmless and can be removed manually. New installs no longer generate or require it.Test plan
Unit tests
mvn test -pl tagsync -Drat.skip=true \ -Dtest=AtlasTagSourceConfigTest \ -Dsurefire.failIfNoSpecifiedTests=falsevalidateRequiredAtlasKafkaProperties_acceptsBootstrapAndGroupWithoutZookeepervalidateRequiredAtlasKafkaProperties_rejectsMissingBootstrapServersvalidateRequiredAtlasKafkaProperties_rejectsMissingConsumerGroupAtlasTagSourceConfigTest— 3 tests, 0 failures (local run)createdByTagSync user); confirm TagSync logs contain no repeated 401 responses on tag uploadconf/atlas-application.propertieshas nozookeeper.connectzookeeper.connectstill startsranger-tagsync.server.ha.enabled=true) — leader election unchanged