-
Notifications
You must be signed in to change notification settings - Fork 975
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
Add support for Salesforce which uses the ISO 8601 date format for updated_at timestamp in user claims #3984
Comments
Thank you for the suggestion. I agree that this is a problem and at the same time it's disappointing that many upstream providers have this issue. In my view, a fix should be provider-specific. Also, I think that the transformation should be done using a custom JSON marshaller/unmarshaller as we don't want to be dependent on the field being called There's also some libraries for that: https://github.com/joeshaw/iso8601 |
The issue is with the fix being applied only to specific providers. |
Potential alternative:Have an optional This is more complex to integrate, though supporting more providers and different formats would be more abstract. Benefits
Downsides
Next steps@aeneasr @alnr or others, do we have some idea how much other implementations deviate from the standard? |
Yes, that is the case in my view. The OIDC generic provider should only work with spec compliant providers. For anything that needs custom code we need dedicated code in my view. |
In itself, I don't think something would speak against that approach if two conditions are true:
e.g. Salesforce itself heavily relies on tenant based authentication, there is not a single Issuer URL that is used for all Salesforce installations. So you should be able to somehow set up two independent Salesforce SSO connections. -- The first is more an ongoing commitment to add support for those providers as needed (or at least accept PR for those). |
|
|
@aeneasr @jonas-jonas I've opened a PR which fixes the invalid schema for Salesforce :) |
Preflight checklist
Ory Network Project
No response
Context and scope
Not all identity providers follow the OIDC standard (like Auth0, Salesforce, …).
A workaround has been added for the pre-configured Auth0 identity provider. For generic providers, it's not possible to have an ISO 8601 date (e.g.
2013-12-02T18:46:42Z
)Goals and non-goals
Goals:
updated_at
field of the OIDC user infoNon-goals:
The design
When fetching the OIDC claims for a generic provider,
check which type the
updated_at
in the user info object has:If it's a string and an ISO date, convert it to a Unix timestamp in the user info object.
If it's not a string or iSO date, leave the
updated_at
field untouched.APIs
No response
Data storage
No response
Code and pseudo-code
Code was taken from existing Auth0 workaround.
Degree of constraint
No response
Alternatives considered
There was some discussion (by @alnr) around whether to convert the date using in the Jsonnet snippet, using the
toUnixTimestamp
function.The drawback of this solution might be that it does not properly handle leap seconds.
The text was updated successfully, but these errors were encountered: