diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml index 902483540d..4a2637e425 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml @@ -78,7 +78,7 @@ The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, - definitions of the expected input and output, potential response codes, and the authorities required + definitions of the expected input and output, potential response codes, and the authorizations required to invoke each service. diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java index aa057fefff..aeffa89cdb 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ApplicationResource.java @@ -95,7 +95,7 @@ public abstract class ApplicationResource { public static final String PROXY_PORT_HTTP_HEADER = "X-ProxyPort"; public static final String PROXY_CONTEXT_PATH_HTTP_HEADER = "X-ProxyContextPath"; - protected static final String NON_GUARANTEED_ENDPOINT = "Note: This endpoint is subject to change as the NiFi and it's REST API evolve."; + protected static final String NON_GUARANTEED_ENDPOINT = "Note: This endpoint is subject to change as NiFi and it's REST API evolve."; private static final Logger logger = LoggerFactory.getLogger(ApplicationResource.class); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java index 0ececa1273..d9055c93b6 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java @@ -320,7 +320,8 @@ public class ProcessGroupResource extends ApplicationResource { value = "Deletes a process group", response = ProcessGroupEntity.class, authorizations = { - @Authorization(value = "Write - /process-groups/{uuid}", type = "") + @Authorization(value = "Write - /process-groups/{uuid}", type = ""), + @Authorization(value = "Write - /{component-type}/{uuid} - For all encapsulated components", type = "") } ) @ApiResponses( @@ -1638,7 +1639,7 @@ public class ProcessGroupResource extends ApplicationResource { response = FlowSnippetEntity.class, authorizations = { @Authorization(value = "Write - /process-groups/{uuid}", type = ""), - @Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet", type = "") + @Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet and their descendant components", type = "") } ) @ApiResponses( @@ -1826,7 +1827,7 @@ public class ProcessGroupResource extends ApplicationResource { response = TemplateEntity.class, authorizations = { @Authorization(value = "Write - /process-groups/{uuid}", type = ""), - @Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet", type = "") + @Authorization(value = "Read - /{component-type}/{uuid} - For each component in the snippet and their descendant components", type = "") } ) @ApiResponses( diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java index eab59dba90..5c34be13b9 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/SnippetResource.java @@ -104,7 +104,7 @@ public class SnippetResource extends ApplicationResource { value = "Creates a snippet", response = SnippetEntity.class, authorizations = { - @Authorization(value = "Read - /{component-type}/{uuid} - For each component in the Snippet", type = "") + @Authorization(value = "Read or Write - /{component-type}/{uuid} - For every component (all Read or all Write) in the Snippet and their descendant components", type = "") } ) @ApiResponses( @@ -188,7 +188,7 @@ public class SnippetResource extends ApplicationResource { response = SnippetEntity.class, authorizations = { @Authorization(value = "Write Process Group - /process-groups/{uuid}", type = ""), - @Authorization(value = "Write - /{component-type}/{uuid} - For each component in the Snippet", type = "") + @Authorization(value = "Write - /{component-type}/{uuid} - For each component in the Snippet and their descendant components", type = "") } ) @ApiResponses( @@ -267,7 +267,7 @@ public class SnippetResource extends ApplicationResource { value = "Deletes the components in a snippet and drops the snippet", response = SnippetEntity.class, authorizations = { - @Authorization(value = "Write - /{component-type}/{uuid} - For each component in the Snippet", type = "") + @Authorization(value = "Write - /{component-type}/{uuid} - For each component in the Snippet and their descendant components", type = "") } ) @ApiResponses( diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs index 2e9347eb88..1dfd484eba 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/resources/templates/index.html.hbs @@ -425,31 +425,40 @@ var endpoints = $(this); var path = endpoints.find('div.path').text(); - if (term === null || path.indexOf(term) > 0) { + if (term === null || path.indexOf(term) === 0) { endpoints.detach().appendTo(container); } }); }; // organize the endpoints - organizeEndpoints('cluster', $('#cluster-endpoints')); - organizeEndpoints('provenance', $('#provenance-endpoints')); - organizeEndpoints('user', $('#user-endpoints')); - organizeEndpoints('controller-services', $('#controller-service-endpoints')); - organizeEndpoints('reporting-tasks', $('#reporting-task-endpoints')); - organizeEndpoints('connections', $('#connection-endpoints')); - organizeEndpoints('processors', $('#processor-endpoints')); - organizeEndpoints('funnels', $('#funnel-endpoints')); - organizeEndpoints('remote-process-groups', $('#remote-process-group-endpoints')); - organizeEndpoints('input-ports', $('#input-port-endpoints')); - organizeEndpoints('output-ports', $('#output-port-endpoints')); - organizeEndpoints('labels', $('#label-endpoints')); - organizeEndpoints('process-groups', $('#process-group-endpoints')); - organizeEndpoints('history', $('#history-endpoints')); - organizeEndpoints('access', $('#access-endpoints')); + organizeEndpoints('/process-groups', $('#process-group-endpoints')); + organizeEndpoints('/controller-services', $('#controller-service-endpoints')); + organizeEndpoints('/reporting-tasks', $('#reporting-task-endpoints')); + organizeEndpoints('/counters', $('#counter-endpoints')); + organizeEndpoints('/controller', $('#controller-endpoints')); + organizeEndpoints('/connections', $('#connection-endpoints')); + organizeEndpoints('/flowfile-queue', $('#flowfile-queue-endpoints')); + organizeEndpoints('/processors', $('#processor-endpoints')); + organizeEndpoints('/funnels', $('#funnel-endpoints')); + organizeEndpoints('/remote-process-groups', $('#remote-process-group-endpoints')); + organizeEndpoints('/input-ports', $('#input-port-endpoints')); + organizeEndpoints('/output-ports', $('#output-port-endpoints')); + organizeEndpoints('/labels', $('#label-endpoints')); + organizeEndpoints('/access', $('#access-endpoints')); + organizeEndpoints('/flow', $('#flow-endpoints')); + organizeEndpoints('/provenance-events', $('#provenance-event-endpoints')); + organizeEndpoints('/provenance', $('#provenance-endpoints')); + organizeEndpoints('/tenants', $('#tenant-endpoints')); + organizeEndpoints('/data-transfer', $('#data-transfer-endpoints')); + organizeEndpoints('/policies', $('#policy-endpoints')); + organizeEndpoints('/resources', $('#resource-endpoints')); + organizeEndpoints('/site-to-site', $('#site-to-site-endpoints')); + organizeEndpoints('/snippets', $('#snippet-endpoints')); + organizeEndpoints('/system', $('#system-diagnostic-endpoints')); + organizeEndpoints('/templates', $('#template-endpoints')); organizeEndpoints(null, $('#controller-endpoints')); - - + // handle expanding/collapsing the sections $('div.section-header > div.title').on('click', function() { $(this).parent('div.section-header').next('div.section-endpoints').slideToggle(); @@ -477,15 +486,47 @@
-
Get controller configuration, Search the flow, Manage templates, System diagnostics
+
Get controller configuration, Manage the cluster, Create reporting tasks
+
+
+ +
Manage controller services, Update controller service references
+
+
+ +
+
+
+ +
Manage reporting tasks
+
+
+ +
+
+
+ +
Get counters, Reset counters
+
+
+ +
+
+
+ +
Get the data flow, Obtain component status, Query history
+
+
+ +
-
Get the flow, Instantiate a template, Manage sub groups, Monitor component status
+
Create components, Instantiate a template, Upload a template
@@ -506,6 +547,14 @@
+
+
+ +
View queue contents, Download flowfile content, Empty queue
+
+
+ +
@@ -546,53 +595,85 @@
-
-
- -
Manage controller services, Update controller service references
-
-
- -
-
-
- -
Manage reporting tasks
-
-
- -
-
-
- -
View node status, Disconnect nodes, Aggregate component status
-
-
- -
-
Query provenance, Search event lineage, Download content, Replay
+
Query provenance, Search event lineage
- -
View flow history, Purge flow history
+ +
Download content, Replay
- +
- -
Update user access, revoke accounts, get account details, Group users
+ +
Add users and group, Group users
- + +
+
+
+ +
Get policies, Create policies
+
+
+ +
+
+
+ +
Get resources
+
+
+ +
+
+
+ +
Get available ports, Get peers
+
+
+ +
+
+
+ +
Send data, Receive data
+
+
+ +
+
+
+ +
Create a snippet, Move a snippet, Delete a snippet
+
+
+ +
+
+
+ +
Download a template, Delete a template
+
+
+ +
+
+
+ +
Get system diagnostics
+
+
+