user93865
11/18/2024, 4:21 PMFor example, credentials entered by a user in a form field created with Form.addCredentialField can be encrypted server-side using a key generated by https.createSecretKey. This encrypted data is then securely stored within NetSuite, for instance, in a custom record or another secure storage mechanism. When the need arises to use these credentials, https.createSecureString can be employed to decrypt them safely, maintaining the integrity and confidentiality of the sensitive data.
Now, I know:
• How to create a form.addCredentialField()
field in a form (explained here).
• How on form submission get the GUID of the value input (explained there too).
• How using the GUID call https.createSecureString()
and send it off (explained there too).
But it's not clear to me:
• What am I supposed to store in the custom record? The GUID? Some encrypted value obtained from the GUID? Both?
• If it's the GUID, why does the author mention https.createSecretKey()
at all? Also, if it's the GUID, is this safe enough? Can anything but the scripts authorized by `form.addCredentialField()`'s restrictToScriptIds
option get at the underlying plain text value?
• If https.createSecretKey()
is important in this setup for security reasons, could someone explain why and how to use?
Many thanks!battk
11/19/2024, 12:14 AMbattk
11/19/2024, 1:10 AMbattk
11/19/2024, 1:13 AMuser93865
11/19/2024, 8:45 AMform.addCredentialField()
is made so difficult by the lack of good documentation... That blog article helps somewhat but is also convoluted and clearly on occasion leads one to believe there's more to be done than there is.