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 · 6 comments · May be fixed by #1215
Open

New AuthenticationOptions property in global configuration #842

faultcode opened this issue Mar 28, 2019 · 6 comments · May be fixed by #1215
Labels
accepted Bug or feature would be accepted as a PR or is being worked on feature A new feature low Low priority

Comments

@faultcode
Copy link

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

{
  "ReRoutes": [],
  "GlobalConfiguration": {
    "AuthenticationOptions": {
      "AuthenticationProviderKey": "TestKey",
      "AllowedScopes": []
    }
  }
}

The reason why I would do that is: the ReRoutes 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 ReRoutes dynamically (same as host-names and ports)?

Specifications

  • Version: 13.4.1
@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.

@jlukawska jlukawska linked a pull request Apr 28, 2020 that will close this issue
@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
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 feature A new feature low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants