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

Route request based on JWT claims #3763

Closed
atali opened this issue Jun 29, 2018 · 5 comments
Closed

Route request based on JWT claims #3763

atali opened this issue Jun 29, 2018 · 5 comments
Labels
enhancement Feature requests. Not bugs or questions. stale stalebot believes this issue/PR has not been touched recently

Comments

@atali
Copy link

atali commented Jun 29, 2018

Title: I would like to route a request containing a jwt header to a dedicated tenant micro-service based on a claim.

Description:
Once my client is authenticated, he will receive a JWT with some claims. I have a micro-service A that will receive this query and dispatch the query to a micro-service B. There is a micro-service B per tenant. I would like the query to be routed seamlessly to the micro-service B specific to a tenant, the routing will be based on a jwt claim.

You already have the same request on this thread

I like the proposition from @galo

apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
  name: meme-lz
spec:
  destination:   
    name: meme
  precedence: 2
  match:
    request:
      headers:
        jwt_auth.country_code:
          regex: "^(.*?;)?(fr)(;.*)?$"  
  - destination:
      service: meme-france

I think nginx already managed that here

@mattklein123 mattklein123 added the question Questions that are neither investigations, bugs, nor enhancements label Jul 2, 2018
@mattklein123
Copy link
Member

@lizan @qiwzhang is this planned as part of the ongoing JWT work or should it be tracked as an enhancement?

@qiwzhang
Copy link
Contributor

qiwzhang commented Jul 2, 2018

Planed JWT work will not cover this feature. Please track it as a separate issue.

@mattklein123 mattklein123 added enhancement Feature requests. Not bugs or questions. and removed question Questions that are neither investigations, bugs, nor enhancements labels Jul 2, 2018
@stale
Copy link

stale bot commented Aug 1, 2018

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 1, 2018
@stale
Copy link

stale bot commented Aug 8, 2018

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed Aug 8, 2018
@BarDweller
Copy link

Note also related to istio/istio#8444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. Not bugs or questions. stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants