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

assertionInfo.WarningInfo.InvalidTime using time finer than milliseconds #101

Open
daniilstrata opened this issue Mar 23, 2023 · 0 comments

Comments

@daniilstrata
Copy link

daniilstrata commented Mar 23, 2023

In VerifyAssertionConditions in validate.go, notBefore and notOnOrAfter are doing time comparison finer than milliseconds.
According to SAML Core spec

1.3.3 Time Values
All SAML time values have the type xs:dateTime, which is built in to the W3C XML Schema Datatypes
specification [Schema2], and MUST be expressed in UTC form, with no time zone component.
SAML system entities SHOULD NOT rely on time resolution finer than milliseconds. Implementations
MUST NOT generate time instants that specify leap seconds.

TIme comparisons SHOULD NOT rely on time resolution finer than milliseconds.

In our case, the now clock returned 20:08:46.518691 and the notBefore SAML assertion had 20:08:46.55 which triggered the warning. The library should at most compare one significant digit after the seconds dot.

This is a major issue that causes intermittent login failure for users.

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

1 participant