-
Notifications
You must be signed in to change notification settings - Fork 54
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
Token validation fails when referencing the latest versions of Okta.AspNetCore and Okta.Sdk #267
Comments
This ticket follows on from #261 |
@jforage-sw Thanks for bringing this to our attention. I've entered an internal ticket for tracking and prioritization: OKTA-811798 |
@bryanapellanes-okta What is the SLA / timeline for this ticket to reviewed by your dev team, please? The reason I ask is that this issue is blocking progress on our end currently |
Note that the issue appears to be with the
Is there any reason why you aren't validating the token signature out of the box? |
@jforage-sw Can you confirm if the issue persists after updating to v8.1.5 of Okta.Sdk? A new release was made which updated the referenced version of Microsoft.IdentityModel.Tokens and System.IdentityModel.Tokens.Jwt to v8.0.2. This is the change: https://github.com/okta/okta-sdk-dotnet/pull/744/files |
@bryanapellanes-okta Yes, the versions we are using are as follows:
I can confirm that this results in v8.0.2 of the Jwt / JsonWebToken Microsoft packages dependencies, as you say |
As I say, the error we get is that the signing keys aren't available as part of token validation. Not without the custom workaround I gave above. I'm interested to understand why the |
@jforage-sw I'm uncertain what the original reason is for the lack of token validation. It is probable that validation of tokens varies by application configuration and one solution may not have been universally appropriate. |
Describe the bug?
We use the
Okta.AspNetCore
4.6.1 package to authenticate end-user access tokens. We also use theOkta.Sdk
v8 to perform management tasks via the Okta management API. These 2 packages use different versions of the following Microsoft JWT packages:Microsoft.IdentityModel.JsonWebTokens
System.IdentityModel.Tokens.Jwt
Version 8 of these JWT packages (as referenced by the
Okta.Sdk
v8 package) returns security tokens as aJsonWebToken
, rather than aJwtSecurityToken
, which seems to break the OAuth flow for our end users.What is expected to happen?
It should be possible to use the
AddOktaWebApi
authentication builder extension method from theOkta.AspNetCore
4.6.1 package which supports signature validation when using the latest versions of the Microsoft JWT packages.What is the actual behavior?
Signature validation of the token fails with the following exception message
Reproduction Steps?
Try this test repo created by @laura-rodriguez but with either v8 of the
Okta.Sdk
package included, or explicitly adding the latest versions of:Microsoft.IdentityModel.JsonWebTokens
System.IdentityModel.Tokens.Jwt
Additional Information?
No response
.NET Version
ASP.Net Core SDK 8.0.401
SDK Version
Okta.Sdk v8.1.5
Okta.AspNetCore v4.6.1
OS version
No response
The text was updated successfully, but these errors were encountered: