Could not see settings icon in Secure Nifi registry UI
I had setup Secure Nifi Registry using Docker compose.
Everything worked and I am able to open UI at https://localhost:18443/nifi-registry
But when i try to add buckets, I don't even see the settings icon.
As I checked the logs i can see below error:
nifi_registry_container_persistent | 2023-06-29 15:23:01,075 INFO [NiFi Registry Web Server-23] o.a.n.r.w.m.AccessDeniedExceptionMapper identity[CN=admin, OU=NiFi], groups[] does not have permission to access the requested resource. Unknown user with identity 'CN=admin, OU=NiFi'. Returning Forbidden response.
nifi_registry_container_persistent | 2023-06-29 15:23:01,129 INFO [NiFi Registry Web Server-20] o.a.n.r.w.m.IllegalStateExceptionMapper java.lang.IllegalStateException: Kerberos service ticket login not supported by this NiFi Registry. Returning Conflict response.
nifi_registry_container_persistent | 2023-06-29 15:23:01,190 INFO [NiFi Registry Web Server-16] o.a.n.r.w.m.IllegalStateExceptionMapper java.lang.IllegalStateException: OpenId Connect is not configured.. Returning Conflict response.
nifi_registry_container_persistent | 2023-06-29 15:23:01,253 INFO [NiFi Registry Web Server-16] o.a.n.r.w.m.IllegalStateExceptionMapper java.lang.IllegalStateException: Kerberos service ticket login not supported by this NiFi Registry. Returning Conflict response.
nifi_registry_container_persistent | 2023-06-29 15:23:01,281 INFO [NiFi Registry Web Server-20] o.a.n.r.w.m.IllegalStateExceptionMapper java.lang.IllegalStateException: OpenId Connect is not configured.. Returning Conflict response.
My authentication is based only on certificate. Below is my docker compose:
version: "3.7"
services:
# version control for nifi flows
registry:
hostname: DWH_Nifi_registry
container_name: nifi_registry_container_persistent
image: 'apache/nifi-registry:1.22.0' # latest image as of 2023-June.
restart: on-failure
user: root
ports:
- '18443:18443'
environment:
- AUTH=tls
- NIFI_REGISTRY_WEB_HTTPS_PORT=18443
- KEYSTORE_PATH=/opt/certs/keystore.jks
- KEYSTORE_TYPE=JKS
- KEYSTORE_PASSWORD=<pp>
- TRUSTSTORE_PATH=/opt/certs/truststore.jks
- TRUSTSTORE_TYPE=JKS
- TRUSTSTORE_PASSWORD=<PP>
- LOG_LEVEL=INFO
- NIFI_REGISTRY_DB_DIR=/opt/nifi-registry/nifi-registry-current/database
- NIFI_REGISTRY_FLOW_PROVIDER=file
- NIFI_REGISTRY_FLOW_STORAGE_DIR=/opt/nifi-registry/nifi-registry-current/flow_storage
- INITIAL_ADMIN_IDENTITY='CN=admin, OU=NiFi'
volumes:
#- ./nifi_registry/conf:/opt/nifi-registry/nifi-registry-current/conf
- ./nifi-registry/logs:/opt/nifi-registry/nifi-current/logs
- ./nifi-registry/database:/opt/nifi-registry/nifi-registry-current/database
- ./nifi-registry/flow_storage:/opt/nifi-registry/nifi-registry-current/flow_storage
- ./nifi-toolkit-1.22.0/certs/localhost/keystore.jks:/opt/certs/keystore.jks
- ./nifi-toolkit-1.22.0/certs/localhost/truststore.jks:/opt/certs/truststore.jks
networks:
- nifi_persistent_network
networks:
nifi_persistent_network:
driver: bridge
I can see users.xml and authorizers.xml getting populated.
But still I am not allowed to create buckets in UI.
Can someone please help me here understanding what i am doing wrong..
users.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tenants>
<groups/>
<users>
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125" identity="'CN=admin, OU=NiFi'"/>
</users>
</tenants>
authorizations.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<authorizations>
<policies>
<policy identifier="05b96464-9ec8-312a-8459-67812a8b48c1" resource="/buckets" action="D">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="15e4e0bd-cb28-34fd-8587-f8d15162cba5" resource="/tenants" action="W">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="2f470357-e82c-38ee-8062-ab6388d6ec75" resource="/actuator" action="W">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="d59a54f7-6dd6-34ad-a279-a26ffdb9eef8" resource="/proxy" action="R">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="dfbf3c51-fdec-3328-b169-3b54eb033147" resource="/buckets" action="W">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="3ee4703f-94ca-33c2-8060-17f5d313f560" resource="/actuator" action="D">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="287edf48-da72-359b-8f61-da5d4c45a270" resource="/proxy" action="W">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="ff96062a-fa99-36dc-9942-0f6442ae7212" resource="/policies" action="R">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="01b87cb5-c0b6-342d-b108-d8bc03ab5cde" resource="/policies" action="D">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="ad99ea98-3af6-3561-ae27-5bf09e1d969d" resource="/policies" action="W">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="6dbdbffd-8a7d-32e1-ba3e-f600e6c69791" resource="/proxy" action="D">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="0eaa47b9-e409-304e-8682-30d1b0d86d05" resource="/swagger" action="R">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="9d182b11-ebe3-3a7a-8731-98ce6d6e44fd" resource="/buckets" action="R">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="ac587f43-6e1c-3890-81fd-83b4df2e678e" resource="/swagger" action="D">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="627410be-1717-35b4-a06f-e9362b89e0b7" resource="/tenants" action="R">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="2fd3fcf5-b10f-33fa-8d8e-b262fa34815e" resource="/actuator" action="R">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="2dbc92a2-b091-3616-8e88-5078b9103b04" resource="/tenants" action="D">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
<policy identifier="cf4d8390-5ac7-3ff0-82ce-a274b5f88b21" resource="/swagger" action="W">
<user identifier="ab7ae4a1-fcad-3ed3-92ca-ce75fa140125"/>
</policy>
</policies>
</authorizations>
providers.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<providers>
<!-- NOTE: The providers in this file must be listed in the order defined in providers.xsd which is the following:
1) Flow Persistence Provider (Must occur once and only once)
2) Event Hook Providers (May occur 0 or more times)
3) Bundle Persistence Provider (Must occur once and only once)
-->
<flowPersistenceProvider>
<class>org.apache.nifi.registry.provider.flow.FileSystemFlowPersistenceProvider</class>
<property name="Flow Storage Directory">/opt/nifi-registry/nifi-registry-current/flow_storage</property>
</flowPersistenceProvider>
<!--
<flowPersistenceProvider>
<class>org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider</class>
<property name="Flow Storage Directory">./flow_storage</property>
<property name="Remote To Push"></property>
<property name="Remote Access User"></property>
<property name="Remote Access Password"></property>
<property name="Remote Clone Repository"></property>
</flowPersistenceProvider>
-->
<!--
<flowPersistenceProvider>
<class>org.apache.nifi.registry.provider.flow.DatabaseFlowPersistenceProvider</class>
</flowPersistenceProvider>
-->
<!--
<eventHookProvider>
<class>org.apache.nifi.registry.provider.hook.ScriptEventHookProvider</class>
<property name="Script Path"></property>
<property name="Working Directory"></property>
-->
<!-- Optional Whitelist Event types
<property name="Whitelisted Event Type 1">CREATE_FLOW</property>
<property name="Whitelisted Event Type 2">DELETE_FLOW</property>
-->
<!--
</eventHookProvider>
-->
<!-- This will log all events to a separate file specified by the EVENT_APPENDER in logback.xml -->
<!--
<eventHookProvider>
<class>org.apache.nifi.registry.provider.hook.LoggingEventHookProvider</class>
</eventHookProvider>
-->
<extensionBundlePersistenceProvider>
<class>org.apache.nifi.registry.provider.extension.FileSystemBundlePersistenceProvider</class>
<property name="Extension Bundle Storage Directory">./extension_bundles</property>
</extensionBundlePersistenceProvider>
<!-- Example S3 Bundle Persistence Provider
- Requires nifi-registry-aws-assembly to be added to the classpath via a custom extension dir in nifi-registry.properties
Example: nifi.registry.extension.dir.aws=./ext/aws/lib
Where "./ext/aws/lib" contains the extracted contents of nifi-registry-aws-assembly
- "Region" - The name of the S3 region where the bucket exists
- "Bucket Name" - The name of an existing bucket to store extension bundles
- "Key Prefix" - An optional prefix that if specified will be added to the beginning of all S3 keys
- "Credentials Provider" - Indicates how credentials will be provided, must be a value of DEFAULT_CHAIN or STATIC
- DEFAULT_CHAIN will consider in order: Java system properties, environment variables, credential profiles (~/.aws/credentials)
- STATIC requires that "Access Key" and "Secret Access Key" be specified directly in this file
- "Access Key" - The access key to use when using STATIC credentials provider
- "Secret Access Key" - The secret access key to use when using STATIC credentials provider
- "Endpoint URL" - An optional URL that overrides the default AWS S3 endpoint URL.
Set this when using an AWS S3 API compatible service hosted at a different URL.
-->
<!--
<extensionBundlePersistenceProvider>
<class>org.apache.nifi.registry.aws.S3BundlePersistenceProvider</class>
<property name="Region">us-east-1</property>
<property name="Bucket Name">my-bundles</property>
<property name="Key Prefix"></property>
<property name="Credentials Provider">DEFAULT_CHAIN</property>
<property name="Access Key"></property>
<property name="Secret Access Key"></property>
<property name="Endpoint URL"></property>
</extensionBundlePersistenceProvider>
-->
</providers>
Nifi-registry.properties:
# web properties #
nifi.registry.web.war.directory=./lib
nifi.registry.web.http.host=
nifi.registry.web.http.port=
nifi.registry.web.https.host=DWH_Nifi_registry
nifi.registry.web.https.port=18443
nifi.registry.web.https.application.protocols=http/1.1
nifi.registry.web.jetty.working.directory=./work/jetty
nifi.registry.web.jetty.threads=200
nifi.registry.web.should.send.server.version=true
# security properties #
nifi.registry.security.keystore=/opt/certs/keystore.jks
nifi.registry.security.keystoreType=JKS
nifi.registry.security.keystorePasswd=IN7DYhm8+7E0iV3qxfC+MzdeZXLgm1k6ts5oNhk9hR4
nifi.registry.security.keyPasswd=IN7DYhm8+7E0iV3qxfC+MzdeZXLgm1k6ts5oNhk9hR4
nifi.registry.security.truststore=/opt/certs/truststore.jks
nifi.registry.security.truststoreType=JKS
nifi.registry.security.truststorePasswd=u9PZiAm3Sd/CFuPAdapGShHYLC0LOtwXV9d6FyrKfk4
nifi.registry.security.needClientAuth=
nifi.registry.security.authorizers.configuration.file=./conf/authorizers.xml
nifi.registry.security.authorizer=managed-authorizer
nifi.registry.security.identity.providers.configuration.file=./conf/identity-providers.xml
nifi.registry.security.identity.provider=
# sensitive property protection properties #
# nifi.registry.sensitive.props.additional.keys=
# providers properties #
nifi.registry.providers.configuration.file=./conf/providers.xml
# registry alias properties #
nifi.registry.registry.alias.configuration.file=./conf/registry-aliases.xml
# extensions working dir #
nifi.registry.extensions.working.directory=./work/extensions
# legacy database properties, used to migrate data from original DB to new DB below
# NOTE: Users upgrading from 0.1.0 should leave these populated, but new installs after 0.1.0 should leave these empty
nifi.registry.db.directory=
nifi.registry.db.url.append=
# database properties
nifi.registry.db.url=jdbc:h2:./database/nifi-registry-primary;AUTOCOMMIT=OFF;DB_CLOSE_ON_EXIT=FALSE;LOCK_MODE=3;LOCK_TIMEOUT=25000;WRITE_DELAY=0;AUTO_SERVER=FALSE
nifi.registry.db.driver.class=org.h2.Driver
nifi.registry.db.driver.directory=/opt/nifi-registry/nifi-registry-current/database
nifi.registry.db.username=nifireg
nifi.registry.db.password=nifireg
nifi.registry.db.maxConnections=5
nifi.registry.db.sql.debug=false
# extension directories #
# Each property beginning with "nifi.registry.extension.dir." will be treated as location for an extension,
# and a class loader will be created for each location, with the system class loader as the parent
#
#nifi.registry.extension.dir.1=/path/to/extension1
#nifi.registry.extension.dir.2=/path/to/extension2
nifi.registry.extension.dir.aws=./ext/aws/lib
# Identity Mapping Properties #
# These properties allow normalizing user identities such that identities coming from different identity providers
# (certificates, LDAP, Kerberos) can be treated the same internally in NiFi. The following example demonstrates normalizing
# DNs from certificates and principals from Kerberos into a common identity string:
#
# nifi.registry.security.identity.mapping.pattern.dn=^CN=(.*?), OU=(.*?), O=(.*?), L=(.*?), ST=(.*?), C=(.*?)$
# nifi.registry.security.identity.mapping.value.dn=$1@$2
# nifi.registry.security.identity.mapping.transform.dn=NONE
# nifi.registry.security.identity.mapping.pattern.kerb=^(.*?)/instance@(.*?)$
# nifi.registry.security.identity.mapping.value.kerb=$1@$2
# nifi.registry.security.identity.mapping.transform.kerb=UPPER
# Group Mapping Properties #
# These properties allow normalizing group names coming from external sources like LDAP. The following example
# lowercases any group name.
#
# nifi.registry.security.group.mapping.pattern.anygroup=^(.*)$
# nifi.registry.security.group.mapping.value.anygroup=$1
# nifi.registry.security.group.mapping.transform.anygroup=LOWER
# kerberos properties #
nifi.registry.kerberos.krb5.file=
nifi.registry.kerberos.spnego.principal=
nifi.registry.kerberos.spnego.keytab.location=
nifi.registry.kerberos.spnego.authentication.expiration=12 hours
# OIDC #
nifi.registry.security.user.oidc.discovery.url=
nifi.registry.security.user.oidc.connect.timeout=
nifi.registry.security.user.oidc.read.timeout=
nifi.registry.security.user.oidc.client.id=
nifi.registry.security.user.oidc.client.secret=
nifi.registry.security.user.oidc.preferred.jwsalgorithm=
# revision management #
# This feature should remain disabled until a future NiFi release that supports the revision API changes

