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
0
votes
0 answers

Forwarding a client to the same SignalR instance in Ocelot

We are considering using Ocelot as an API Gateway. Our environment is being hosted on Kubernetes. One of the micro services is signalR-Hub. Scaling this hub (more than one pod) is required, yet it is still important that clients would contact the…
mh133
  • 135
  • 12
0
votes
1 answer

Can I use Ocelot API Gateway to proxy to a Website

I am new to Ocelot API Gateway and trying to figure out how to perform a response host rewrite? My ocelot api gateway is hosted on localhost:5000, the downstream server is on another host example.com. I am able to proxy from localhost:5000 to…
Jonathan
  • 73
  • 2
  • 8
0
votes
2 answers

Ocelot Caching : AddCacheManager Try specifying the type arguments explicitly error

New to Ocelot and .net core. I am trying to implement caching in .net core 3.0 microservice in Ocelot gateway. As per Ocelot guideline (https://ocelot.readthedocs.io/en/latest/features/caching.html) As per second step, my startup.cs looks…
TechTurtle
  • 2,667
  • 4
  • 22
  • 31
0
votes
2 answers

How to merge multiple authentication schema in one (Custom Authentication)

I have multiple authentication in my .NET Core API using add multiple Jwt bearer, assume I have Schema1, Schema2 and Schema3. I'm also using Ocelot to manage requests. In Ocelot config for each route I could declare one and only one authentication…
0
votes
0 answers

Ocelot .NET Core balancing problem with a downed microservice

I have a question about api gateway with Ocelot on NET Core 3.1 and I have a microservice posted on two different sites, and I want you to check with a balancer to see if the microservice is down, and if so go to the second microservice. I have…
0
votes
1 answer

How add Gateway base path on CreatedAtRoute Location Header - URL Rewrite

I have an Ocelot Gateway configuration as follow: { "ReRoutes": [ { "DownstreamPathTemplate": "/api/{version}/{everything}", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "localhost", …
Renato Pereira
  • 834
  • 2
  • 9
  • 22
0
votes
1 answer

Ocelot doesn't rederict to microservice

I'm trying to implement my microservice application. I've Catalog API microservice on localhost:5001 - base CRUD. I want to implement Api Gateway using Ocelot. Catalo.API launSettings.json: "reservation_system.Catalo.Api": { "commandName":…
Kenik
  • 103
  • 1
  • 15
0
votes
1 answer

Can I Reroute POST http request to a GET http request with Ocelot?

We have an ocelot gateway that reroutes our former WCF requests to newer .NET Core services. Some of the old requests are still going to the WCF service. This all works fine. Now I want to Reroute a POST with request model to a GET with query string…
Nick N.
  • 12,902
  • 7
  • 57
  • 75
0
votes
1 answer

Retrieving UpstreamPathTemplate at runtime Ocelot Gateway

I would like to retrieve the "UpstreamPathTemplate" parameter at run time, to use in my Logs. Does anyone know how to do this, please?
0
votes
2 answers

Bypassing Ocelot API Gateway

I have an API Gateway, in this instance is called Gateway.Api. Within the Startup class I have the following: public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the…
KTOV
  • 559
  • 3
  • 14
  • 39
0
votes
0 answers

Api-gateway production

I have some apis, and a api-gateway in front of them. It happens to be Ocelot this is my configuration on my local environment: "ReRoutes": [ { "DownstreamPathTemplate": "/{everything}", "DownstreamScheme": "http", …
barii
  • 343
  • 1
  • 3
  • 12
0
votes
2 answers

Injecting AuthenticationMiddleware in Ocelot - how to return 401

I think this question is kind of trivial, but I cannot find an answer to it: I am using Ocelot as an API Gateway and use my own authentication middleware, since I need to authenticate the users against our own database. The happy path is working…
0
votes
0 answers

How to validate JWT from Azure AD B2C in ASP.NET Core 2.1 API after Ocelot API-Gateway

I use Ocelot as a API-Gateway for our micro-services which are build using ASP.NET Core 2.1. Ocelot is authenticating the bearer token from AD B2C and calling my web API. I configured my web service with the standard Azure AD B2Z authentication…
0
votes
1 answer

Hiding IdentityServer4 behind Ocelot gateway

I'm trying to resolve a bigger issue by splitting it into smaller bits. The first problem is that i don't know how to hide properly. for the purpose of this post, i've created a simple demo app that gets deployed to docker (available on github). It…
skyrunner
  • 460
  • 1
  • 7
  • 18
0
votes
1 answer

API Gateway w/WebAPI endpoint on the same user bridge network. WebAPI need SSL?

If I have an api gateway in a docker container that communicates with a second webapi docker container on the same user bridge network, would there be any reason to configure ssl between the api gateway and the docker container? Is it 100% safe to…
Post Impatica
  • 14,999
  • 9
  • 67
  • 78
1 2 3
18
19