
RicardoPereira asked a question.
Hello everyone,
We are working on an external API that will request services on the Portal. So far despite some difficulties we have done well, but we have come up against a problem.
Some services are exclusive and should not be shown in our consultation according to the filter definitions.
I looked in several places and I didn't find anything that at least tells me that the service has restricted permission.
I searched the database for this information ...
Has anyone done this type of custumisation and gone through it?
Hi @Ricardo Rerison,
I presume you are posting about functionality in Snow Automation Platform (AP), part of the Productivity Optimiser?
If you are invoking service requests using API REST methods, you will need to make sure that the service account used is set up with sufficient roles (RBAC) for access to the required service(s). New roles can be created in:
AP --> Administer --> Authorisation Admin
Within AP you can specify role based access control at the service level, you can do this by navigating to:
AP --> Administer --> Service Admin --> <Service Name> --> Permissions (tab)
Once you are on the permission tab you can add roles that have access or roles that are restricted from selecting the specific service.
Okay, let me try to be clearer.
How our process works:
We search for all the software that are available on the portal, with the query:
SELECT DISTINCT
G.Id,
G.NAME as SOFTWARE
FROM tblApplicationStoreData A
LEFT JOIN tblCID_cf_a_1 AND ON E.ElementID = A.ApplicationID
LEFT JOIN [SnowAutomationPlatformDomain]. [DBO]. [Services] AS G ON G.VendorItemId = A.ApplicationID
WHERE A.Status = 1 and PublishLevel = 3 AND G.Status = 0
The problem with this query is that it brings all the services and I needed to know which of these services is restricted and if necessary,
pass the user as a parameter to return only the services he has access to.
Then we pass the service ID to our API that will make the request...
=)
Hi, if you are using SQL for this task, you should review the SQL "*authorization*" VIEWS in the "*Azman" database, this is the authorization db in your Snow Automation Platform environment. If you need help constructing this SQL query please reach out to your Snow account manager who will be able to assist you by booking time with Snow technical services.
Good morning,
But do these service restriction permissions stay in that separate bank?
Could you point me where exactly?
So that I can try to do something before I trigger the account manager.
Because what I need to know in theory is simple, (What are the service restrictions and if determining user can see it)
Hi @Ricardo Rerison ,
As you say, this is simple in theory, but the view (Permissions on a service) you're looking for is located within the SnowAutomationPlatformAzman database, and the content of this database is not in clear text and meant to be used.
There is no supported way to check this, but I would recommend using the API instead.
Again, this is not a supported function, but the site uses this endpoint to retrieve the permissions, where you need to set the ID (3 in this example) of the service, and then parse the returned JSON -> http://<<your AP>>/API/Service/3/AuthorizationRole/read
Hope this helps :)
//Oskar
Thanks, this gives me a very clear view of how to use the database.
Hugs.