Hi
I am using a ADFS 2.0 Server with Rollup 3.
I have added a SAML 2 based claims provider and a Relying Party to the A FS config. The SAML 2 based claims provider has it's own logon application, where users are redirect when a SSO is initiated. The great thing is that all of this works fine. Meaning users wanting to access the Relaying Party site will get a Federated identity from the Claims Provider as intended.
The problem is that this works as long has users has not logged been logged on for more than 5 minutes on Claims Provider. If a user has been logged on for more then 5 minutes ADFS will rejects it with this error:
Microsoft.IdentityModel.SecurityTokenService.NeedFresherCredentialsException: MSIS3070: The credentials provided do not meet the freshness requirement of '0' minute(s) for scope ...
After digging a little I have found the following problem. The Claims provider is using the SAML 2 Web Browser SSO profile with a HTTP-POST binding, and sending the ADFS server a SAML Response messing with the following interesting data:
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="....."
ID="_e1721458-ecc2-4ca8-991c-1109a10adbe7"
InResponseTo="id-e78d84df-3224-4533-955e-d41fcfbce5d8"
IssueInstant="2013-08-23T12:51:59.737Z" Version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">.....</saml2:Issuer> ...<saml2:AuthnStatement AuthnInstant="2013-08-23T11:41:22.776Z" SessionIndex="2148">
<saml2:AuthnContext> <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml2:AuthnContextClassRef>
</saml2:AuthnContext> </saml2:AuthnStatement>
...
The import things to look at here is the IssueInstant in the first block, and AuthnInstant in the second block. They have more 5 minutes difference. This is caused by the user actually being logged in at an earlier time then when the fedration on the ADFS server occurred. This then causes an error message in the server. If the gap is less then 5 minutes everything works fine.
According to the SAML 2 specification AuthnInstant is required and should be the time when a user actually logged in. This particular problem is discussed in https://lists.oasis-open.org/archives/saml-dev/200802/msg00003.html
I have tried to tweak every timeout property for both claims provider and relay trust, but to no end. All suggestions found in http://stackoverflow.com/questions/9130999/how-to-set-the-timeout-properly-when-federating-with-the-adfs-2-0 has been attempted, but always the same error.
Might this be a bug in ADFS, or have I just not set it up correctly, or is there a way to tweak this 5 minute timeout in another way