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

Override the ClaimsToHeadersMiddleware by the OcelotPipelineConfiguration settings #1403

Conversation

kesskalli
Copy link
Contributor

@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 raman-m self-requested a review July 11, 2023 18:56
@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?

@raman-m raman-m force-pushed the feature/custom-claims-to-headers-middleware branch from ab2d12c to 8e88acb Compare November 5, 2024 16:48
@raman-m raman-m changed the title Allowed to override the ClaimsToHeaders middleware Override the ClaimsToHeaders middleware by OcelotPipelineConfiguration settings Nov 5, 2024
@raman-m raman-m changed the title Override the ClaimsToHeaders middleware by OcelotPipelineConfiguration settings Override the ClaimsToHeadersMiddleware by the OcelotPipelineConfiguration settings Nov 5, 2024
@raman-m raman-m added proposal Proposal for a new functionality in Ocelot Middlewares Ocelot feature: Middleware Injection Configuration Ocelot feature: Configuration Dec'24 December 2024 release and removed 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 Nov 5, 2024
@raman-m raman-m added this to the Autumn'24 milestone Nov 5, 2024
@raman-m raman-m merged commit d310508 into ThreeMammals:develop Nov 5, 2024
1 check passed
@raman-m raman-m added Nov'24 November 2024 release and removed Dec'24 December 2024 release labels Nov 20, 2024
@raman-m raman-m modified the milestones: Autumn'24, November'24 Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Ocelot feature: Configuration Middlewares Ocelot feature: Middleware Injection Nov'24 November 2024 release proposal Proposal for a new functionality in Ocelot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants