HPE Morpheus Enterprise
1838580 Members
3301 Online
110128 Solutions
New Discussion

HTTP routing in plugin

 
kwc1
Visitor

HTTP routing in plugin

We are trying to develop our own custom plugin, and we are facing some issues that might be related to permissions.

We believe we have adhered to the official documentation and examined several plugin examples utilizing the PluginController approach. However, we are still having difficulty getting it to function properly, despite the controller being correctly registered to the plugin. The routes have also been defined.

When testing with JavaScript, we encounter either a 403 or 404 error, depending on whether we include the 'plugin' prefix in the route.

The documentation lacks guidance on how to execute the fetch on the front end, so we are testing both methods. Furthermore, it indicates that the routes are constructed without the 'plugin' prefix in the backend.

Morpheus Plugin Documentation

We suspect this may be a permission issue. We can see that a new permission has been created in Morpheus, but it appears to be unavailable in the AIS tenant. Our plugin is installed in the master tenant since installation in the AIS tenant is not permitted.

The issue might be because of the permission not appearing in the sub tenant.

The plugin is uploaded (installed) in the master tenant. Seems like it is not possible to upload it to other sub tenants.

As the permission is not appearing in the sub-tenant, we think that this is causing the error 403 (forbidden).

We could only see our plugin permission in the master tenant. And that permission is specified in the getRoutes method within the controller.

Any ideas?

 

Thanks in advance.