Skip to main content
10-Marble
Jan 5, 2024 3:11 PM UTC
Solved

Run service in reduced user role

If I am an Administrator is it possible to run a service temporarily on a Thing in a user role that is less privileged?

 

I am working upon a use case wherein the user is not an Administrator. For this I need to keep removing myself from the Administrator's group, check if the mashup/services work, and if they don't request other team member to add myself back to the Administrators group and keep working. I would like to avoid this.

 

Scenario is:

 

1. User Jack is an Administrator

2. When service GetData on a Thing runs it has to do it in a user role which is less privileged than an Administrator

3. Jack's user roles should not be affected in any way if this service runs.

 

Thanks,

Ashish Tamhane 

VelkumarAnswer
19-Tanzanite
Jan 9, 2024 4:56 AM UTC

Hi @ashishtamhane 

 

You can create a dummy user in Thingworx manually and assign the required role. Create an appkey for the user and test the mashup using a dummy user appkey.

 

To check service permission/privilege, please make a REST API call to Thingworx using a dummy user appKey -Use REST API to Access ThingWorx Part 1 - PTC Community

 

Refer to the below article:

 

To access Mashup using AppKey - Article - CS227935 - Accessing Mashups using Application Key (appKey) Authentication in ThingWorx (ptc.com)

 

To enable AppKey Authentication with SSO - Article - CS279189 - How to Configure SSO Authentication and REST API Application Key Authentication Simultaneously in ThingWorx Platform (ptc.com)

 

/VR

3 replies

19-Tanzanite
Jan 8, 2024 8:54 AM UTC

No, there's no impersonation available directly, except the case when you use a Timer/Scheduler, if you want to rely 100% of the platform features.

Looking at your use-case though, this is typically done by having a Test User with the relevant rights running in a private browser window.

Can you ask your team member/s to create such an user for this purpose?

Translate
10-Marble
Jan 8, 2024 9:08 AM UTC

Hi VladimirRosu,

 

Thanks for your response. I  forgot to mention that we are using SSO so would this be possible?

 

Thanks,

Ashish

Translate
Velkumar19-TanzaniteAnswer
19-Tanzanite
Jan 9, 2024 4:56 AM UTC

Hi @ashishtamhane 

 

You can create a dummy user in Thingworx manually and assign the required role. Create an appkey for the user and test the mashup using a dummy user appkey.

 

To check service permission/privilege, please make a REST API call to Thingworx using a dummy user appKey -Use REST API to Access ThingWorx Part 1 - PTC Community

 

Refer to the below article:

 

To access Mashup using AppKey - Article - CS227935 - Accessing Mashups using Application Key (appKey) Authentication in ThingWorx (ptc.com)

 

To enable AppKey Authentication with SSO - Article - CS279189 - How to Configure SSO Authentication and REST API Application Key Authentication Simultaneously in ThingWorx Platform (ptc.com)

 

/VR

Translate