AL icon indicating copy to clipboard operation
AL copied to clipboard

Sugesstion: Improvement of launch.json for UserPassword Authentication

Open megel opened this issue 9 years ago • 4 comments

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"
      }
    ]
}

megel avatar Nov 13 '17 10:11 megel

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" } ]

pdwgithub avatar Oct 08 '18 17:10 pdwgithub

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 avatar Nov 05 '18 13:11 StanislawStempin

@StanislawStempin Well, then store the password in the usual place using cmdkey or similar.

rdebath avatar Feb 14 '19 15:02 rdebath

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.

BazookaMusic avatar Nov 28 '23 09:11 BazookaMusic