okta / okta-sdk-golang

A Golang SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
https://github.com/okta/okta-sdk-golang
Other
171 stars 142 forks source link

Failed to parse Okta OIDC app (JWK creation date is in the wrong format) #459

Open alex-entro opened 2 months ago

alex-entro commented 2 months ago

Describe the bug?

The parsing of an application failed (sdk v2), because the format of the "created" field of a JWK is not the expected one.

What is expected to happen?

This code is supposed to succeed:

var app okta.App
app = okta.NewOpenIdConnectApplication()
app, _, err := a.sdk.Application.GetApplication(ctx, appID, app, nil)

What is the actual behavior?

This code fails for one specific app with the error:

"parsing time \"2023-07-17 11:28:57 +0000 UTC\" as \"2006-01-02T15:04:05Z07:00\": cannot parse \" 11:28:57 +0000 UTC\" as \"T\""

After investigation, this is the part which is wrongly formatted:

            "jwks":
            {
                "keys":
                [
                    {
                        "created": "2023-07-17 11:28:57 +0000 UTC",
                    }
                ]
            }

Reproduction Steps?

It's specific to the app which fails

Additional Information?

No response

Golang Version

1.22.1

SDK Version

github.com/okta/okta-sdk-golang/v2 v2.20.0

OS version

No response

github-actions[bot] commented 1 month ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

duytiennguyen-okta commented 1 month ago

Can you reproduced this in the latest version of the sdk? V4.1.0?

github-actions[bot] commented 4 weeks ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

github-actions[bot] commented 1 week ago

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.