- Denodo Platform
Denodo Platform - Advanced Privileges - secure access to data
7 minute read
Denodo Platform supports authentication and authorisation mechanisms based on users and roles, with permissions ranging from individual views through a whole schema to specific data products. Thanks to a sophisticated approach to rights and roles, the tool provides very fine-grained access down to the level of cells (it applies security based on both rows and columns), including the option of masking their content.

Josef Kotouček

Josef Kotouček
Summary
- Advanced Privileges in Denodo Platform make it possible to prevent a user or their role from accessing certain rows or columns, or to mask the content of a cell.
- On a sample employee view, we show how the same VQL query returns different content to each user depending on the roles assigned to them.
- Thanks to restrictions, there is no need to create copies of views for different users, and the functions shown are available from the basic Standard version.
From the point of view of access, we can distinguish two approaches in Denodo Platform. The first is the set of Advanced Privileges restrictions, where a user (either directly or through a role assigned to them) can be prevented from accessing certain rows or columns. Alternatively, the content of a specific cell can be "covered" in some way with a text string, a null value and so on. The second option is the use of so-called tags, which are part of Global Security Policies (not covered in this blog post). For both of the above options, setting up security based on rows or columns usually requires no complex coding, and access administrators can define it graphically, in terms close to natural language.
Theory is one thing, practice is often another. In several selected examples below, we will show how the Advanced Privileges mentioned above work in Denodo Platform, and that the implementation is not a convoluted construction that over time becomes hard to grasp and manage.
To show the full magic of rights and restrictions, all the sample examples are built on one and the same view, rt_dv_zamestnanci (employees). The content of this view (columns and rows) can be seen in the figure below.

Six different users will access this view according to their hierarchy or job description (the director, bookkeeper Miládka, HR manager Lída, secretary Věrka, current employee Luboš and new employee Jarda), to show clearly that although they all display the content through a VQL query from one source, the implementation of roles (the restrictions in them) affects the content returned.

At the same time, roles were created, namely column_hide, row_hide, hr, bookkeeping and office, which we assign in turn to the people above. Within each role we restricted the visibility of data as follows:
- column_hide – a user with this role does not see the content of selected columns
- row_hide – a user with this role does not see the content of selected rows
- hr – a user with this role has a modified view of the column mzda (salary)
- bookkeeping – a user with this role has a modified view of the columns email and telefon (phone)
- office – a user with this role sees only their own salary (they do not see the salaries of other employees)
Now we can show the restrictions in practice from the point of view of individual people. Since the director has no restrictions on data, their view is shown only once (in the first example). The other people and roles we combine as needed, to show the various options Denodo Platform offers for securing access to data.
Column restriction
In the first example, we show restricting data to a whole column. That is, if a user includes in their VQL query a column whose content their role forbids, the query returns nothing (it returns a message saying that they do not have access to that column 😀).

First, then, the director, who has no restrictions. We will not generate their output in the individual examples below, because we would be replicating the same content again and again.

And now the same view from the point of view of employee Luboš Houska, who has access only to the columns jméno (first name), příjmení (surname), hiearchie (hierarchy), pozice (position), telefon and email. If he selects only the "permitted" attributes, the output is as follows.

But when Luboš, with the role column_hide, generates the content with * …

… or includes in the VQL query a column restricted by the role (for example rodné číslo), he is told that he is not entitled to view the data for that column or columns.

Row restriction
The second example will simulate a restriction not on a column but on a row. Luboš appears again, but now with the role row_hide. It has visibility set only to the rows in which the column pozice contains the value zaměstnanec (employee) or vedoucí (manager).

So when Luboš runs the same VQL query as in the first example, the rows with the values ředitel (director), hr, účetní (bookkeeper) and sekretářka (secretary) in the column pozice "disappear" from the output.

Data masking
Denodo Platform can make not only whole rows or columns "inaccessible" but also mask the values in them as needed. We now show this in the third example. This time our bookkeeper Miládka and HR manager Lída appear.
First we generate the output for the bookkeeper. As a reminder, she was given the role bookkeeping with masking of the values in the columns telefon and email.

So that the masking is not the same in every column, the first and last two digits of the phone number are always visible. For the e-mail, the first and last letter of the (concatenated) first name and surname are visible, plus everything after the @.

Data masking combined with a column restriction
For HR manager Lída, by contrast, we hide the salaries of all employees. At the same time, we remove her access to the column hierarchie (again showing that both approaches can be combined). So when Lída has data generated for all the columns of the view rt_dv_zamestnanci, she gets a message saying which column she does not have access to.

When she limits the output to the columns she can access thanks to the role hr, she sees the values of everything except the column mzda.

Data masking combined with a user account
In the last example of setting up rights and restrictions, we bring in our secretary Věrka. Thanks to the sophisticated system of permissions and restrictions, you need not be afraid to "let" even her into Denodo Platform 😀. Since Věrka has completed basic training in working with Denodo Platform, her knowledge is perfectly sufficient for the task of inviting all employees by e-mail to a company team-building event.
From the HR manager, Věrka knows that the whole organisational structure is recorded in the view rt_dv_zamestnanci (this is where she finds the e-mail addresses of everyone concerned). So that the secretariat can look up basic information about employees if needed, a role named office was created.

Users who are given this role have access only to the view rt_dv_zamestnanci. And because this view also includes salary information, a restriction was set so that a user with the role office sees the salary only of themselves. So when our secretary runs the select, she sees only her own salary.

Since the task was to e-mail all employees, Věrka runs a simple query on the view, copies the e-mail addresses into her e-mail client and is done 🙂.
New employee Jarda Chuďas shows us that the above holds (that is, a user sees only their own salary). After the role office is assigned and the output generated, Jarda sees no one's salary (not even his own), because his details have not yet been entered into the view rt_dv_zamestnanci.

If I try to sum up the last example … Věrka completed her task without a "clone" of the view having to be created (for example because of salary amounts, which not every user should have access to). So she too used the same view … just handled with a further view restriction, so that she has access to the information (columns and rows) she really needs while not seeing data unrelated to her work.
Conclusion
The options above for preventing access to data or "hiding" data from users are part of the whole Denodo Platform product line. The functionality presented can be used from the basic Standard version. The highest variant, Enterprise Plus, also offers so-called tags. We will look at those in the next article.