Custom update script for SSH device throwing exception

book

Article ID: 102901

calendar_today

Updated On:

Products

CA Privileged Access Manager - Cloakware Password Authority (PA) PAM SAFENET LUNA HSM CA Privileged Access Manager (PAM)

Issue/Introduction

A custom script is used for updating password at the firewall device(fortigate) and getting exception.
 
May 08, 2018 12:25:51 PM com.cloakware.cspm.server.app.impl.t c
SEVERE: AddTargetAccountCmd.invoke 15220: A problem occurred while executing the script processor.  Please try your request again or contact your Administrator.
com.cloakware.cspm.server.app.ApplicationException: A problem occurred while executing the script processor.  Please try your request again or contact your Administrator.
                at com.cloakware.cspm.server.plugin.targetmanager.UnixAdvancedTargetManager.updateCredentials(UnixAdvancedTargetManager.java:67)
                at com.cloakware.cspm.server.app.TargetManager.performUpdate(SourceFile:696)
                at com.cloakware.cspm.server.app.TargetManager.run(SourceFile:643)
Caused by: java.util.NoSuchElementException:  was not found
                at com.cloakware.cspm.common.Constants$ExtensionType.fromString(SourceFile:109)
                at com.cloakware.cspm.server.plugin.SSHConnectionInfo.getInstance(SSHConnectionInfo.java:402)
                at com.cloakware.cspm.server.plugin.ChannelBeanShellScriptProcessorImpl.getConnectedChannel(ChannelBeanShellScriptProcessorImpl.java:396)
                at com.cloakware.cspm.server.plugin.ChannelBeanShellScriptProcessorImpl.<init>(ChannelBeanShellScriptProcessorImpl.java:88)
                at com.cloakware.cspm.server.plugin.ChannelBeanShellScriptProcessorImpl.<init>(ChannelBeanShellScriptProcessorImpl.java:100)
                at com.cloakware.cspm.server.plugin.targetmanager.UnixAdvancedTargetManager.updateCredentials(UnixAdvancedTargetManager.java:57)
                ... 2 more
 
com.cloakware.cspm.server.app.ApplicationException: A problem occurred while executing the script processor.  Please try your request again or contact your Administrator.
                at com.cloakware.cspm.server.plugin.targetmanager.UnixAdvancedTargetManager.updateCredentials(UnixAdvancedTargetManager.java:67)
                at com.cloakware.cspm.server.app.TargetManager.performUpdate(SourceFile:696)
                at com.cloakware.cspm.server.app.TargetManager.run(SourceFile:643)
Caused by: java.util.NoSuchElementException:  was not found
                at com.cloakware.cspm.common.Constants$ExtensionType.fromString(SourceFile:109)
                at com.cloakware.cspm.server.plugin.SSHConnectionInfo.getInstance(SSHConnectionInfo.java:402)
                at com.cloakware.cspm.server.plugin.ChannelBeanShellScriptProcessorImpl.getConnectedChannel(ChannelBeanShellScriptProcessorImpl.java:396)
                at com.cloakware.cspm.server.plugin.ChannelBeanShellScriptProcessorImpl.<init>(ChannelBeanShellScriptProcessorImpl.java:88)
                at com.cloakware.cspm.server.plugin.ChannelBeanShellScriptProcessorImpl.<init>(ChannelBeanShellScriptProcessorImpl.java:100)
                at com.cloakware.cspm.server.plugin.targetmanager.UnixAdvancedTargetManager.updateCredentials(UnixAdvancedTargetManager.java:57)
                ... 2 more

Cause

The exception suggests the script could not be executed because there is an error.

The error is caused by "java.util.NoSuchElementException: was not found" which reports that there was an element missing.
Caused by: java.util.NoSuchElementException:  was not found
                at com.cloakware.cspm.common.Constants$ExtensionType.fromString(SourceFile:109)

And the missing element is an "ExtensionType".
This is Type for the application so it must be that the Application Type was missing a value.
It is possible the Application Type has changed at one point resulting in this situation.

Environment

PAM 2.8.4.1
PAM 3.1.1
 

Resolution

Solution would be to discard the target application and the associated target account and recreate them.
When recreating the target application, please specify the correct application "Type" from the start.