Anyone who tried storing password in a NetSuite cu...
# suitescript
l
Anyone who tried storing password in a NetSuite custom record or company preferences? How did you go about encrypting it so users won't see the plain text value? Haven't had any luck with using the "password" type of field so far. 🤔 Authentication on the third-party is failing because the value retrieved is the base64 equivalent.
k
Oh goodness. Why are you storing passwords in a custom record? So they can be used in script? Are users entering their own? If so I would probably make the field not searchable and only visible within user interface to the right user with a workflow/user even script. However all any of that would require to get past is an admin account and knowledge it was there. Not a big fan of that security layout.
l
It's more of the flexibility that will allow Admins to update the password on a record, in case the other party changes it. So instead of changing it on the code somewhere, whoever the Admin is can update the password on a record for the script to pick up.
k
Can you not unencrypt in the script before sending to the thirdparty.
using SS2.0 Crypto?
s
@karlenigma But I am not sure if that works when you use ss2.0
l
@karlenigma I am reading the N/crypto module too but from what I understand it's more about encrypting the data than decrypting it, unless someone else had experience in it.
k
if the password field you have created is base64 surely standard JS can decrypt.
k
I'd be much more inclined to use a parameter field on the script then.