I have been using karate framework to run the automation test via and project is being saved to GitHub Since the api client id and secret is being stored directly in karate config.js directly, which was not adviced Now we are planning to change the approach of storing the secrets directly in github to move it to credhub portal securely to fetch the same.
Is there way or any examples available to implement externalisation of secrets from config.js file? Pls share and thanks in advance Here is sample config.js file
function fn(){
var env = karate.env;
karate.log('karate.env system property was:', env)};
var config = {
}
if (env = "dev" ){
config.client_id = 'clientid'
config.client_secret = 'secret'
}
return config;
}