Questions tagged [ocelot]

Ocelot is a .NET API Gateway.

Ocelot is a .NET API Gateway. This project is aimed at people using .NET running a micro services/service orientated architecture that need a unified point of entry into their system. However it will work with anything that speaks HTTP and run on any platform that ASP.NET Core supports.

In particular I want easy integration with IdentityServer reference and bearer tokens.

We have been unable to find this in my current workplace without having to write our own Javascript middlewares to handle the IdentityServer reference tokens. We would rather use the IdentityServer code that already exists to do this.

Ocelot is a bunch of middlewares in a specific order.

Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is retrieved as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features!

Home repo

Documentations

273 questions
20
votes
3 answers

Multiple JWT authorities/issuers in Asp.Net Core

I'm trying to get JWT bearer authentication in an ASP.Net API gateway using Ocelot to work with multiple authorities/issuers. One issuer is Auth0 and the other is an in-house authentication server based on IdentityServer4; we are trying to migrate…
Chris Swinchatt
  • 1,081
  • 2
  • 9
  • 18
16
votes
1 answer

Aggregation of data on API Gateway

I am working on microservice architecture and I want to aggregate data from two microservices. For example, Frontend calls the API Gateway and API Gateway calls two microservices Customer and Order microservices. Customer microservice returns…
15
votes
3 answers

404 trying to route the Upstream path to downstream path in Ocelot

I am facing this warning/error while forwarding the incoming http request to the downstream path. Ocelot.DownstreamRouteFinder.Middleware.DownstreamRouteFinderMiddleware: Warning: requestId: 80000025-0004-fd00-b63f-84710c7967bb, previousRequestId:…
Manan Kapoor
  • 327
  • 1
  • 2
  • 11
15
votes
2 answers

ASP.NET Core Api-Gateway middleware

I am new to API gateways and have a question of understanding. I try too put a series of (micro)services behind an endpoint. For this purpose, I have set up an ASP.NET Core Application and added the package ThreeMammals Ocelot. With the help of…
mMilk
  • 245
  • 1
  • 2
  • 10
10
votes
1 answer

Request header are not forwarding to IdentityServer4

I am using ocelot as API gateway for my microservices with IdentityServer4 for authentication. In the ocelot config file I added "AuthenticationOptions" and set the api key. In the Startup I add the Identity server. In the identity server I use…
Chamal
  • 1,439
  • 10
  • 15
9
votes
3 answers

Micro Service with API Gateway Ocelot vs Nginx

I have a .net core based micro service architecture. I chose ocelot as api gateway. My frontend application is vue js based and hosted on nginx container. During a discussion today, I learned that nginx can already be used as a gateway.it was…
Melih Altıntaş
  • 2,495
  • 1
  • 22
  • 35
8
votes
3 answers

Cannot merge Ocelot config files

As per the documentation i tried to merge my config files so they are a bit more readable. The generated ocelot.json file however is not like expected. My folder structure is like follows: Folder structure Below is a text representation of…
7
votes
0 answers

Micro Services with API Gateway - Ocelot vs Envoy

I have a .NET core based micro service architecture and have several micro services. We chose ocelot as api gateway for routing, aggregation & security implementation. During our architectural discussion it was mentioned that Envoy Api Gateway is…
VR1256
  • 1,266
  • 4
  • 28
  • 56
7
votes
1 answer

Environment variable in ocelot config file

I have multiple microservices which are accessible by clients through Ocelot gateway. Inside configuration file there are properties to specify downstream host and port. This have to be done for EACH route. The problem is that if the service's…
5
votes
1 answer

Identityserver 4 and Ocelot

I'm trying to use Ocelot with IS4 following https://ocelot.readthedocs.io/en/latest/features/authentication.html When using public void ConfigureServices(IServiceCollection services) { var authenticationProviderKey = "TestKey"; …
tri
  • 191
  • 1
  • 3
  • 9
5
votes
1 answer

Is It Possible to Dynamically Add SwaggerEndpoints For SwaggerUI?

We're building out a services oriented architecture in .NET Core. We've decided to use Ocelot as our API gateway. I have integrated Ocelot with Consul for service discovery. Now I'm trying to attempt to create a unified Swagger UI for all the…
Mike G
  • 1,956
  • 1
  • 30
  • 62
5
votes
1 answer

how implements cors headers in Ocelot

I implementing ocelot in my new project, i create the integration of my services in one point with ocelot but when i try to post, put, path or delete to a resource in my api gateway, the browser show me the message Failed to load…
Alejandro Mora
  • 157
  • 3
  • 16
4
votes
3 answers

API Gateway Ocelot .Net Core 6.1 Setup

The .Net 6 have removed the Start up Class and i am not able to find out how to configure Ocelot in new .Net 6 structure. I have found two methos using Ocelot.DependencyInjection; using Ocelot.Middleware; var builder =…
DropAndTrap
  • 1,538
  • 16
  • 24
4
votes
1 answer

Ocelot Failed to match Route configuration for upstream path

Hello Now I am trying to use Ocelot gateway Normally I have one api in different server such as https://server_domain.net/kpiDashboardApi without gateway if I send request directly to below link , it…
core_user
  • 152
  • 1
  • 8
4
votes
3 answers

Connect to SignalR Hubs using Ocelot API Gateway

I am trying to connect Blazor client to SignalR hub in a simple microservice through the Ocelot API gateway. I am using SSL for all the ASP.NET Core projects. The gateway works fine when calling https endpoints and I get "Connection Id Required"…
1
2 3
18 19