You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Gilman (Jira)" <ji...@apache.org> on 2023/12/07 21:55:00 UTC

[jira] [Comment Edited] (NIFI-12481) UI error when listing registry clients and not authorized

    [ https://issues.apache.org/jira/browse/NIFI-12481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17794444#comment-17794444 ] 

Matt Gilman edited comment on NIFI-12481 at 12/7/23 9:54 PM:
-------------------------------------------------------------

The stack trace with non-minified source
{code:java}
Uncaught TypeError: Cannot read properties of undefined (reading 'name')
    at nf-flow-version.js?2.0.0-SNAPSHOT:203:40
    at Array.sort (<anonymous>)
    at Object.<anonymous> (nf-flow-version.js?2.0.0-SNAPSHOT:202:47)
    at c (jquery.min.js:2:28447)
    at Object.fireWith [as resolveWith] (jquery.min.js:2:29192)
    at l (jquery.min.js:2:80176)
    at XMLHttpRequest.<anonymous> (jquery.min.js:2:82630) {code}
Sounds like we want to filter out any registry clients where the user lacks read permissions. We technically already handle the case where there are no registry clients. We can update this to fall back to the existing behavior once the unauthorized registry clients have been filtered out.


was (Author: mcgilman):
The stack trace with non-minified source
{code:java}
Uncaught TypeError: Cannot read properties of undefined (reading 'name')
    at nf-flow-version.js?2.0.0-SNAPSHOT:203:40
    at Array.sort (<anonymous>)
    at Object.<anonymous> (nf-flow-version.js?2.0.0-SNAPSHOT:202:47)
    at c (jquery.min.js:2:28447)
    at Object.fireWith [as resolveWith] (jquery.min.js:2:29192)
    at l (jquery.min.js:2:80176)
    at XMLHttpRequest.<anonymous> (jquery.min.js:2:82630) {code}

> UI error when listing registry clients and not authorized
> ---------------------------------------------------------
>
>                 Key: NIFI-12481
>                 URL: https://issues.apache.org/jira/browse/NIFI-12481
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M1, 1.24.0
>            Reporter: Bryan Bende
>            Priority: Major
>
> Currently the authorization for registry clients is based on READ to /controller (this is a separate issue that should be addressed).
> Steps:
>  * Run a secure instance locally
>  * Use initial admin to create a registry client
>  * Remove initial admin from controller policies
>  * Create a new PG and choose Import from Registry
>  * Notice nothing happens
> UI Error in dev tools:
> {code:java}
> nf-canvas-all.js?2.0.0-SNAPSHOT:47 Uncaught TypeError: Cannot read properties of undefined (reading 'name')
>     at Object.<anonymous> (nf-canvas-all.js?2.0.0-SNAPSHOT:47:3678)
>     at Function.each (jquery.min.js:2:3003)
>     at b.each (jquery.each.js:1:96)
>     at Object.<anonymous> (nf-canvas-all.js?2.0.0-SNAPSHOT:47:3610)
>     at c (jquery.min.js:2:28447)
>     at Object.fireWith [as resolveWith] (jquery.min.js:2:29192)
>     at l (jquery.min.js:2:80176)
>     at XMLHttpRequest.<anonymous> (jquery.min.js:2:82630) {code}
> The issue is that the listing of registry clients will optionally fill in the DTO in the entity based on the user's permissions for the entity, but the permissions are always based on /controller, so if they don't have /controller the DTO will be null.
> The UI should still be able to load a screen with an empty list of registry clients.
> cc [~mcgilman] 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)