Authentication happens twice on REST Service Instance
kbt165487
PRODUCTIssue
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.
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:DomainK2Service
---------------------------------------------------------
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