asp.net core - What is the Signing Credential in IdentityServer4? -


we in process of implementing identity server 4 our .net core web app.

i went trough identity server documentation. when configuring identity server (using di) there line:

.addtemporarysigningcredential 

i'm trying understand signing credential couldn't figure out. therefore don't know if it's ok use built in temporary, or if should provide different one.

my question is, signing credential , how should use it?

in identity server documentation definition:

adds signing key service provides specified key material various token creation/validation services. can pass in either x509certificate2, signingcredential or reference certificate certificate store.

so seems important :)

the authorization server sign tokens key. resource server(s) should verify token's integrity key. form asymmetric (e.g. public/private) key pair. default identityserver publish public key verifying tokens on /.well-known/openid-configuration endpoint.

for development scenarios, typically want skip fuss of managing secrets said keys (which really important in production!). these development scenarios have option of using adhoc solutions addtemporarysigningcredential, used .net core 1.x.

with .net core 2.x change , need adddevelopersigningcredential() extension method.

that answers question of what is. on how use it: call method need depending on .net core version inside configureservices(...) method of application's startup class.

apart don't need special, except of course take care use proper key pair in production.

see docs on cryptography, keys , https , the bit on configuring services keys. latter document, here's relevant alternative production cases:

  • addsigningcredential

    adds signing key service provides specified key material various token creation/validation services. can pass in either x509certificate2, signingcredential or reference certificate certificate store.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -