In VS Code using M2M successfully for months, all ...
# sdf
e
In VS Code using M2M successfully for months, all of the sudden I get:
Copy code
The  authentication ID is not available. Check your authentication credentials and try again.
…and there’s my answer. Today’s post just popped up after I posted this. Sorry!
After the SuiteCloud SDK tools are upgraded to the next version, your current credentials file, along with your locally saved credentials for any of the SuiteCloud SDK tools, will not be valid. You will be required to reauthenticate to use these tools again.
1
And… now I cannot set up M2M anymore? Machine-to-machine authentication is not allowed for the current execution context. For more information, see https://system.netsuite.com/app/help/helpcenter.nl?fid=article_0113125121.html.
e
Thanks. So, bottom line: I’ll follow those steps to set up variable, but can I use M2M in VS Code? Or is that not recommended for some reason?
a
@ec Theoretically M2M is designed for CI/CD environments and browser based auth for normal dev machines as it offers more security for your credentials. But technically you can use M2M with all Suitecloud Tools including VSCode extension on your dev machine.
e
Thanks, @Ali Syed (NS DevTools QA). I’ve had issues with browser based timing out after 2-3 days. Not really useful when working across many accounts and timing out all the time. I’m also not always logged in to the environment in the browser when I need to push an update or run a comparison or attempt to validate my environment / sdf package
b
😢 great, I can now get even less done futzing with credentials
😁 1
a
@barinvon I am here to help you if you get stuck. You will get used to this update, and it has some more layers of security for your credentials :)
j
@Ali Syed (NS DevTools QA) We use SDF for CI/CD. I’ve watched the video you linked about secure credential storage (thank you!), but I’m not understanding
SUITECLOUD_CI_PASSKEY
. Do I need to produce my certs with the same “passkey” e.g.:
Copy code
openssl req -new -x509 -newkey rsa:4096 \
        -keyout "${privateKeyFileName}" \
        -sigopt rsa_padding_mode:pss -sha256 -sigopt rsa_pss_saltlen:64 \
        -days 730 \
        -passout pass:MySecurePassphrase123MopreTextMoreTextMoreText \
        -out "${publicKeyFileName}" \
        -subj "/C=US/ST=Illinois/L=Northbrook/O=foo"
What does this new environment variable
SUITECLOUD_CI_PASSKEY
match with, in terms of netsuite? Is there anything in netsuite that needs to know what my passkey is? My apologies, I’m not understanding the docs or the videos yet.
a
@Joel Musheno All these new environment variables including
SUITECLOUD_CI_PASSKEY
Are user-provided values. No relationship with NetSuite. The SUITECLOUD_CI_PASSKEY is used to secure your credentials_ci.p12 file which contains your tokens. You can set this environment variable
SUITECLOUD_CI_PASSKEY
locally with at least 32 alphanumeric characters. And then run accountsetupci command locally, which will save credentials in
credentials_ci.p12
you can use that same credentials file in your CI/CD environment also by providing the same
SUITECLOUD_CI_PASSKEY
in CI/CD environment
How you generate your RSA certificate has nothing to do with
SUITECLOUD_CI_PASSKEY
Think of
SUITECLOUD_CI_PASSKEY
as a password for your credentials file, that's it.
j
Ah, so I could just include these environment vars to my CI server and be done! Thank you. I will try!
a
Yes, for CI you will need
SUITECLOUD_CI_PASSKEY
and
SUITECLOUD_CI
Delete any existing credentials file, and you should be good to go.
216 Views