All articles
  • 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

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.

The sample view rt_dv_zamestnanci with eleven employees, their positions, personal identification numbers, contacts and salaries

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.

User management in Denodo with five sample users and their roles office, hr, column_hide and bookkeeping

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 😀).

The Assign column privileges dialog in Denodo, where the role column_hide does not have the columns rodné číslo, mzda and měna ticked
The column_hide role and restrictions on the columns rodné číslo (personal identification number), mzda (salary) and měna (currency).

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.

VQL Shell in Denodo with the query select * from rt_dv_zamestnanci, which returns all rows and columns to the director

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.

VQL Shell in Denodo, where a user with the role column_hide selects only the permitted columns and gets all eleven rows

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

VQL Shell in Denodo with a select * query and a message that the user does not have permission for the columns měna, rodné číslo and mzda

… 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.

VQL Shell in Denodo with a query on the column rodné číslo and a message about missing permission

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).

The Assign restrictions dialog in Denodo with a condition on the positions zaměstnanec and vedoucí and the Reject row action
The column_hide role and the restriction by position.

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.

VQL Shell in Denodo, where the query returns to a user with the role row_hide only seven rows with the positions zaměstnanec and vedoucí

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.

The Custom masking expression dialog in Denodo with an expression that masks the email column with dots

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 @.

VQL Shell in Denodo with the output for the bookkeeper, where phone numbers and e-mails are masked with asterisks and dots

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.

VQL Shell in Denodo with a select * query and a message that the user does not have permission for the column hierarchie

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.

VQL Shell in Denodo with a query on first name, surname, position and salary, where all salaries are empty for the hr role

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.

The Assign restrictions dialog in Denodo with a condition on the column mzda based on the logged-in user and the masking action
The condition (restricting the visibility of data) on the column mzda in the office role, depending on the user

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.

VQL Shell in Denodo with the output for the secretary, where the salary is visible only in her own row

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.

VQL Shell in Denodo with the output for the new employee, where no salary is visible

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.

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.