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

Cannot pass JSON array in AddHeadersToRequest #693

Closed
kvskranthikumar opened this issue Nov 20, 2018 · 2 comments · Fixed by #798
Closed

Cannot pass JSON array in AddHeadersToRequest #693

kvskranthikumar opened this issue Nov 20, 2018 · 2 comments · Fixed by #798
Labels
feature A new feature help wanted Not actively being worked on. If you plan to contribute, please drop a note. needs feedback Issue is waiting on feedback before acceptance

Comments

@kvskranthikumar
Copy link

Expected Behavior / New Feature

I have the configuration for Ocelot as below -

{
"DownstreamPathTemplate": "/api/v{version}/users",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 7002
}
],
"UpstreamPathTemplate": "/v{version}/users",
"UpstreamHttpMethod": [ "Get", "Post", "Delete" ],
"AuthenticationOptions": {
"AuthenticationProviderKey": "Bearer",
"AllowedScopes": []
},
"AddHeadersToRequest": {
"name": "Claims[name] > value > |",
"role": "Claims[role] > value > |"
}
}

OAuth JWT -
{
"nbf": 1542628406,
"exp": 1542632006,
"iss": "http://localhost:7600",
"aud": [
"http://localhost:7600/resources",
"IdentityServer"
],
"client_id": "ImplicitClient",
"sub": "TestUser",
"auth_time": 1542627374,
"idp": "Google",
"name": "TestUser",
"role": [
"ix_role_eiaproject_admin",
"ix_role_assortment_admin",
"ix_role_cluster_admin",
"ix_role_floorplan_admin",
"ix_role_planogram_admin",
"ix_role_product_admin",
"ix_role_store_admin",
"ix_role_system_admin",
"ix_role_pronet_admin"
],
"scope": [
"IdentityServer"
],
"amr": [
"external"
]
}

When I extract the role header in the Web API, I only get one role. But then I am expecting all the roles in the header with the "AddHeadersToRequest" functionality.

@GlennArens
Copy link

i'm also interest in this.
I have a list of project in the claim which says which account is allowed to access which projects.

@philproctor philproctor added feature A new feature help wanted Not actively being worked on. If you plan to contribute, please drop a note. needs feedback Issue is waiting on feedback before acceptance labels Jan 9, 2019
@WeihanLi
Copy link
Contributor

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature help wanted Not actively being worked on. If you plan to contribute, please drop a note. needs feedback Issue is waiting on feedback before acceptance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants