Skip to main content
Version 3.0

Kafka, NiFi, and Trino
with policies in Ranger.

Four scenarios: automatic registration in Ranger Admin and the integration of Kafka, NiFi, and Trino. Each one covers: the chart default, what changes in the cluster, and the values file commented line by line.

ChartVersion3.0.3TypeapplicationAppVersion2.7.0
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+

The chart tdp-ranger can register the service and policies for each integrated component in Ranger Admin through a Job that runs after installation or upgrade. Each component enables its Ranger plugin in its own chart. For services, policies and plugins, see Ranger - Concepts.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you provided. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

Each component's plugin, the Job that registers services and policies, and where values are configured.

Components reach Ranger through the Ranger plugin, enabled in each component's chart, which queries the policies for that component's service in Ranger Admin, Ranger's central server. The service and policies can be registered by this chart's integration Job, without using the interface.

By default, the Job and all integrations are disabled, and nothing is registered. When enabled, the Job runs after each release installation or upgrade, waits for the Ranger Admin API to respond, registers services for enabled integrations and creates the policies declared in defaultPolicies. Everything lives in the rangerIntegrations block.

The following tabs provide the values for each integration: Kafka in scenario 2, NiFi in scenario 3 and Trino in scenario 4.

Chart default

rangerIntegrations.configJob.enabled: false and all integrations disabled: nothing is registered. Enable the Job together with each integration you enable.

Three scopes

The same structure appears in rangerIntegrations, read by the Job and integration ConfigMap; in tdp-ranger.rangerIntegrations, passed to the Apache Ranger subchart; and in global.rangerIntegrations, for subcharts that read global values.

Each integration

serviceName and serviceDisplayName, connection (protocol and URLs), credentials (username and password) and defaultPolicies (policy list).

Admin password

With the Job enabled, ranger.adminPassword is required in the values file (scenario 1 of Security - Ranger).

Falha

If a technical user or policy cannot be created, the post-install or post-upgrade hook explicitly fails.

The registered services and the plugins

namespace <NAMESPACE>registerspoliciesmTLSpoliciesIntegration Jobafter installation or upgradeRanger Adminservices and policiesKafkaservice tdp-kafkaNiFitdp_nifi serviceTrinotdp_trino service
  1. Integration Job. Runs after each release installation or upgrade. Waits for the Ranger Admin API to respond, registers services for enabled integrations and creates defaultPolicies policies. Chart default: disabled. (rangerIntegrations.configJob.enabled)
  2. Ranger Admin. Stores one service per integration, with its policies. The Job logs in with user admin and the ranger.adminPassword password. Chart default: no registered services. (tdp-ranger.ranger.adminPassword)
  3. Kafka. Brokers use the Ranger authorizer and only start after the service and policies exist. The kafka-ui user's password comes from a Secret. Chart default: disabled. (rangerIntegrations.kafka.enabled)
  4. NiFi. Ranger Admin queries NiFi resources over HTTPS using a client certificate generated by cert-manager with the NiFi Issuer. Chart default: disabled. (rangerIntegrations.nifi.enabled)
  5. Trino. The Trino coordinator loads the Ranger plugin, configured in the Trino chart. The Ranger service connects to Trino over JDBC. Chart default: disabled. (rangerIntegrations.trino.enabled)
The Job registers services in Ranger Admin, and component plugins query policies. Click an element to see its corresponding default.

Click the markers to understand each line.

1rangerIntegrations:
2configJob:
3 enabled: true
4 rangerReadyTimeout: 1800
5 retryInterval: 10
6 activeDeadlineSeconds: ""

Without it, enabling an integration does not register anything in Ranger Admin.

  1. Enable the Job (linha 3). Without it, enabling an integration does not register anything in Ranger Admin.
  2. Wait for the API (linha 4). How long, in seconds, the Job waits for the Ranger Admin API to respond. Ranger's first startup imports the database schema and takes the longest.
  3. Interval (linha 5). Interval between attempts, in seconds.
  4. Overall deadline (linha 6). Deadline for the entire Job. When empty, uses rangerReadyTimeout plus a margin for registering services and policies.
Integration Job

Values for each integration are in scenarios 2 through 4.

When something goes wrong​

Troubleshooting

Paste the error message or choose a symptom. The response includes the cause, action and command.

  1. The service does not appear in Ranger Admin. Cause: The integration Job only runs with rangerIntegrations.configJob.enabled: true, disabled by default. Enabling only the integration does not register anything. What to do: Enable the Job together with the integration and upgrade the release (scenario 1).
  2. The integration Job does not complete or times out. Cause: The Job waits for the Ranger Admin API up to rangerReadyTimeout, and Ranger's first startup imports the database schema. The overall Job deadline is activeDeadlineSeconds. What to do: Check whether Ranger Admin responds and, if necessary, increase rangerReadyTimeout or activeDeadlineSeconds (scenario 1).
  3. The upgrade fails in the integration hook. Cause: If a technical user or policy cannot be created, the post-install or post-upgrade hook explicitly fails. What to do: Read the Job log to identify the failed user or policy and correct the values file.
  4. Kafka brokers do not start with the Ranger authorizer. Cause: Brokers need the Kafka service and policies in Ranger before starting. What to do: Install Ranger with the Kafka integration before Kafka, following the order in scenario 2.
  5. Kafka service Test Connection always fails. Cause: Known limitation of the Ranger interface for Kafka without Kerberos: the test does not use the service username and password. What to do: No action needed: broker authorization does not depend on this test.
  6. PKIX path building failed in the NiFi policy editor. Cause: NiFi was reinstalled and created a new CA that no longer recognizes the Ranger client certificate. What to do: Delete the certificate Secret so cert-manager reissues it with the current CA, and restart Ranger Admin (scenario 3).
  7. Ranger cannot open keystore.jks or truststore.jks. Cause: The password in the ranger-nifi-client-tls-password Secret changed without reissuing the certificate Secret. What to do: Keep the password stable. If it changed, reissue the certificate as described for PKIX (scenario 3).

Integration parameters​

Filter by name or group. Keys are at the root of the values file, in the scope read by the Job.

26 of 26 parameters

ParameterDescriptionChart default
rangerIntegrations.configJob.enabledJobEnables the integration Job. Enable together with the integrationfalse
rangerIntegrations.configJob.imageJobJob imageregistry.tecnisys.com.br/community/images/python:3.11-slim
rangerIntegrations.configJob.rangerReadyTimeoutJobHow long the Job waits for the Ranger API, in seconds1800
rangerIntegrations.configJob.activeDeadlineSecondsJobOverall Job deadline. Empty uses rangerReadyTimeout plus a margin""
rangerIntegrations.configJob.retryIntervalJobInterval between attempts, in seconds10
rangerIntegrations.kafka.enabledKafkaEnables the Kafka integrationfalse
rangerIntegrations.kafka.serviceNameKafkaService name in Ranger Admintdp_kafka
rangerIntegrations.kafka.connection.bootstrapServersKafkaKafka bootstrap address<kafka-bootstrap-servers>
rangerIntegrations.kafka.connection.zookeeperConnectKafkaEmpty in KRaft<zookeeper-connect>
rangerIntegrations.kafka.connection.securityProtocolKafkaSecurity protocolPLAINTEXT
rangerIntegrations.nifi.enabledNiFiEnables the NiFi integrationfalse
rangerIntegrations.nifi.serviceNameNiFiService name in Ranger Admintdp_nifi
rangerIntegrations.nifi.serviceDisplayNameNiFiService display name in Ranger AdminTDP NiFi Cluster
rangerIntegrations.nifi.tlsClientCertificate.autoGenerate.enabledNiFiGenerates the Ranger client certificate with cert-managerfalse
rangerIntegrations.nifi.tlsClientCertificate.autoGenerate.secretNameNiFiGenerated certificate Secretranger-nifi-client-tls
rangerIntegrations.nifi.tlsClientCertificate.autoGenerate.passwordSecretNameNiFiSecret containing the JKS file password, created by youranger-nifi-client-tls-password
rangerIntegrations.nifi.tlsClientCertificate.autoGenerate.issuerRef.nameNiFicert-manager Issuernifi-issuer
rangerIntegrations.nifi.tlsClientCertificate.autoGenerate.commonNameNiFiClient certificate identityranger-nifi-client
rangerIntegrations.nifi.connection.nifiUrlNiFiAddress of /nifi-api/resources<nifi-url>/nifi-api/resources
rangerIntegrations.nifi.connection.authenticationTypeNiFiRanger authentication to NiFiSSL
rangerIntegrations.nifi.connection.additionalConfigsNiFiExtra service settingspolicy.download.auth.users: nifi
rangerIntegrations.nifi.defaultPoliciesNiFiList of policies created by the Job in the service[]
rangerIntegrations.trino.enabledTrinoEnables the Trino integrationfalse
rangerIntegrations.trino.serviceNameTrinoService name in Ranger Admintdp_trino
rangerIntegrations.trino.connection.jdbcUrlTrinoTrino JDBC URL<trino-jdbc-url>
rangerIntegrations.trino.connection.jdbcDriverClassNameTrinoDriver JDBCio.trino.jdbc.TrinoDriver

Next steps​