Cette conversation a été verrouillée en raison de son inactivité. Veuillez créer une nouvelle publication.
Niveau 1
Niveau 2
Se connecter à la communauté
Connectez-vous pour voir tous les badges
Cette conversation a été verrouillée en raison de son inactivité. Veuillez créer une nouvelle publication.
Hi All,
As part of a requirement, we want to remove some logging statements in the function "execCommand(systemCommand, true)" in the Workflow javascript activity.
but we couldn't find the origin/implementation of this function in any of the javascript codes on the client console.
Please help us, where we can edit this function.
Thanks in Advance.
Résolu ! Accéder à la solution.
Vues
Réponses
Nombre de J’aime
Hi,
The workflow logs are mutable- they're just rows in xtk:workflowLog.
Create a wrapper for execCommand() that runs execCommand and then deletes the log rows it generated.
Thanks,
-Jon
Vues
Réponses
Nombre de J’aime
Hi @muralipraveenr1 - can you give us an example of the logs you are seeing?
Vues
Réponses
Nombre de J’aime
Hi @Darren_Bowers ,
LOG: XSV-350201 Execute the command 'curl -v -k 'sftp://<serverURL>' --user "username:password" -Q "rm ‘filename’” with user.
As you can see we had to pass the password as part of the curl command, but with the command getting logged, there’s a chance for the password breach to the groups which are not intended to see the password. so if there's any way to avoid this log that would be helpful.
Thanks!
Vues
Réponses
Nombre de J’aime
Hi Murali,
I think you have 2 options
- create an external account with the sftp credentials and use it in a workflow. Normally the info will not be visible.
- write a js a which refer options that you defined
var ftp_Cnnct = {
"url": "xxx-dev.neolane.net",
"port": "22",
"user": "to be modified",
"pwd": "to be modified",
};
var cmd = "curl -k -o " + dav_FOLDER + fName + ".csv -v -u " + ftpCnnct.user + ":" + ftpCnnct.pwd + " \"sftp://" + ftpCnnct.url + ":" + ftpCnnct.port + src_FOLDER + fName + ".csv\"";
vars.fileName = dav_FOLDER + fName + ".csv";
logInfo('Runing command : ' + cmd);
logInfo('FolderLocation : ' + vars.fileName);
var result = exec(cmd);
Thanks
David
Vues
Réponses
Nombre de J’aime
Vues
Réponses
Nombre de J’aime
I do not think this is possible.
You can blacklist some commands (like: ln, dd, openssl, curl, wget, python, python3, perl, ruby, sh, bash, dash, zsh, base64, nlserver, node, phantomjs, java, awk, nc, telnet, ssh, scp, ftp) in exec part in serverConf.xml
You may try with execCommand(systemCommand, false) which should disable output.
If not, you may consider using Bash script inside JS to avoid this command.
Regards,
Milan
Hi,
The workflow logs are mutable- they're just rows in xtk:workflowLog.
Create a wrapper for execCommand() that runs execCommand and then deletes the log rows it generated.
Thanks,
-Jon
Vues
Réponses
Nombre de J’aime
Vues
Likes
Réponses
Vues
Likes
Réponses