Using security tokens in Micromine Geobank Data Views

Security tokens in Micromine Geobank data views provide very basic support for row-level security at the application level. A security token is a simple construct based on an integer value between 0 and 7. It is interpreted as a bit pattern, as follows:

Bit 0 Insert
Bit 1 Delete
Bit 2 Update

For example:

Binary Value Meaning
000 0 Read only
001 1 Insert only
010 2 Delete only
011 3 Delete/Insert only
100 4 Update only
101 5 Update/Insert
110 6 Update/Delete
111 7 Update/Delete/Insert

Below is a very basic example of a query returning security tokens. In this case the token is based on the Date Updated field for the data. Where the date last updated is greater than one day from the current date, the 0 token (Read Only) is applied, and if less than one day, then the 7 token (Update/Delete/Insert) applies.

Security tokens are identified in the column properties:

The following image shows the dataset in the Micromine Geobank data view, with the token included for demonstration purposes.

Where the token is equal to 7, you will be able to perform any type of edit on the row.

For the rows with a SECURITY_TOKEN value of 0, you will not be able to edit or delete that row or insert a new row.

The insert is more complicated, as a security token only applies to the current row. However, keep in mind that this is only at the application level. You could assume that the true row level security (at database level) would be enforced by triggers on the views.