tabeyti / jenkins-jack

Jack into your Jenkins to execute Pipeline scripts, provide Pipeline step autocompletions, pull Shared Library step documenation, run console groovy scripts across multiple nodes, and more! Honestly, not that much more.
Other
97 stars 32 forks source link

add token support #42

Closed jmarandet closed 3 years ago

jmarandet commented 3 years ago

Hi, This seems to be a really great plugin, but I just can't use it Having my password stored as a plain-text string in my config.json file is so insecure...

Could you please add a token parameter ?

"jenkins-jack.jenkins.connections": [  
        {  
            "name": "secured-jenkins",  
            "uri": "http://127.0.0.1:8080",  
            "username": "WhoAmI",  
            "password": null,  
            "token": "my-great-token"  
        }  
]  
jmarandet commented 3 years ago

Ok then... I am self-closing my issue while reading the code for JenkinsService constuctor https://github.com/tabeyti/jenkins-jack/blob/master/src/jenkinsService.ts#L63

It is possible to set the password parameter to a token string.

Rather than "password", this parameter SHOULD be called token