All articles
  • Denodo Platform

Denodo Platform - Global Security Policies

5 minute read

Besides Advanced Privileges (covered in the previous blog post, Denodo Platform - Advanced Privileges), Denodo Platform implements security policies through its Global Security Policies module (GSP for short), which is based on semantics that use tags instead of data artefacts. The tags are abstracted from the physical data sources beneath them, are easier to manage and are less prone to errors.

Josef Kotouček

Summary

  • Using two views from Oracle and PostgreSQL, we show how Global Security Policies in Denodo Platform mask bank account numbers with a single tag.
  • The bankovni_ucet tag first marks the columns with account numbers, and a policy for the tagy role then replaces their values with asterisks.
  • Advanced Privileges can be combined with GSP, so a view restriction based on the country where the user is currently working shows them only the rows from that country.

We will show how to set up GSP with an example in which we treat users' bank account numbers as "sensitive" data and want to mask them. Since bank account numbers can appear in several views (in our example, two), we use a tag, so that we do not have to configure each column and its security separately (in the second view the number was even split into two columns, yet we implement a single tag). This saves us time, and the tags also make the system of rights and restrictions clearer.

First, for an overview, here are the two views, zakaznici_auta (car customers) and zakaznici_motorky (motorcycle customers). Each view comes from a different source (Oracle and PostgreSQL), yet there is no problem in applying one tag (one shared security policy) to them.

Result of a query on the zakaznici_auta view in Denodo: customer names, countries and bank account numbers
The zakaznici_auta view
Result of a query on the zakaznici_motorky view in Denodo: customer names, countries, account number and bank code in two columns
The zakaznici_motorky view

To save ourselves work later on, so that we do not have to set up (assign) the tag for each user, we apply the tag to a role named tagy. It is created in the same way as in the post Denodo Platform - Advanced Privileges - secure access to data (nothing changes here).

Creating the bankovni_ucet tag

Creating and implementing a tag has two stages. First, the tag itself has to be created and assigned the views from which we then choose specific columns. The second step is to choose, from the predefined options, what the tag should do with those columns, for example replace text with asterisks or numbers with a null value.

Let us create the tag. We create a new tag with File > New > Tag and on the first tab we only fill in the name (and, optionally, a description).

Denodo, new tag form with the name and a description saying that the tag hides bank account numbers

Next we select the views and their attributes.

Denodo, Tagged Columns tab of the bankovni_ucet tag with the columns cislo_bank_uctu, cislo_uctu and kod_banka of both views

Applying the tag

Once the tag has been created, we can move straight on to the second step. We fill in a name and add a note that should make clear what the GSP will do. Then we select the role tagy. In the following selection we use the tag we have created, bankovni_ucet, because it contains the views and attributes that the tag affects.

Denodo, form for the new global security policy bankovni_ucet_zakryt for the role tagy, the tag bankovni_ucet and the database public

We assign the data lake (if we have several identical views in different databases, nothing is easier than adding the full list and again using the power of one implementation across databases, instead of configuring everything as many times as there are databases) and select the tag bankovni_ucet itself. After that we only define what should happen to the values in the columns.

Denodo, policy restriction: mask columns with the bankovni_ucet tag and replace the text with asterisks

We can check the overall setup in the GSP overview.

Denodo, overview of Global security policies with the bankovni_ucet_zakryt policy enabled and in the Valid state

The effect of the bankovni_ucet tag on displayed data

All that remains is to test whether the tag works correctly and covers all the data relating to bank accounts. We deliberately combine the two views with a union, to show how the data masking behaves in this case too. Apart from the different number of asterisks (*), which logically results from concatenating two columns (in the view zakaznici_motorky the number of * can easily be handled with a function), the output is what we set out to achieve.

VQL Shell in Denodo, the union of both views returns 14 rows and the account numbers are replaced with asterisks

Advanced Privileges and GSP - can they work together?

If you have read both articles on the security of the data we hold in the data lake, you will surely have wondered whether Advanced Privileges and GSP can be combined. Yes, they can. For the last example we use everything prepared earlier (the role tagy and the views zakaznici_auta and zakaznici_motorky). In addition, we create one more view, uzivatel_zeme, which pairs users with the country they are currently working in. The country is decisive for us because it determines how the content of the customer views is filtered. The aim is therefore to hide the rows for countries in which the user generating the data is not currently working.

If you look at the figure above, after logging in our user Luboš Houska sees all the rows of both views (with the content of the bank account columns covered by the tag). We use the column zeme (country) and set up Advanced Privileges so that the country he is currently working in determines the rows he sees in his output. First, though, we have to create the new view uzivatel_zeme, in which we state the country for each user.

VQL Shell in Denodo, query on the uzivatel_zeme view: the user luboshouska has the country Slovensko

Next we modify the role tagy by adding a view restriction on the column zeme of both customer views.

Denodo, Assign restrictions dialog with a condition on the zeme column based on the logged-in user's country and the Reject row action

Because Luboš is on a business trip in Slovakia, running a select on both views shows only the rows with Slovensko (Slovakia) in the zeme column.

VQL Shell in Denodo, the union of both views returns only two rows with the country Slovensko and hidden account numbers

But when we update the value in the view uzivatel_zeme (changing Slovensko to Česká republika, the Czech Republic) …

VQL Shell in Denodo, update of the uzivatel_zeme view changes the country of the user luboshouska to Česká republika

… the content of the returned data changes the next time the output is generated.

VQL Shell in Denodo, the union of both views now returns six rows with the country Česká republika and hidden account numbers

Conclusion

With a simple example we have shown that Advanced Privileges and GSP can be combined. We can also use the internal functions of Denodo Platform to extend the concept of roles and data security even further.

Get in touch

A few sentences about what you are working on will help us prepare.

We describe how we handle personal data in our privacy policy.

You can also call us on +420 228 227 418 or email us at info@datera.cz.