Deserialization bug when running toSession for social sign in cookie?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 8
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe the bug
I've been using social sign in with Azure AD successfully for some time, but there now seems to be a problem when trying to verify the users that are signed in using Azure. This problem might have been there for a long time, because this feature has not been used much in our system.
Reproducing the bug
Steps to reproduce the behaviour:
- Register a Microsoft tenant for social sign-in with scopes: email, profile. tenant: organization. subject source: userinfo.
- Try to log in with a tenant of your choice.
- Try to validate the session with the SDK:
frontendApi.toSession(null, cookie)
Relevant log output
java.lang.IllegalArgumentException: The field `provider` in the JSON string is not defined in the `SessionAuthenticationMethod` properties. JSON: {"method":"oidc","aal":"aal1","completed_at":"2023-08-08T13:06:43.107679019Z","provider":"microsoft"}
Relevant configuration
No response
Version
0.13.1
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Ory Network
Additional Context
This was working before. At first I thought the problem was with me not having updated the kratos-client-java version for a long time, but upgrading to 0.13.1 did not do the trick.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at frontendApi.toSession(null, cookie) and trace deserialization of the SessionAuthenticationMethod response shown in the report. Reproduce the Azure social sign-in flow with version 0.13.1; done means session validation accepts the returned provider field without throwing IllegalArgumentException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100