I am trying to configure Jenkins Active directory plugin using JCasC (Jenkins Configuration as Code). In order to configure the Active Directory plugin, I need to provide Bind Password in a secure way. I am using the Jenkins Credential plugin to provide the Bind password, but it is not working as expected.
Asked
Active
Viewed 503 times
0
-
What is your attempt so far? Are you using aws or anything for holding the secret? – apr_1985 Apr 16 '21 at 16:35
-
I have tried 2 ways, none of them worked for me. First method:- In Jcasc I have created credential using SecretText and assigned credential-id in the bindPassword value but it didn't work. Second method:- I have created an ENV variable which has path to password.txt file. In Jcasc I am reading file with below line: `bindPassword: "${readFile:${BIND_PASSWORD}}"`. readFile is not working and gave null pointer exception while I am logging to Jenkins. – Dheeraj Apr 17 '21 at 13:47
-
@apr_1985 I am not using any external vaults to store the secrets. In Jcasc documentation, I have found something "Passing secrets through variables". I cannot replicate the same in my Jcasc file. Any leads are very much appreciated. – Dheeraj Apr 17 '21 at 13:56