Client security for module developers

As I wrote in the named queries post, 7.9.4 is about security, and this includes the ability to restrict when clients can do things that mutate the state of the gateway. This is done by enabling access based on the client’s roles and zones (or disabling access altogether) for about a dozen different areas.

As a module author, you can opt in to this security system. Here’s what you need to know:

  • Mark gateway functions or classes that need protection with the new @ClientProtected(id=“myId”) annotation. The gateway will then allow access to that function only if the client has the proper zones and roles.
  • In your designer hook, override createPermissionKeys() to return a map of your permission id’s (“myId” in this case) and their associated bundle key.
  • Your properties file should have two entries for this bundle key:
    myBundleKey.Name=…
    myBundleKey.Tooltip=…
  • Designer module hooks that don’t subclass AbstractDesignerModuleHook will need to implement createPermissionKeys() even if permission keys are not used. Returning null is fine. If you subclass AbstractDesignerModuleHook, there’s nothing additional you need to do if you’re not opting in to the client permission system.
1 Like

Could you please post a link for the latest SDK (7.9.4) javadoc

We don’t usually build the Javadocs for the SDK until release. Was there something particular I can help you with?

I’ve built & published javadocs off of 7.9.4-beta1. A zip is available here: http://files.inductiveautomation.com/sdk/javadoc/ignition79/ignition-javadoc-7.9.4-beta1.zip

The online docs are in the process of being published, and the index will be available here when the upload is complete:
http://files.inductiveautomation.com/sdk/javadoc/ignition79/794-beta1/index.html

1 Like

Thanks, I believe the last javadoc available was 7.9.0.
I’m looking a way to have the list of available remote tag provider, and to create a new one !

1 Like

Thank you @PerryAJ, that’s very useful. I am wondering, could you possibly build and publish javadocs off of 7.9.3? Thank you!

Sure. They’re going to be nearly identical to 7.9.0, especially from a public api perspective (7.9.4 has some non-breaking changes due to the new security features).

You can download the zip of docs from here. The online docs are in the process of uploading. When done, should be viewable from this index.

1 Like