Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New AuthenticationOptions property in global configuration #842

Open
faultcode opened this issue Mar 28, 2019 · 7 comments · May be fixed by #2114
Open

New AuthenticationOptions property in global configuration #842

faultcode opened this issue Mar 28, 2019 · 7 comments · May be fixed by #2114
Labels
accepted Bug or feature would be accepted as a PR or is being worked on Authentication Ocelot feature: Authentication Configuration Ocelot feature: Configuration feature A new feature low Low priority Winter'25 Winter 2025 release
Milestone

Comments

@faultcode
Copy link

faultcode commented Mar 28, 2019

Is it possible to use AuthenticationOptions in the GlobalConfiguration? Like this:

{
  "Routes": [],
  "GlobalConfiguration": {
    "AuthenticationOptions": {
      "AuthenticationProviderKeys": [ "TestKey" ],
      "AllowedScopes": []
    }
  }
}

The reason why I would do that is: the Routes configuration is coming from a Service Discovery, and I want all of them to be authenticated via IdentityServer with key TestKey.

Also, is it possible to add AllowedScopes to a service registered to Consul, and then map it to Ocelot Routes dynamically (same as host-names and ports)?

@faultcode
Copy link
Author

Can anyone please provide me with an answer?

@harindaka
Copy link

I can confirm that this scenario is not supported (or not working for me atleast) as I ran across the same issue today. Not sure why though

@harindaka
Copy link

harindaka commented Sep 12, 2019

@TomPallister any thoughts? Authentication does not seem to work if AuthenticationOptions is in the GlobalConfiguration section.

@harshmaurya
Copy link

Yes, I think this should be an option. I have to explicitly add the AuthenticationOptions in every ReRoute which is a bit of a risky thing. Because, if it is missed in a single reroute by mistake, user would be able to access the data unauthenticated.

@raman-m raman-m added feature A new feature accepted Bug or feature would be accepted as a PR or is being worked on labels Jul 19, 2023
@raman-m
Copy link
Member

raman-m commented Jul 19, 2023

@faultcode commented on May 8, 2019

Can anyone please provide me with an answer?

I believe the answer to all your Qs is Yes because @jlukawska has prepared a nice PR #1215 .
Could you join to code review also please? 😉


The issue has been accepted due to open PR #1215 by @jlukawska

@raman-m
Copy link
Member

raman-m commented Jul 27, 2023

@faultcode @harindaka @harshmaurya
Code review has started.
Go! 😉

@raman-m raman-m changed the title Question: AuthenticationOptions in GlobalConfiguration New AuthenticationOptions property in global configuration Jul 27, 2023
@raman-m raman-m added the low Low priority label Apr 11, 2024
jlukawska added a commit to jlukawska/Ocelot that referenced this issue Jun 28, 2024
@raman-m
Copy link
Member

raman-m commented Jul 9, 2024

Assigned to @jlukawska

@raman-m raman-m added Authentication Ocelot feature: Authentication Configuration Ocelot feature: Configuration labels Jul 9, 2024
@raman-m raman-m changed the title New AuthenticationOptions property in global configuration New AuthenticationOptions property in global configuration Jul 9, 2024
@raman-m raman-m added the Winter'25 Winter 2025 release label Oct 26, 2024
@raman-m raman-m added this to the Autumn'24 milestone Oct 26, 2024
raman-m pushed a commit to jlukawska/Ocelot that referenced this issue Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Bug or feature would be accepted as a PR or is being worked on Authentication Ocelot feature: Authentication Configuration Ocelot feature: Configuration feature A new feature low Low priority Winter'25 Winter 2025 release
Projects
None yet
4 participants