You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I figured I share my idea for a feature. I've used Micronaut both professionally and now personally in a serverless setting, running it in Lambdas, either regularly in JVM or with GraalVM. I love the project and it's been a blast working with it.
I did come across a small issue when trying to use it with authenticated endpoints using JWTs. Cold starts are not much of a problem with GraalVM of course, but even though there is already a 'local' cache in the code to store the JWKS, if you use Google JWTs you still need to request the JWKs over the internet, which can add a second or 2 to an already slow start if you don't use GraalVM. Not super terrible, but I think we can do better.
Seeing more and more companies using Micronaut in serverless settings like this, I think we can improve this by allowing a shared 'external' cache that's closer to the source rather than going to the OpenID providers endpoint all the time. For this I've made some classes that either can use Redis or DynamoDb to share the JWKSet.
I've opened this PR so you guys can see the initial implementation: #1402
If it's something you see is worth adding then I will flesh it out completely of course.
Also this is my first time coming to a big framework with a feature idea so I apologize in advance if this is not the way it's supposed to go.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all.
I figured I share my idea for a feature. I've used Micronaut both professionally and now personally in a serverless setting, running it in Lambdas, either regularly in JVM or with GraalVM. I love the project and it's been a blast working with it.
I did come across a small issue when trying to use it with authenticated endpoints using JWTs. Cold starts are not much of a problem with GraalVM of course, but even though there is already a 'local' cache in the code to store the JWKS, if you use Google JWTs you still need to request the JWKs over the internet, which can add a second or 2 to an already slow start if you don't use GraalVM. Not super terrible, but I think we can do better.
Seeing more and more companies using Micronaut in serverless settings like this, I think we can improve this by allowing a shared 'external' cache that's closer to the source rather than going to the OpenID providers endpoint all the time. For this I've made some classes that either can use Redis or DynamoDb to share the JWKSet.
I've opened this PR so you guys can see the initial implementation: #1402
If it's something you see is worth adding then I will flesh it out completely of course.
Also this is my first time coming to a big framework with a feature idea so I apologize in advance if this is not the way it's supposed to go.
Beta Was this translation helpful? Give feedback.
All reactions