User Authentication and Roles

Posted by Giorgi Kviraia on 04-Sep-2017 07:12

Hello, all.

Is there any way to authenticate Service backend (DS) to have 2 users? for example, one user can see everything, all modules, have all roles, CRUD and another user who can only Read and see the modules which you allow to see?

For example, i'm suing Auth form Basic-local, where I got user and password, which is allowed to do everything, i need the second user which can do the things I allow him/her to do. 

Any good tutorial will be much appreciated. Before posting hear i have read almost everything in Progress documentation. . 

All Replies

Posted by Irfan on 04-Sep-2017 07:48

Hi Giorgi,

The DataServices used by kendoUI builder are running in the PASOE server. In PASOE, we use Spring Security for Authentication and Authorization.

For your question regarding Authorization, you can modify the authorization roles in your <PASOE Instance>/webapps/<webapp>/oeablSecurity.csv file.

Lets consider authorization for the following URL's

localhost:8810/.../getcustomer

localhost:8810/.../createcustomer

Now if you wish to all users to allow access to "getcustomer" URI and only admin user to perform "createcustomer" then your URI would look like this for form-local authentication

"/rest/SportsService/getcustomer","*","hasAnyRole('ROLE_PSCUser')"

"/rest/SportsService/createcustomer","*","hasAnyRole('ROLE_PSCAdmin')"

With this change PSCUser,PSCAdmin & PSCDebug can access "getcustomer" and only PSCAdmin can access "createcustomer" service.

You can look at the role definitions for basic/form local in  <PASOE Instance>/webapps/<webapp>/users.properties file.

Posted by Giorgi Kviraia on 04-Sep-2017 10:49

i was thinking about something simillar. but had no idea how to achieve it. ill give a try and will be back to you/ thanks for your feedback

Posted by Giorgi Kviraia on 15-Sep-2017 07:27

Hello again, i have followed your advice, it does not worked for me, at list i did something wrong, can you provide me with more information please? on the back end i have 2 users, for now they does same thing, i want to gave role to both of them, one can be admin another user, amdin has write to do crud operations and user can onluy read from database, even if this is possible i could not find any information in documentation how to tranposrt users in front end and to give them right's for loading components seperatly, i wish to know how to get users front end, before that they should have roles backend.

This thread is closed