Giter VIP home page Giter VIP logo

identityserver.contrib.azurekeyvaulttokensigningservice's People

Contributors

mattcotterellnz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

identityserver.contrib.azurekeyvaulttokensigningservice's Issues

Write a proper README.md

Needs a brief introduction, tutorial on how to set up Azure Key Vault for this purpose, and other relevant README things

Add support for a fallback Azure AD secret key

Need to allow users to supply a primary and secondary Client Secret for the same Client ID, in order to allow key rotation without downtime.

Failed authentication will try the secondary key before throwing an exception, if supplied.

Think about how to properly cache the public key

The public key needs to be retrieved from the Key Vault Key, which costs one operation. In order to cut down retrievals, the exponent and modulus are remembered so the get operation is only performed once per AzureKeyVaultTokenSigningService instance. However I suspect there may be more than one instance per application, and there are scenarios such as elastic scaling that need to be considered (support using Redis?)

Implement ISigningKeyService

Hey
I am facing the same problem you are - trying to decide between CloudHSM and Azure KeyVault as the store for the private key. I saw the work you did, and it look like a great start, but the main thing that missing here, and that I am not sure how to implement is the ISigningKeyService. The main problem is the dependency in X509Certificate2. Look like you can generate a X509Certificate2 from 'JsonWebKey' (which is what you can export from the key vault, as far as I know) but this look like very ugly code to me.
I was wondering if you have any thought regarding this problem.
Thanks,
Omer

Support .net 4.5/C# 5

Hey
Currently the project will not compile using C# 5. Also the code is dependent on CNG which is available only from .net 4.6.
Thanks
Omer

Add support for a Secondary (fallback) Key Vault

This is important for fault tolerance reasons, we can't have the whole application fall over if Key Vault goes down in a single region.

This will be supplied via options, and a diverse region will be encouraged. All keys in both the primary and secondary vaults will be Validation Keys, the latest enabled key in the currently active vault will be the Signing Credential for up to the cache expiry.

Support multiple JWKs

Having support for multiple signing keys makes rotating keys easier (automatic fallback if one key cannot be accessed anymore). Worth investigating into if this is a good idea or not.

AzureKeyVaultSignatureProvider.Verify() should be performed locally by default

Currently Verification costs one Key Vault operation. Verifying this is not only expensive (requires a network operation), it also costs money (verification may be called in order of magnitudes more often than signing in some scenarios).

Since we (usually) have the public key, this could feasibly be performed locally by default, with the developer optionally choosing to perform the operation through Key Vault itself.

Remove the Task.Run from AzureKeyVaultTokenSigningService

Hey
I've noticed that in SignAsync method there there is an async call using Task.Run. As far as I know (see this SO post) this is not a good practice on a code that might run in webapi code. Also, the inner code, AzureKeyVaultSignatureProvider does call a true async function, and the current implementation hide it. It might be a good idea to create another interface which return Task for such operations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.