The screenshot below was taken after successfully logging into NiFi. Although it remains functional, NiFi erroneously indicates that the user isn't logged in.
Because NiFi is primarily used by engineers for development, this isn't a user facing issue. It would be nice to resolve so as to avoid confusion amongst the dev team, however. The complexity of NiFi's security configuration likely makes a true fix to the problem much more costly than it's worth. However, simply hiding the relevant part of the UI shown at https://github.com/apache/nifi/blob/fe68d43e1dfd00807ccbc43fd43bff73d49de26c/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/controllers/nf-ng-canvas-header-controller.js#L75 would perhaps take a day or two and therefore be worthwhile.
NiFi no longer shows the user name, nor "Anonymous user" string, in its upper righthand corner.
If the Core team would like it, the tweak has been contributed to the project.