How To Pass Sensitive Data Via GlideAjax

Sometimes the data that you’re passing back from the client is sensitive data which nobody should be able to read (including administrators).

One particular instance for this is if you are passing a password back to do validation.

Also, sometimes some GlideAjax’s you just do so many times, that it’ll clog up the logs and possibly cause performance issues with the constant writing.

The logs I am talking about here are the Apache Tomcat logs (https://instance.service-now.com/channel.do?sysparm_channel=logtail)

Give it a go, have one window open with the logs and in another window run a GlideAjax and watch the information that’s written to the logs.

There’s a very simple parameter which you can use to prevent this logging:

var ajax = new GlideAjax(‘glideajaxname’);

ajax.addParam(‘sysparm_silent_request’, ‘true’);

Adding that one parameter to your ajax calls will prevent it from being logged to the logs, reducing the number of writes to the disk (always good) but also securing and hiding bits of data which is being passed back.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s