Taking long time for authenticating cli user

I am testing performance on authentication. We are using confd 7.3.2. There is an external program getting called in authentication.
It is taking sometimes approximately 9 seconds to authenticate cli user. This time includes ssh cli user, open connection and close. External program used for authentication alone is taking just 0.2 seconds on average, per authentication API call.

Next, I did ssh as simple user to the same box. Called same external program used for authentication. Time taken in ssh connection on average: 0.27s. It is very fast compared to 9 secs taken in ssh cli user.

What can cause slow response in ssh cli user if external program used in authentication is not taking long time. Thanks in advance.

Did you check where the time is lost? Is it before the external program is launched? After that, or somewhere in between? Is there anything else going on in ConfD (devel.log or audit.log might tell)?