Solved

How to authorize column based?

  • 24 August 2020
  • 4 replies
  • 159 views

Userlevel 4
Badge +11

How can I authorize a role column based? In the Software Factory you assign rights on a table.

Read rights on the table "employee”

 

 

In the column rights you can set or the fields are visible in the GUI. This doesn't change the user right to consult the data from the column directly on the database. 

Column employee_status acces type "Hidden”  

The user still can run the query in the SQL database and select for example the colum employee_status. The permission should be denied for executing this action. 

Select statement in SSMS

 

 

icon

Best answer by Arjan Sollie 22 October 2020, 09:55

View original

4 replies

Userlevel 7
Badge +23

Hey Dennis,

In IAM there's a task to Execute user rights on the database. In the screen User groups (Gebruikersgroepen) you can select the task and export the SQL to run on the Database or just run it directly on it. You can select to export or execute everything or only a single user group or single user rights. This way the authorization can be placed on the database too. If you want to export the roles and such, be sure to name a location and give it a name.sql (unlike in my picture)

The script will create the users if they don’t exists including the roles and user groups and places the users in the correct user groups with the correct roles assigned. Now the users can only access what is stated in IAM.

Give it a go :wink:

If you were to use Indicium and don’t allow user access or connect to the database server this would have already been taking care off since Indicium will do all the data access for the user.

Hope this helps you further!

Kind regards,
Mark Jongeling

Userlevel 7
Badge +23

Hi Dennis,

The only part I was missing in my previous reply is the part where you can create the role rights onto the database. This can be done by going into IAM and navigating to Project → Project versions → Roles and clicking this task:
 

You can make a (sub-)selection of roles to roll out to your database. Then with the information from my previous reply, you can create users and user groups and bound the roles to the user groups.

Kind regards,
Mark Jongeling

Userlevel 4
Badge +13

Dennis,

As far as I am aware of assigning rights on a specific column is not a standard SQL server feature. Therefor the role scripts, produced by IAM, does not contain column rights, only table rights. This is one the reasons TW decided to set up Indicium.

On the internet I did find some workarounds for setting the rights for a specific column. I do not know if these are recommended, therefor I will not redirect you towards this.  

Userlevel 7
Badge +23

After some research I can confirm what Arjan said. From the available task in IAM, columns rights will not be granted or revoked. Access is currently given on table level meaning, if an user only may see 1 columns, the whole table will be available for the user through SQL server querying. Of course, in the application the given rights in IAM apply.

Feel free to create a topic in the Ideation section.

Kind regards,
Mark Jongeling

Reply