15.4.2. Example: WVUser

This scenario enables a WebView user, and uses it to demonstrate credentials and authorization.

Add the user

[Note]

This sections builds on the previous section. Please complete that example before continuing here.

  1. In the Remote Config app, go the Security configuration and add a new BuiltIn user called WVUser with the password Abcd1234.

  2. Click the Add TOTP Key button and Generate Random Key and OK. Do not add any roles right now. Click Apply.

  3. Configure your Authenticator app for WVUser.

Test Login Credentials and Authorization

  1. Start WebView and log in with WVUser. Use only the password string Abcd1234 without the TOTP code.

    The login will fail, due to invalid credentials.

  2. Now try logging in using the TOTP code.

    The login will fail again, this time due to lack of authorization.

  3. In the Security configuration, add the WVUser to roles WebView and AllDataReader. You will need to check the Show Available box to show them.

  4. Try logging in again. This time you should be able open WebView.

    We can now make one more test. Since we have assigned WVUser to the AllDataReader role, it should be possible to read data, but not write data back to the DataHub instance.

  5. Ensure that DataPid is still running, and load the Circular Gauges page.

  6. Switch to Run Mode and try adjusting the set points. You will see that you are not permitted to make any changes, because the WVUser does not have write permissions.

    To allow writing data, you can add WVUser to the AllDataWriter role or the AllDataFullAccess role.