-
Notifications
You must be signed in to change notification settings - Fork 10.3k
JSON Web Key Sets (JWKS) for Blazor WebAssembly App with Individual Accounts and ASP.NET Core Hosted #46474
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
Comments
@leastprivilege Do you have any input here or do you simply recommend migrating? :) https://docs.duendesoftware.com/identityserver/v6/upgrades/spa_to_duende/#migrating |
@Ogglas I think this might have broken in one of the Identity Server updates. I believe that what is happening is that our configuration is not taking effect. I suggest you configure this directly in Identity Server instead of going through our integration layer. I believe they have built-in support for config now. |
Thanks for contacting us. We're moving this issue to the |
@javiercn Alright but then it seems there are extra keys used to verify the signature of a signed JWT in your template code. This seems like a security vulnerability that we/you need to handle asap or am I being wrong? To mitigate this do you mean removing We used a Profile Service before but that only works with Authorization Code Grant and not Resource Owner Password Credentials. https://stackoverflow.com/a/74058054/3850405 The reason we are using ROPC and not Client Credentials flow can be seen below: It feels weird to use Resource Owner Password Credentials grant given that it probably will be omitted from OAuth 2.1 in new development so I hope the bug above will be looked at as well. Longer term I hope you replace |
@blowdart Can you have a look at this? It seems there are extra keys used to verify the signature of a signed JWT in your template code. This seems like a security vulnerability that we/you need to handle asap or am I being wrong? |
@Ogglas the keys are generated and managed by identity server automatically. As long as those keys are appropriately generated and protected (which they are), there is no security issue here, just a bug. For it to be a security issue there should be a way in which an attacker could exploit that, which as far as we know, there isn't. |
I believe this is Duende's developer time support for in memory keys, which only lights up when you're in the developer environment, which is controlled by the environment variable asp.net uses. I agree with @javiercn here, and remove the older direct integration stuff if you don't want this key created in memory during dev time. It's not a bug however, it is, to be cliched, a feature, it makes it easier in dev so you don't have to generate and persist keys. |
@blowdart I don't think that is correct. The issue is present in production as well using a certificate as key so it is not limited to the developer environment. I made a snippet about that in my original post. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I have a
Blazor WebAssembly App
created withMicrosoft Visual Studio
with these specifications:Target Framework .NET 7.0
,Authentication Type Individual Accounts
andASP.NET Core Hosted
(Duende IdentityServer):If I start this project and visit https://localhost:1234/.well-known/openid-configuration/jwks I can see the following values:
The
Development
key is probably generated viaappsettings.Development.json
and the following value:What is the extra key that I can see there and how is it generated?
If I then put this in production and use a cert instead I can see the following values:
Config:
The last value is my certificate, 77C012345. The other two keys are not generated by me, What is their functionality and how can I disable them?
If I install Duende IdentityServer Templates like this:
dotnet new --install Duende.IdentityServer.Templates
https://docs.duendesoftware.com/identityserver/v5/quickstarts/0_overview/
Then create a new project with template: "Duende IdentityServer with ASP.NET Core Identity (Duende Software)". If I then start the project and visit the
jwks
endpoint I can see one key as expected.https://localhost:5001/.well-known/openid-configuration/jwks
The key that I can see is located in the folder
keys
and namedis-signing-key-5BFB12345.json
with value:Describe the solution you'd like
If there are extra keys generated, that are used to verify the signature of a signed JWT that the programmer by default has no control over, these should be removed immediately imao.
Additional context
No response
The text was updated successfully, but these errors were encountered: