Thursday 10 April 2014

How to make Fed Auth cookie a session based?

we need to execute the following powershell commands to make the fed auth cookie a session based.

Sharepoint 2010 will write a fed auth cookie to disk and if we want to make this cookie expire with the session as we have other site minder cookies which are expired based on the session.

We found a change that can be made to the SharePoint STS to make it work with session cookies again, as it did in SharePoint 2007.  This PowerShell will make the change:

1:  $sts = Get-SPSecurityTokenServiceConfig  
2:  $sts.UseSessionCookies = $true  
3:  $sts.Update()  
4:  iisreset  

After doing this you will see that there is no longer a FedAuth cookie written to disk.  To change things back to the default behavior just reverse your steps:
1:  $sts.UseSessionCookies = $false  
2:  $sts.Update()  
3:  iisreset  
you can refer to the blog "http://blogs.technet.com/b/speschka/archive/2010/08/09/setting-the-login-token-expiration-correctly-for-sharepoint-2010-saml-claims-users.aspx" for additional information

No comments:

Post a Comment