Skip to main content


 

Symptoms


Getting "an object reference" error when trying to access the K2 artifact pages i.e. SP List application artifact page or ?Reports", and "SmartObject" artifacts pages(from the K2 application page). In other words, the issue only occurs whenever a user tries to interact with the K2 artifacts within the context of SharePoint:

Exception: Object reference not set to an instance of an object.
at SourceCode.Security.Claims.Web.SPAuthModule.GetClaimTypeMapping(String nii)
at SourceCode.Security.Claims.Web.SPAuthModule.CheckClaimTypeMappingToClearSession(SessionSecurityToken token, String trust)
at SourceCode.Security.Claims.Web.SPAuthModule.DoSessionTokenCheckAndHandleRedirect(String url)
at SourceCode.Security.Claims.Web.SPAuthModule.OnBeginRequest(Object sender, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Booleanand completedSynchronously)

This is happening for all users in multiple K2 environments configured the same way. Their environment is configured to use ADFS for authentication(ADFS 3). If we take SharePoint out of the picture the issue does not occur e.g. accessing K2 Designer directly, etc.

The bizarre thing is the error generally does not occur the first time a user accesses the K2 artifact page. Refreshing the page or going back to it a subsequently time is when the issue occurs. It seem like the first time a user gets authenticated against ADFS it works?. the subsequently request(s) when K2 sends the FedAuth cookies back is when it fails.
 

Diagnoses


This had something to do with the way K2 handles authentication on subsequent requests, i.e. after a user has initially been successfully authenticated against ADFS, using the FedAuth cookie when accessing the K2 app within the context of SharePoint ? it iterates through the ?Identity.ClaimTypeMapping? table and because a K2 security label exists in there with a NULL nameidentityissuer value it throws an ?object reference? error on the method SourceCode.Security.Claims.Web.SPAuthModule.GetClaimTypeMapping(String nii)
 

Resolution

Customer was provided an isolated K2 blackpearl 4.6.11 coldfix to address the issue.

This is not an issue in 4.7 since most of the methods in the stack trace have been replaced by a new architecture. So, if you encounter a similar issue, first upgrade to a the latest version of K2 blackpearl i.e. 4.7 and up. And, if that does not resolve the issue contact K2 Support by logging a Support ticket.
 




 
Be the first to reply!

Reply