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

Allowed to override the ClaimsToHeaders middleware #1403

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

kesskalli
Copy link

@kesskalli kesskalli commented Dec 28, 2020

New Feature

The idea is to allow to use custom claims to headers transformation logic after the authorization process is done.
The transformation using a JSON file requires to handle everything by route. The file will become very verbose in this case.
In some cases, the internal HTTP services can expect some HTTP "X-" Headers to get more context about the request (to support multi-tenancy for instance), the override will allow to add them automatically.

Proposed Changes

  • Allowed to override the ClaimsToHeaders middleware
  • The override can be "injected" in the Ocelot config on start-up

EngRajabi

This comment was marked as spam.

@raman-m
Copy link
Member

raman-m commented Jul 11, 2023

@kesskalli Hi Karim!
Thanks for the great idea and PR!

3 years have been passed...
Do you have an intention to contribute nowadays?

Copy link
Member

@raman-m raman-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are not covered by unit and acceptance tests!
Let's collaborate on writing tests...

@raman-m raman-m added feature A new feature help wanted Not actively being worked on. If you plan to contribute, please drop a note. medium effort Likely a few days of development effort needs feedback Issue is waiting on feedback before acceptance labels Jul 11, 2023
@raman-m raman-m force-pushed the feature/custom-claims-to-headers-middleware branch from 3fd2d08 to ab2d12c Compare August 22, 2023 14:21
@raman-m
Copy link
Member

raman-m commented Aug 22, 2023

@kesskalli Hi Karim!
The feature branch has been rebased onto ThreeMammals:develop successfully!


I see that develop branch in your fork is old!
Could you Sync fork please? So, the develop branch will be updated with all top commits!
Could you add me as collaborator to your forked repo please? I will update develop branch.

@raman-m
Copy link
Member

raman-m commented Aug 22, 2023

@kesskalli commented on Dec 28, 2020:

Proposed Changes

  • Allowed to override the ClaimsToHeaders middleware

I see these changes. The community will review them soon.


  • The override can be "injected" in the Ocelot config on start-up

Yeah, but in theory. And I don't see these changes in files.
It would be a good idea to add a sample web app to demonstrate how to override this middleware.


Also, don't forget to write tests please!


Is this PR related to an issue in backlog?

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. medium effort Likely a few days of development effort needs feedback Issue is waiting on feedback before acceptance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants