Ocelot
Ocelot copied to clipboard
#842 AuthenticationOptions in GlobalConfiguration
Closes #842
- #842
Proposed Changes
It is possible to configure AuthenticationOptions in GlobalConfiguration. Then all routes use these settings. To configure an exception to this rule (e.g. for identity service), AllowAnonymousForGlobalAuthenticationOptions property should be set to true in the route AuthenticationOptions.
If a route has its own AuthenticationOptions with AuthenticationProviderKey configured additionally, it has priority over the global one.
At the moment if a route uses a global AuthenticationProviderKey (when AuthenticationProviderKey is not configured for route explicitly), it uses also global AllowedScopes, even if AllowedScopes is configured for the route additionally.
+1 to please add/merge this feature.
Question: does your implementation allow for a given route to NOT have authentication? Like an 'allow anonymous' setting. In my project this would be needed for my identity service.
@rathga, it should be quite easy to add this option. I'll try to update the pull request soon.
Thanks for the feedback!
@jlukawska Hi J! Thanks for the great PR! Wow! I am impressed. 😍
What I've done:
- Feature branch has been rebased onto ThreeMammals:develop to remove all merge commits and introduce top commits from target
- Merge conflicts have been resolved during rebasing. That was quite difficult, but done
- Fixed errors. There was some ambiguity in resolutions, not an issue now
- Fixed some errors, warning and messages
- Made green build finally
Now we can start code review...
@rathga commented on Jul 16, 2020
Hey, Richard! It was a long story, but I hope, we will get this feature delivered soon... 😄
Could you join to code review please? Your opinion is highly prioritized.
Also, check please, Is your small feature request implemented?
I need this change,What time releases this PR?
@raman-m
@wudiqiang2024 commented on Apr 11
Sorry for delaying the delivery! We have a lack of dev time!
This PR has low priority. We have another more important PRs in Annual 2023 milestone.
Having possibility to define in global section is just beneficial option and not required at the moment.
Please try to merge all routes as Catch All ones and define AuthenticationOptions
for those Catch All routes.
How many downstream services you have? How many routes are defined in ocelot.json
?
Do you consider Consul usage?
Closed due to creation of a new PR: https://github.com/ThreeMammals/Ocelot/pull/2114