This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided "as is" with no warranties.

Issue

This behaviour appears when executing SmartObjects from the 3rd Party REST Service Instance created in K2 Management, in this case we encountered it with MuleSoft API instances.

On the MuleSoft API instances environment it was identified that duplicate Authentication attempts were made from the service instance via K2 Management.

Image

Symptoms

On the K2 Server side this Authentication duplication will only be present if the SmartObject logging is enabled.

---------------------------------------------------------
Timestamp: Date, ThreadId: 216, ThreadGuid: df6b8374-78e8-4920-b926-7bc1e5036eba
ServiceAuth :: Service = Mule_API User running as : K2Service - Storeintegrated = True

---------------------------------------------------------
Timestamp: Date, ThreadId: 216, ThreadGuid: df6b8374-78e8-4920-b926-7bc1e5036eba
Current thread user = K2:Domain\K2Service
---------------------------------------------------------

How to Enable SmartObject logging: https://help.k2.com/kb000298

Resolution

To correct this behaviour you will need to change the REST Service instance to utilize the "Default Http Header'' Property.

The below community Article can be used as a reference on how to achieve this.

https://community.k2.com/t5/K2-Cloud/How-to-pass-HTTP-Request-header-for-REST-Service/td-p/109014

If you are unsure on how to continue with this, please log a K2 Support ticket so that we can assist with the guidance of a developer to get the needed changes made on the Service instance.