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
4
votes
1 answer

Ocelot RouteClaimsRequirement does not recognize my claims and returns 403 Forbidden

I have configured ocelot in Linux containers with multiple micro service. For restricting some of the micro services I'm using RouteClaimsRequirement. I have administrator role as claim, but when I send token with role administrator the Ocelot…
mybirthname
  • 17,949
  • 3
  • 31
  • 55
4
votes
0 answers

Ocelot gateway unable to obtain configuration from identityserver in docker compose

I have an error that I can't seem to understand why this is happening. I have a microservice architecture running in a docker network. I'm trying to set up an identity server with the framework Identityserver4. There is a proxy forwarding to an…
4
votes
0 answers

Ocelot ApiGateway unable to reach other services on Kubernetes

I'm working on a simple project to learn more about microservices. I have a very simple .net core web with a single GET endpoint. I have added a ApiGateway web app with Ocelot, and everything seems to be working fine except when I deploy to a local…
GioGio
  • 448
  • 2
  • 5
  • 22
4
votes
1 answer

How to check Claim value in array or any in Ocelot gateway?

Assume I have 2 endpoints like this Order creating: requires claim order_perm with value in array ["order_create", "order_edit"] Order searching: only requires claim order_perm exists In case 1., I pass above array to RouteClaimsRequirement like…
kvuong
  • 485
  • 3
  • 20
4
votes
1 answer

Ocelot - Changing the upstream request body in gateway causes no change on downstream request

I'm designing microservice architecture as below: Gateway uses Ocelot to forward requests. I would like to change the body in request received from mobile device on gateway side and add inside the body new GUID. Microservices uses CQRS pattern, so…
Lutz Harrold
  • 123
  • 3
  • 10
4
votes
0 answers

API Gateway Aggregated POST (Ocelot)

I'm using ocelot as an API Gateway, and I'm trying to send an HTTP POST request from the client, which would be sent to multiple services, and their responses should be aggregated and returned to the client. It has been mentioned on Ocelot's docs…
Muizz Mahdy
  • 798
  • 2
  • 8
  • 24
4
votes
2 answers

How to avoid port in Downstream url in ocelot?

port is getting added at the Downstream url. i want to access a micro service hosted in heroku. need to avoid port. Please help. Its working in local dev environment. But not working after deployment in Heroku. { "ReRoutes": [ { …
4
votes
2 answers

Can Ocelot have it's own Controller/Actions?

I am trying to put together an API gateway that also serves the purpose of mashing up calls to multiple APIs. I would also like to have autogenerated Swagger, so I'd like to combine the capability of Ocelot for authorization and rate limiting but…
Kyle J V
  • 563
  • 5
  • 21
4
votes
0 answers

Ocelot QoS doesn't break circuit when n number of exception arises

I am carrying out a PoC on Ocelot Gateway to use for our microservices architecture. I have successfully used the Gateway to perform all the routing tasks uptil now. It provides a QoS Service that helds configuration in ocelot.json for circuit…
3
votes
2 answers

Ocelot Authentication using JwtBearer always returns 401 Unauthorized

We have built a microservices application which consists of 3 main services. We needed to have an Api Gateway for routing and mainly for authentication and authorizations purposes as 2 of the 3 services need to have an authenticated user to make the…
3
votes
2 answers

Ocelot Gateway duplicate query params

I am using ocelot gateway. Here is the example configuration { "DownstreamPathTemplate": "/ipgeo?apiKey={key}&ip={ip}", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "api.ipgeolocation.io", "Port": 80 } …
3
votes
1 answer

How to combine security with the gateway?

I'm investigating microservices architecture and now focusing on the api gateway along with security. I found out that there are two different approaches: 1- Where authentication is outside of the gateway, meaning, the user has to authenticate…
MoBe
  • 61
  • 5
3
votes
0 answers

Ocelot certificate problem. The SSL connection could not be established, see inner exception

I am running in Local using Docker an Ocelot API gateway (https://localhost:5010) service that calls a Dot net core API (https://localhost:5003). I used self signed certificates and both services are secure: To make it work locally I add in…
JonR
  • 89
  • 6
3
votes
1 answer

Ocelot + consul + my web api (.Net 5) via HTTPS in docker

I'm trying to use Ocelot (Api gateway) + consul + my web api (.Net 5) via HTTPS in docker; ocelot - v17.0.0 consul - latest https://hub.docker.com/_/consul my service - ASP.NET 5 Web Api Trust HTTPS certificate from Windows Subsystem for…
3
votes
2 answers

Error consume route ApiGateway with ocelot and docker service

I am creating an ApiGateway with ocelot that consume an Api service in net core. The ApiGateway and ApiService are deployed on docker with docker compose of this way: Docker-compose: tresfilos.webapigateway: image:…
Dr oscar
  • 359
  • 1
  • 4
  • 16
1
2
3
18 19