logo

NJP

ServiceNow – Securing Fields – 5 Access Controls

Import · Jan 04, 2023 · video

foreign to part five in this series of securing fields in servicenow in this video we're going to take a look at access control rules and finally we're going to take a look at one of the most secure ways to restrict and secure data in the platform why is that because we're finally dealing with a server-side rule in servicenow we're going to restrict on the server side at the database level who has access to data in the platform so let's take a look at some examples okay so we're going to use the same example as in our previous videos where we want to hide the pin fill to make that or hidden and only writable for those that have the cars admin role so at the moment this user can see it and also the regular user has right access to this field as well okay so let me come back to servicenow Studio and let's take a look at the access control rules that we currently have so at the moment I've got a right Access Control rule for the entire table for the car's user role okay so if you've got that role you've got right access to all fields in that table now I've gone ahead and created another Access Control rule another right one for the pin field okay now so I have right access to this field you need the cars admin role so let me go ahead and save that and we'll go ahead and test it so the admin user here if I refresh this page there should be no change I should be able to write to every field here on the form if I come back to my car's user session here and refresh this page we can see now that the pin field is read only now if you recall we were able to do that with the client script with the UI policy what's the difference here well now there's absolutely no way known that I can change this field okay not on the form not on a list not if I look at the source code for the page if I come here and then come here we can see the pin field there and if I expand this little section here we can see that there's a value here as well I could double click on it I can maybe type in something else right there and hit enter okay you can see the the field value has changed there in the page let me close that now and I do have the option to update this record but let's see what happens okay the change was not successful didn't get a message but you can see here the pin is still 999 999 okay so that change I wasn't successful because we don't have right access to that field okay and you can see here just by double clicking on that field I'm not able to change it here either okay so let's do another little test let's come back to my admin user here go back to servicenow Studio I am going to open up the read Access Control rule that we currently have for this table and from that create a new Access Control rule another read Access Control rule just for the pen field okay and restrict that to the admin user okay so I will come here and change that to pin and then I'll just do an insert and stay here before I forget in other words create a new record and I'm just going to replace this snc internal role here which is the default one because I have the explicit roles plug-in activated on this instance that differentiates between internal and external users then you get the internal role appearing in ACLS by default and I'll put in here the cars admin role just like that and save that all right so now we can go ahead and test this okay so if we come to our admin user and refresh the page again there should be no change because I've got sufficient privileges if I come to my other user however if I stay in the list we've got the pin field here if I just refresh this list here that pin field is on now okay precisely because of that access control rule if I open up a record here the pin field is also gone so it doesn't matter what client scripts or UI policies or views I've got access to that access control rule server side that will be executed evaluated before anything else it's a server-side rule again there's no way I can get access to that field I could try could come here and right click and go to inspect but we can see in the source code here in the HTML code uh there's no pin field here at all okay even after this div here there's nothing else after that so in other words that field has not been retrieved from the server because I do not have access to it so that's the end of this little demonstration and just to highlight in case you didn't already know access control rules are what you need if you want data security if you want to secure fields in servicenow don't use client scripts don't use UI policies don't use view rules use them certainly for usability absolutely but not if you really want to guarantee Security in the platform if you want to determine who can see who can change data in the platform you need access control rules okay so thanks for watching in the next two videos we're going to take a look at another couple of methods for extending the data security model we're going to look at data anonymization in the next video and then after that we're going to look at column level encryption in other words to encrypt data for specific Fields so stay tuned for those

View original source

https://www.youtube.com/watch?v=jjaaNE3jlWE