@zIfo
The default Single-User-Authorizer (Authorization) and Single-user-provider (authentication) are not intended for production use. These were added as of Apache NiFi 1.14 to facilitate a secure out-of-the-box NiFi startup for evaluation and testing.
They provide very basic authentication and authorization. Single user with complete and full access to everything. So by using this default provider you have no ability to support multiple users with very granular levels of authorization. The Token on the NiFi server side should expire after 8 hours. The JWT token stored in the browser may be around longer.
You did not share the version of Apache NiFi you have installed, but perhaps the following explains what you are experiencing :
https://issues.apache.org/jira/browse/NIFI-9049
But to support NiFi Clusters and NiFi multi-tenant authentication and authorization, you should move to a production ready authentication provider (LDAP commonly used) and authorizer (Managed authorizer commonly used).
If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt