-
Notifications
You must be signed in to change notification settings - Fork 598
Replace INonceCache by IDistributedCache #212
Comments
@PinpointTownes do you want to take a stab at this? |
@Eilon yup, feel free to assign me this issue 😄 |
Can't actually assign to you because you have to be in our GitHub org, but we know it's you 😄 |
Actually, that's a strong sign I should be in this organization 😄 |
I got two questions concerning the general design we should adopt for this PR:
FWIW, I opted for the second approach in |
This needs to be under developer control. I don't think the presence or absence of an IDistributedCache in DI is sufficient to turn this on or off since the cache may be used for other components as well. Maybe just a bool that toggles nonce cache vs nonce cookies? I would still default to cookies, as cache requires dependencies and setup. Check how we use IDistributedCache in Session. It may not be quite the same since technically it's optional here. The hybrid approach sounds the most accessible. |
Yup, that's what I had in mind.
True. But on the other hand, storing nonces in a server-side cache is definitely safer, as "nonce cookies" cannot really protect your app against replay attacks. Am I allowed to submit a prototype using sessions instead of directly using a distributed cache? |
Stay away from session. Using the memory cache implementation of IDistributedCache (LocalCache) should be adequate for development. |
#202 (comment)
The text was updated successfully, but these errors were encountered: