Issue with authentication of File Listener Requestor
We are building an application which will cater to different funds. Each of them has some common business rules (FW layer) and some specific business rules (Implementation layer). So separate applications for each fund. Each of them will receive scanned files (.xml files) from which cases need to be created. We need to create cases for the specific fund based on input in the file. The idea is to authenticate the File Listener requestor processing the file with the appropriate context and then proceed with case creation.
On using Custom Authentication in Service Package the File listener fails with the below error but with using basic authentication or no authentication, the listener runs. The same custom authentication activity used in service package works fine when used in SOAP web service. The Authentication Activity also runs fine stand alone.
On raising SR, GCS responded that Pega does not support Custom Authentication for listeners and advised to raise this query in the PSC forum.
2016-11-23 21:14:41,281 [xecutor-threads - 59] [ STANDARD] [ ] [ ] (vices.listener.ListenerWrapper) ERROR - Failed to start listener: File.ScanDocument, com.pega.pegarules.pub.PRException: Authentication failed for listener: File.ScanDocument
From: (AB20B1EDD95AC2404F7AC609BE568A7F4)
2016-11-23 21:14:41,281 [xecutor-threads - 59] [ STANDARD] [ ] [ ] (tener.ListenerStateManagerImpl) ERROR - Unexpected exception.
We are building an application which will cater to different funds. Each of them has some common business rules (FW layer) and some specific business rules (Implementation layer). So separate applications for each fund. Each of them will receive scanned files (.xml files) from which cases need to be created. We need to create cases for the specific fund based on input in the file. The idea is to authenticate the File Listener requestor processing the file with the appropriate context and then proceed with case creation.
On using Custom Authentication in Service Package the File listener fails with the below error but with using basic authentication or no authentication, the listener runs. The same custom authentication activity used in service package works fine when used in SOAP web service. The Authentication Activity also runs fine stand alone.
On raising SR, GCS responded that Pega does not support Custom Authentication for listeners and advised to raise this query in the PSC forum.
2016-11-23 21:14:41,281 [xecutor-threads - 59] [ STANDARD] [ ] [ ] (vices.listener.ListenerWrapper) ERROR - Failed to start listener: File.ScanDocument, com.pega.pegarules.pub.PRException: Authentication failed for listener: File.ScanDocument
From: (AB20B1EDD95AC2404F7AC609BE568A7F4)
2016-11-23 21:14:41,281 [xecutor-threads - 59] [ STANDARD] [ ] [ ] (tener.ListenerStateManagerImpl) ERROR - Unexpected exception.
com.pega.pegarules.pub.PRException: Failed to start listener: File.ScanDocument
From: (B4FC7100450AB7B9B69C81DC2737755B5:(MBean Access))
at com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper.launchListener(ListenerWrapper.java:245)
at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startOneListener(ListenerStateManagerImpl.java:753)
at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startListener(ListenerStateManagerImpl.java:658)
at com.pega.pegarules.management.internal.ListenerManagementAPI.Start(ListenerManagementAPI.java:300)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
... 192 more
Caused by: com.pega.pegarules.pub.PRException: PRException
From: (AB20B1EDD95AC2404F7AC609BE568A7F4)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.setRequestorPrivileges(ServiceAPI.java:3220)
at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl$1.run(ServiceListenerBaseImpl.java:397)
... 197 more
Caused by: com.pega.pegarules.pub.services.ServiceException: Service requestor could not be authenticated
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.handleAuthentication(ServiceAPI.java:1612)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.setRequestorPrivileges(ServiceAPI.java:3211)
... 198 more
Caused by: java.lang.NullPointerException
at com.pega.pegarules.priv.authentication.RequestFacade.<init>(RequestFacade.java:124)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.getRequestFacade(ServiceAPI.java:3700)
at com.pega.pegarules.session.internal.mgmt.authentication.SchemePRCustom.authenticateOperatorForIntServices(SchemePRCustom.java:1132)
at com.pega.pegarules.session.internal.mgmt.authentication.SchemePRCustom.authenticateOperator(SchemePRCustom.java:414)
at com.pega.pegarules.session.internal.mgmt.authentication.Authentication.doAuthentication(Authentication.java:466)
at com.pega.pegarules.integration.engine.internal.services.ServiceAPI.handleAuthentication(ServiceAPI.java:1583)
... 199 more
***Moderator Edit: Vidyaranjan | Tagged SRExists***