GlideEncrypter API is Depricated - needs alternative
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 08:47 AM
Hello,
I am facing an issue, as the GlideEncrypter is deprecated, I need to modify an existing script in my instance but the alternatives are not working for me.
Reference article: Alternative Encryption Products to GlideEncrypter - Support and Troubleshooting (servicenow.com) - KB1320986
My original script Include:
- Labels:
-
Depricated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 04:50 AM
Hey @Bheemsagar , In case you have resolved the issue. Could you please share the results here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2024 12:28 AM
To resolve this, you can replace the GlideEncrypter with the GlideCryptoModule. Here’s how you can modify your script:
Steps to Replace GlideEncrypter:
Use GlideCryptoModule: Replace instances of GlideEncrypter with GlideCryptoModule.getModule(global.glide_encrypter_decrypter);. "global.glide_encrypter_decrypter" refers to the Cryptographic module name Ensure you have the Key Management role to create and manage cryptographic modules.
Create a Cryptographic Module: If you haven't already, create a cryptographic module in your instance that supports both encryption and decryption.
Module Access Policy: Ensure you set up a module access policy that allows your script to access the new cryptographic module.
Example script:
var FTVGlobalScopeUtils = Class.create();
FTVGlobalScopeUtils.prototype = {
initialize: function() {},
sleep: function(duration) {
gs.sleep(duration);
},
getDecryptedPassword: function(paramPassword) {
var cryptoModule = GlideCryptoModule.getModule(global.glide_encrypter_decrypter);
var decrString = cryptoModule.decrypt(paramPassword);
return decrString;
},
getEncryptedPassword: function(paramPassword) {
var cryptoModule = GlideCryptoModule.getModule(global.glide_encrypter_decrypter);
var encrString = cryptoModule.encrypt(paramPassword);
return encrString;
},
type: 'FTVGlobalScopeUtils'
};
Make sure the Cryptographic module supports encryption and decryption and Don't forget to create Module access Policy. Set the default module access policy value to “Track” and Mention your script table and Name in the policy.