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 implemented a TypedRequestArgumentBinder which extracts information from the HttpRequest's Authentication instance and then does a DB look-up based on that information. Is this safe or will it lead to blocked event loop issues?
I run my application with:
server:
thread-selection: IO
but this setting does not apply in the binding context since it's executed before the controller code.
To give a more complete picture of what I am trying to accomplish:
Custom SecurityRule processes Authentication instance -> does DB look-up -> adds returned entity to HttpRequest as attribute
The TypedRequestArgumentBinder either reads from that attribute and only does the DB look-up if has not not already been set by the SecurityRule.
Micronaut 3.x changes allow having non-blocking SecurityRule implementations but if the above pattern breaks in the argument binding phase it won't work.
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
Uh oh!
There was an error while loading. Please reload this page.
-
I implemented a TypedRequestArgumentBinder which extracts information from the HttpRequest's Authentication instance and then does a DB look-up based on that information. Is this safe or will it lead to blocked event loop issues?
I run my application with:
but this setting does not apply in the binding context since it's executed before the controller code.
To give a more complete picture of what I am trying to accomplish:
Micronaut 3.x changes allow having non-blocking SecurityRule implementations but if the above pattern breaks in the argument binding phase it won't work.
Thank you,
David
Beta Was this translation helpful? Give feedback.
All reactions