ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
141 stars 85 forks source link

.NET API Client call AdminListIdentitySessionsAsync not working #167

Closed roboptics closed 2 years ago

roboptics commented 2 years ago

Preflight checklist

Describe the bug

Unable to call the .NET Client Api function AdminListIdentitySessionsAsync(). An error deserializing the field authentication_methods.aal from the ClientSession model is thrown.

This happens because the json value for this field is "", when a value belonging to ClientAuthenticatorAssuranceLevel is expected.

Below is a sample of the returned json response:

[
  ...
  {
    "id": "REDACTED",
    "active": false,
    "expires_at": "2022-01-28T20:16:12.252766Z",
    "authenticated_at": "2022-01-27T20:16:12.252766Z",
    "authenticator_assurance_level": "aal2",
    "authentication_methods": [
      {
        "method": "password",
        "aal": "",
        "completed_at": "2022-01-27T20:15:49.421883833Z"
      },
      ...
    ],
    ...
  },
  ...
]

Reproducing the bug

Use the .NET Client Api to call AdminListIdentitySessionsAsync().

Relevant log output

No response

Relevant configuration

No response

Version

0.0.1-alpha.169

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

Docker Compose

Additional Context

After a detailed analysis, in our case this only seems to affect sessions that are at least a couple of weeks old. Is this a result of a recent breaking change and we do not need to worry about this in the future?

aeneasr commented 2 years ago

Sorry @roboptics ! I completely missed this issue. If you have problems with using the cloud system feel free to create such issues in github.com/ory/cloud as well, we have a couple of people monitoring that repo :)

Regarding your question, it looks like this is a regression? We've made a few improvements to the enums so it might be resolved, but not sure. Did this problem re-appear for you?

roboptics commented 2 years ago

Hello. No problem. We deleted all the older sessions to work around this issue and so far we have not noticed it again. I will close this for now. Thank you for your help.

aeneasr commented 2 years ago

You're welcome, sorry for the inconvenience!