K2 blackpearl Installation and Configuration Guide > Prerequisites > Environment Configuration > User Authentication and Security > K2 Pass-Through Authentication > Scenario Walkthrough | Send feedback |
K2 Pass-Through Authentication is of great value in a variety of scenarios for both runtime and the management of K2 components for example K2 Worklist Webpart, K2 Workspace, K2 Process Portal, Custom Task Pages and so on.
The scenario described in this section is designed to illustrate how K2 Pass-Through Authentication can be implemented for an environment where Kerberos has not been configured correctly.
In this scenario, the InfoPath form will be used to connect in real time to the SharePoint list via a K2 SmartObject. Without K2 Pass-Through Authentication and in an environment where Kerberos is configured incorrectly, this scenario wouldn’t be possible and would result in refused connections and Kerberos failure. At each stage a description will be provided as to how K2 Pass-Through Authentication is being used to resolve the Kerberos issues.
From within SharePoint, use K2 SmartObject Configuration to add a SmartObject to the Announcements list – ensuring that you check the integrated check box.
Potential Kerberos-Related Problems | How K2 Pass-Through Authentication Will Help |
---|---|
Under pre K2 Pass-Through Authentication circumstances, the user would not be able to connect K2 SharePoint to create the SmartObject as this is a double hop ie Kerberos delegation failure | Connection will be made |
If Kerberos is not configured for this step, this will come through as anonymous |
This step configures the InfoPath form and integrates it with the SmartObject created in the previous step.
Potential Kerberos-Related Problems | How K2 Pass-Through Authentication Will Help |
---|---|
Unable to connect to K2 via the K2 Runtime Services (on the K2 Workspace or SharePoint server) as this is a double hop | Will allow connection to be made. |
What happens here with K2 Pass-Through Authentication is as follows:
Open the InfoPath form and add an announcement. Once this is complete, verify in SharePoint that the creator of the announcement list item was the end-user and not the K2 Service Account. This has been achieved without any delegation, using K2 Pass-Through Authentication’s SharePoint impersonation feature.
Potential Kerberos-Related Problems | How K2 Pass-Through Authentication Will Help |
---|---|
Can’t connect to K2 via the K2 Runtime Services (on the K2 Workspace or SharePoint server) as this is a double hop | Will allow connection to be made. |
Don’t have user credentials to call SharePoint, only the K2 Service Account | Will use SharePoint impersonation in order to make the updates in SharePoint as the end user. |
Events taking place using K2 Pass-Through Authentication are as follows:
Although the option to Enforce Impersonation is redundant with regards to SharePoint (we can use SharePoint impersonation so there is no security issue) we can illustrate how this option functions in this scenario because K2 will contact SharePoint as the K2 Service Account prior to impersonation being performed.
For this step, before opening the InfoPath form and adding the Announcement, do the following:
Potential Kerberos-Related Problems | How K2 Pass-Through Authentication Will Help |
---|---|
Can’t connect to K2 via the K2 Runtime Services (on the K2 Workspace or SharePoint server) as this is a double hop. | Will allow connection to be made. |
Don’t have user credentials to call SharePoint, only the K2 Service Account. | Will block the Service Account from utilizing a SmartObject marked as integrated. |
Events that take place with K2 Pass-Through Authentication are as follows:
In this instance Single Sign On is used to contact SharePoint as the correct user instead of using the native impersonation functionality available in the K2 SharePoint ServiceObject. Since the system is running as the actual Client user, this will even succeed if the EnforceImpersonation property is true.
To add SSO credentials for the end user, either use the K2 Workspace to cache the credentials, or just connect to the K2 Host Server via any API (e.g. via the Workflow Management API) with a connection string that resembles the following:
Copy Code
|
|
---|---|
Integrated=False; IsPrimaryLogin=True; SecurityLabelName=K2; UserID=[user\domain]; Password=[password]; Host=[k2 server]; Port=[port] |
Once this is done, open the InfoPath form and create an Announcement. Again, it should be created as the end user and not the K2 Service Account.
Potential Kerberos-Related Problems | How K2 Pass-Through Authentication Will Help |
---|---|
Can’t connect to K2 via the K2 Runtime Services (on the K2 Workspace or SharePoint server) as this is a double hop. | Will allow connection to be made. |
Don’t have user credentials to call SharePoint, only the K2 Service Account. | Use SSO to store and retrieve credentials. Logging on as and impersonating that user so that the credentials are used to call SharePoint, just as if Kerberos was working. |
What happens here with K2 Pass-Through Authentication is as follows: