Replies: 1 comment 3 replies
-
Hey Deon, Interesting stuff here. You ultimately arrived at the solution I would have suggested given what was available in beta4. After some thought, I think we need to scope the Using final example, it would look like this: wapp.UseRouting()
.UseAuthentication()
.UseAuthorization()
.UseFalco(endpoints) I just deployed beta5 with this code. Have a crack at it, and let me know. Thanks for catching this silly oversight before we went to release. |
Beta Was this translation helpful? Give feedback.
-
I tried 5.0.0 with aspnetcore's authorization middleware.
The current recommendation from MS is to add the default policy as the fallback policy, which requires all requests to be authenticated.
For unauthenticated access to routes, I've been making use of this helper function. Which I stole from pim's fix for route
Order
.A generic version could be
There's a couple of other considerations to go along with this.
UseFalco
currently callsUseRouting
andUseEndpoints
butUseAuthorization
needs to be called in between them. I've been using this workaroundIt's possible to add duplicate attributes into the Metadata collection. Not sure what the behaviour is when that happens.
Would it be useful to add these EndpointBuilder functions to Falco?
Beta Was this translation helpful? Give feedback.
All reactions