Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeStamp on authentication Message #5

Open
tvoglund opened this issue Jun 26, 2015 · 3 comments
Open

TimeStamp on authentication Message #5

tvoglund opened this issue Jun 26, 2015 · 3 comments

Comments

@tvoglund
Copy link

tvoglund commented Jun 26, 2015

I'm trying to debug the time difference. I checked my Azure server and the time is correct. Then I add a code to log the time right before Meteor.loginWithSaml is called. This time is:

2015-5-26T13:40:29.290

Then I get an error from Shibboleth IdP of:

Message was not yet valid: message time was 2015-06-26T15:40:31.000Z, latest valid is: 2015-06-26T09:45:33.158-04:00
Message was rejected because was issued in the future

Then I see the latest valid is 2015-06-26T09:45:33.158-04:00 which is equal to 2015-06-26T13:45:33.158

If you notice the time that I logged right before the call to my meteor package would work. But for some reason my meteor package is adding a timestamp of 2015-06-26T15:40:31.000Z and this is actually in the future. This looks like an issue, the package added 2 hours to the timestamp.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/23109826-timestamp-on-authentication-message?utm_campaign=plugin&utm_content=tracker%2F530713&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F530713&utm_medium=issues&utm_source=github).
@tvoglund
Copy link
Author

In saml_utils.js on line 47 the code add 2 hours to getUTCHours. I was wondering why is this added. This cause a failure when I try to use the package with Shibboleth.

@nate-strauser
Copy link
Owner

i'm pretty sure i borrowed almost all of that file from https://github.com/bergie/passport-saml/blob/master/lib/passport-saml/saml.js - it was some time again though, so i'm not 100% sure.

it looks like passport-saml version has changed that code to

SAML.prototype.generateInstant = function () {
  return new Date().toISOString();
};

try to download this package into the packages directory of your meteor app and change that bit to see if it works for you.

@tvoglund
Copy link
Author

tvoglund commented Jul 1, 2015

This does change the time stamp back 2 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants