Sugesstion: Improvement of launch.json for UserPassword Authentication
To improve the local development, it could be nice to include the unsecure username and password for the authentication methode UserPassword into launch.json
Example 1:
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"authentication": "UserPassword",
"username": "MyDefaultUser",
"password": "Wasd2432$&D4345-SDSFDsdfsdfEWewr13212"
}
]
}
Another way is to store the password / credentials for the test user in a local file like this:
Example 2:
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"authentication": "UserPassword",
"username": "MyDefaultUser",
"passwordPath": "%HOMEPATH%/password.txt"
}
]
}
I do not know why, but VS code says "Property username is not allowed". The same for password. Any idea why?
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "NAV120-vma",
"server": "http://nav120-vma",
"serverInstance": "nav",
"authentication": "UserPassword",
"username": "v.malecek",
"password": "blabla",
"schemaUpdateMode": "Synchronize"
}
]
I'm not sure we want to go this way since adding these properties to launch.json would encourage checking in credentials to GIT and making it non-trivial to remove afterwards.
@StanislawStempin
Well, then store the password in the usual place using cmdkey or similar.
Hi! Thank you for your suggestion. We are working on focusing the activity in this repository on addressing issues related to the AL development tools.
This suggestion is requesting a way to have per project credentials from what I understand. We recommend that you post this on our Ideas forum at aka.ms/BCIdeas, or vote up the idea if its already there.
We are constantly monitoring top ideas and will consider them for a future release.
As an extra comment before closing, I think that this could also be handled internally in the way that the launch.json should only mention the environment and username and the credentials would be cached based on the environment and username.